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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: #ffffff;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.container {
    background: #ffffff;
    max-width: 1200px;
    width: 100%;
    height: 100vh;
    padding: 0 40px 200px 40px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

header {
    text-align: center;
    padding: 20px 0;
    flex-shrink: 0;
}

header h1 {
    font-size: 1.8em;
    color: #000000;
    margin-bottom: 5px;
    font-weight: 700;
}

header p {
    font-size: 0.9em;
    color: #333333;
    font-weight: 400;
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    justify-content: center;
    padding: 40px 0;
}

/* Scrolling List Styling */
.scroll-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    flex-shrink: 0;
}

.scroll-window {
    height: 300px;
    overflow: hidden;
    background: transparent;
    position: relative;
}

.topic-list {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
}

.topic-item {
    padding: 25px 30px;
    text-align: center;
    font-size: 1.2em;
    font-weight: 500;
    color: #bbbbbb;
    background: transparent;
    transition: all 0.3s ease;
}

.topic-item.selected {
    background: transparent;
    color: #000000;
    font-weight: 700;
    font-size: 1.6em;
    transform: scale(1.15);
}

/* Selector Line - HIDDEN */
.selector-line {
    display: none;
}

/* Start Button Container */
.start-button-container {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 100;
}

.start-button-container .btn {
    padding: 12px 32px;
    font-size: 1em;
    pointer-events: auto;
}

/* Timer Section */
.timer-section {
    position: fixed;
    bottom: 100px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 100;
    background: #ffffff;
    padding: 10px 0;
}

.timer-display {
    font-size: 2.5em;
    font-weight: 700;
    color: #000000;
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
}

.timer-display.running {
    color: #2ecc71;
    animation: timerPulse 1s infinite;
}

.timer-display.warning {
    color: #e74c3c;
    animation: timerPulse 0.5s infinite;
}

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

.timer-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.timer-controls label {
    font-size: 0.85em;
    color: #333333;
    font-weight: 500;
}

#timeSelect {
    padding: 6px 12px;
    font-size: 0.85em;
    background: #f0f0f0;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    border: 1px solid #dddddd;
    font-weight: 500;
}

#timeSelect:hover {
    background: #e8e8e8;
}

/* Buttons */
.button-container {
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    background: #ffffff;
    padding: 10px 0;
    z-index: 100;
}

.btn {
    padding: 10px 20px;
    font-size: 0.85em;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    user-select: none;
    -webkit-user-select: none;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-scroll {
    background: #3498db;
    color: #ffffff;
}

.btn-timer {
    background: #2ecc71;
    color: #ffffff;
}

.btn-record {
    background: #e74c3c;
    color: #ffffff;
}

.btn-record.recording {
    background: #c0392b;
    animation: recordPulse 1s infinite;
}

@keyframes recordPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.btn-reset {
    background: #95a5a6;
    color: #ffffff;
}

/* Recording Status */
.recording-status {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(231, 76, 60, 0.9);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9em;
    color: #ffffff;
    z-index: 200;
}

.recording-indicator {
    width: 12px;
    height: 12px;
    background: #e74c3c;
    border-radius: 50%;
    animation: recordBlink 1s infinite;
}

@keyframes recordBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Video Preview */
.video-preview {
    position: fixed;
    bottom: 180px;
    right: 20px;
    width: 250px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    z-index: 150;
}

.video-preview video {
    width: 100%;
    max-height: 180px;
    display: block;
}

/* Recordings Section */
.recordings-section {
    display: none;
}

.recordings-section h3 {
    color: #000000;
    font-size: 0.95em;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 700;
}

.recordings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recording-item {
    background: #ffffff;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid #e0e0e0;
}

.recording-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.recording-info {
    flex: 1;
}

.recording-topic {
    font-weight: 600;
    color: #000000;
    font-size: 0.85em;
}

.recording-date {
    font-size: 0.75em;
    color: #666666;
    margin-top: 2px;
}

.recording-controls {
    display: flex;
    gap: 10px;
}

.recording-controls video {
    max-width: 100%;
    border-radius: 8px;
}

.recorded-video {
    max-height: 150px;
}

.recording-actions {
    display: flex;
    gap: 8px;
}

.download-btn {
    padding: 6px 12px;
    font-size: 0.75em;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.download-btn:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.delete-btn {
    padding: 6px 12px;
    font-size: 0.75em;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.delete-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}


/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 1.6em;
    }

    .scroll-window {
        height: 300px;
    }

    .topic-item {
        font-size: 1em;
        padding: 20px;
    }

    .topic-item.selected {
        font-size: 1.2em;
    }

    .timer-display {
        font-size: 2.5em;
    }

    .button-container {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        font-size: 0.9em;
        padding: 12px 20px;
    }
    
    .recording-controls {
        flex-direction: column;
    }
    
    .recording-controls video {
        max-width: 100%;
    }
    
    .recorded-video {
        max-height: 200px;
    }
}
