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

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    position: relative;
    background-color: #f8ffe5;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.button-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    display: flex;
    justify-content: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.mic-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mic-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.mic-button.recording {
    background: rgba(255, 68, 68, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 68, 68, 0.5);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.status {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    text-align: center;
    min-height: 24px;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.8);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
    margin: 0;
    z-index: 1;
}

.results {
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    margin: 0;
    z-index: 1;
}

.transcription {
    text-align: center;
    margin-bottom: 10px;
    min-height: 20px;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.8);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.sound-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: rgba(0, 0, 0, 0.8);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.sound-item.current-playing {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sound-item.current-playing .controls {
    display: flex;
    gap: 8px;
}

.sound-item.current-playing button {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
    font-size: 12px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.sound-item.current-playing button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.library-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.sound-item {
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sound-item button {
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    margin-left: 4px;
}

.timeline-section {
    position: fixed;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.timeline-controls {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
    align-items: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.timeline-controls button {
    border: none;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.timeline-controls button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.time-display {
    margin-left: auto;
    font-family: monospace;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.8);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.timeline {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 80px;
    max-height: 80px;
    width: 100%;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.timeline-track {
    position: relative;
    height: 60px;
    margin: 6px 0;
    background: #f5f5f5;
    border-radius: 3px;
}

.timeline-clip {
    position: absolute;
    height: 48px;
    top: 6px;
    background: #4CAF50;
    border-radius: 3px;
    cursor: move;
    color: white;
    font-size: 10px;
    padding: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clip-content {
    height: 100%;
    display: flex;
    align-items: center;
}

.remove-clip {
    position: absolute;
    top: 1px;
    right: 1px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 9px;
    padding: 1px;
}

h1 {
    margin-bottom: 2rem;
    color: #4a5568;
}

h2 {
    font-size: 1.2rem;
    color: #4a5568;
    margin-bottom: 1rem;
}

.tts-button {
    background: #38a169;
}

.tts-button:hover {
    background: #2f855a;
}

.timeline-button {
    background: #d69e2e;
}

.timeline-button:hover {
    background: #b7791f;
}

.mic-icon {
    font-size: 1.5rem;
}

/* Library Section */
.library-section {
    margin: 2rem 0;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 10px;
    text-align: left;
}

.library-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tab-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background: #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button.active {
    background: #667eea;
    color: white;
}

.feature-section {
    flex: 1;
    max-width: 250px;
}

.timeline-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Sound Items */
.sound-item:hover {
    background: #edf2f7;
}

.sound-item .controls {
    display: flex;
    gap: 0.5rem;
}

.sound-item .play-button {
    background: #667eea;
    color: white;
}

.sound-item .add-button {
    background: #38a169;
    color: white;
}

/* Timeline Track */
.timeline-track {
    display: flex;
    align-items: center;
}

.timeline-clip.dialogue {
    background: #2196F3;
}

.timeline-clip.dragging {
    opacity: 0.7;
    z-index: 1000;
}

.background-video {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    z-index: -1000;
    object-fit: contain;
    background: #f8ffe5;
} 