* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 90%;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 400px;
}

.recorder-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.wave-container {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

.wave-bars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
    width: 100%;
}

.bar {
    width: 12px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: height 0.2s ease;
}

.bar {
    height: 20px;
}

.bar:nth-child(odd) {
    height: 15px;
}

.bar:nth-child(3n) {
    height: 25px;
}

.bar:nth-child(4n) {
    height: 18px;
}

@keyframes wave1 {
    0%, 100% { height: 20px; }
    50% { height: 60px; }
}

@keyframes wave2 {
    0%, 100% { height: 30px; }
    50% { height: 45px; }
}

@keyframes wave3 {
    0%, 100% { height: 40px; }
    50% { height: 70px; }
}

.recording .bar {
    animation: wave2 1s ease-in-out infinite;
}

.recording .bar:nth-child(odd) {
    animation: wave1 0.8s ease-in-out infinite;
}

.recording .bar:nth-child(3n) {
    animation: wave3 1.2s ease-in-out infinite;
}

.recording .bar:nth-child(3n+1) {
    animation-delay: 0.1s;
}

.recording .bar:nth-child(3n+2) {
    animation-delay: 0.2s;
}

.recording .bar:nth-child(4n) {
    animation-delay: 0.3s;
}

.recording .bar:nth-child(4n+1) {
    animation-delay: 0.4s;
}

.timer {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.record-btn, .stop-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.record-btn {
    background-color: #ef476f;
    box-shadow: 0 4px 15px rgba(239, 71, 111, 0.3);
}

.stop-btn {
    background-color: #06d6a0;
    box-shadow: 0 4px 15px rgba(6, 214, 160, 0.3);
}

.record-btn:hover, .stop-btn:hover {
    transform: scale(1.1);
}

.record-btn:disabled, .stop-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(1);
}

.record-icon, .stop-icon {
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
}

.stop-icon {
    border-radius: 3px;
}

.recordings-list {
    margin-top: 30px;
}

.recordings-list h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

#recordingsList {
    list-style: none;
}

.recording-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.recording-item:hover {
    transform: translateY(-2px);
}

.audio-player {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.play-button, .delete-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.play-button:hover, .delete-button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.play-button svg, .delete-button svg {
    width: 24px;
    height: 24px;
    fill: #333;
}

.delete-button svg {
    fill: #ef476f;
}

.timeline {
    flex-grow: 1;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #667eea;
    border-radius: 2px;
    width: 0;
    transition: width 0.1s linear;
}

.time-display {
    font-size: 0.9rem;
    color: #666;
    min-width: 100px;
    text-align: center;
}

.date-display {
    font-size: 12px;
    color: #666;
    margin-right: 10px;
}

.notification {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.notification.error {
    background: #fee2e2;
    color: #ef4444;
}

.notification.success {
    background: #dcfce7;
    color: #22c55e;
}

.copy-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-left: 5px;
    color: #666;
    transition: color 0.3s ease;
}

.copy-button:hover {
    color: #4CAF50;
}

.copy-button svg {
    width: 20px;
    height: 20px;
}

.button-container {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.download-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.download-button:hover {
    opacity: 1;
}

.download-button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.notice {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.4;
}

.notice svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: currentColor;
}

.instructions {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 40px 0;
    margin-top: 40px;
}

.instructions-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.instructions h2 {
    text-align: center;
    color: #000;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.instructions ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.instructions li {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.step-number {
    background: #4CAF50;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 15px;
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.step-content h3 {
    margin: 0;
    color: #000;
    font-size: 20px;
    font-weight: 600;
}

.step-content p {
    margin: 0;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .instructions {
        padding: 30px 0;
    }

    .instructions h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .instructions ol {
        gap: 15px;
    }

    .instructions li {
        padding: 15px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 16px;
        margin-bottom: 12px;
    }

    .step-content {
        gap: 8px;
    }

    .step-content h3 {
        font-size: 18px;
    }

    .step-content p {
        font-size: 15px;
        line-height: 1.5;
    }
}

/* 适配触摸屏 */
@media (hover: none) {
    .record-btn:hover {
        transform: none;
    }

    .copy-button:active,
    .download-button:active,
    .delete-button:active {
        opacity: 1;
        background-color: rgba(0, 0, 0, 0.1);
        border-radius: 4px;
    }
}
