:root {
    --bg-color: #0f1115;
    --surface-color: #1a1d23;
    --primary-color: #2cc985;
    --primary-glow: rgba(44, 201, 133, 0.3);
    --secondary-color: #3d4451;
    --accent-color: #ff4d4d;
    --text-main: #e1e4e8;
    --text-muted: #8b949e;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --radius-lg: 16px;
    --radius-md: 12px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container {
    width: 100%;
    max-width: 650px;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lecture-input-container {
    margin-bottom: 2rem;
}

#lectureTitle {
    width: 100%;
    background: var(--surface-color);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.2s;
}

#lectureTitle:focus {
    border-color: var(--primary-color);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

button {
    border: none;
    border-radius: 50px;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#btnStart {
    background-color: var(--primary-color);
    color: #000;
    box-shadow: 0 4px 15px var(--primary-glow);
}

#btnStart:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

#btnStart:active:not(:disabled) {
    transform: translateY(0);
}

#btnStart.recording {
    background-color: var(--accent-color);
    animation: pulse 1.5s infinite;
}

#btnStop {
    background-color: var(--secondary-color);
    color: white;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

#status {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: -2rem;
    margin-bottom: 3rem;
    height: 1.2rem;
}

.visualizer-container {
    width: 100%;
    height: 60px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

#visualizer {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
}

.notes-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.note-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.note-card .timestamp {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: block;
}

.note-card .content {
    font-size: 1.1rem;
    color: var(--text-main);
}

#log {
    margin-top: 4rem;
    font-size: 0.8rem;
    color: #444;
    text-align: left;
    max-height: 150px;
    overflow-y: auto;
    width: 100%;
    border-top: 1px solid #222;
    padding-top: 1rem;
    display: none;
    /* Hidden by default now */
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 77, 77, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 77, 77, 0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile optimizations */
@media (max-width: 480px) {
    h1 {
        font-size: 1.6rem;
    }

    button {
        padding: 0.8rem 1.8rem;
        width: 100%;
    }

    .controls {
        flex-direction: column;
        gap: 1rem;
    }
}