/* ==========================================================================
   BOOKMATE - STYLESHEET
   Tema Default: Cream Elegant (Warm, Clean, Responsive)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES (VARIABLES)
   -------------------------------------------------------------------------- */
:root {
    /* Main Cream Theme Palette */
    --bg-main: #FDFBF7;
    --bg-secondary: #F7F2EB;
    --bg-card: #FFFFFF;
    --bg-card-subtle: #FFFDF9;
    --bg-card-header: #FAF5ED;

    /* Text Colors */
    --text-primary: #2C2420;
    --text-secondary: #6E6259;
    --text-muted: #9E9185;
    --text-light: #FFFFFF;

    /* Accent & Brand Colors */
    --amber-primary: #D97706;
    --amber-hover: #B45309;
    --amber-light: #FEF3C7;
    --amber-subtle: #FFFBEB;

    --deep-accent: #C2410C;
    --deep-light: #FFEDD5;

    /* Functional Colors */
    --success-color: #059669;
    --success-light: #D1FAE5;
    
    --danger-color: #DC2626;
    --danger-light: #FEE2E2;

    --warning-color: #EAB308;
    --warning-light: #FEF9C3;

    /* Borders & Shadows */
    --border-color: #EBE3D7;
    --border-hover: #D9CDBC;

    --shadow-sm: 0 2px 4px rgba(44, 36, 32, 0.04);
    --shadow-md: 0 8px 24px -4px rgba(44, 36, 32, 0.08);
    --shadow-lg: 0 16px 36px -6px rgba(180, 83, 9, 0.12);

    /* Fonts & Radii */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Background Abstract Shapes */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}

.shape-1 {
    width: 350px;
    height: 350px;
    background: #FDE68A;
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: #FED7AA;
    bottom: -150px;
    left: -150px;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hidden {
    display: none !important;
}

/* --------------------------------------------------------------------------
   3. SYSTEM BANNER NOTIFICATIONS
   -------------------------------------------------------------------------- */
.banner-container {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.banner-item {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    border: 1.5px solid var(--border-color);
    animation: slideInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: var(--transition);
}

.banner-item.banner-info {
    border-left: 6px solid var(--amber-primary);
    background: #FFFBEB;
}

.banner-item.banner-danger {
    border-left: 6px solid var(--danger-color);
    background: #FEF2F2;
    animation: slideInDown 0.3s ease, shakeError 0.4s ease 0.3s;
}

.banner-item.banner-success {
    border-left: 6px solid var(--success-color);
    background: #ECFDF5;
}

.banner-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-info .banner-icon { color: var(--amber-primary); }
.banner-danger .banner-icon { color: var(--danger-color); }
.banner-success .banner-icon { color: var(--success-color); }

.banner-text-wrap {
    flex: 1;
}

.banner-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    display: block;
    margin-bottom: 0.1rem;
}

.banner-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   4. HEADER & NAVBAR
   -------------------------------------------------------------------------- */
.app-header {
    background: rgba(253, 251, 247, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--amber-primary), var(--amber-hover));
    color: var(--text-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.brand-tagline {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* AI Status Pill */
.ai-status-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--warning-color);
}

.status-dot.pulsing {
    animation: pulseDot 1.5s infinite;
}

.status-dot.active {
    background-color: var(--success-color);
    box-shadow: 0 0 8px rgba(5, 150, 105, 0.5);
}

.status-dot.error {
    background-color: var(--danger-color);
}

/* --------------------------------------------------------------------------
   5. CARDS & GENERAL LAYOUT
   -------------------------------------------------------------------------- */
.main-layout {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    transition: var(--transition);
}

.card-header {
    margin-bottom: 1.5rem;
}

.card-header.border-bottom {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.card-header h2 i {
    color: var(--amber-primary);
}

.card-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   6. SETUP FORM SECTION
   -------------------------------------------------------------------------- */
.setup-card {
    max-width: 780px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.form-group label i {
    color: var(--amber-primary);
    margin-right: 0.3rem;
}

.required {
    color: var(--danger-color);
}

.form-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    background-color: var(--bg-card-header);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--amber-primary);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 4px var(--amber-light);
}

/* Reading Mode Selection */
.reading-mode-section h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.mode-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.btn-mode {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    background: var(--bg-card-subtle);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-mode:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-light-mode:hover, .btn-light-mode.active {
    border-color: var(--amber-primary);
    background: var(--amber-subtle);
}

.btn-deep-mode:hover, .btn-deep-mode.active {
    border-color: var(--deep-accent);
    background: #FFF7ED;
}

.mode-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.btn-light-mode .mode-icon {
    background: var(--amber-light);
    color: var(--amber-primary);
}

.btn-deep-mode .mode-icon {
    background: var(--deep-light);
    color: var(--deep-accent);
}

.mode-details {
    flex: 1;
}

.mode-title {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.mode-time {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--amber-hover);
}

.mode-desc {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.mode-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

.btn-light-mode .mode-badge {
    background: var(--amber-light);
    color: var(--amber-hover);
}

.btn-deep-mode .mode-badge {
    background: var(--deep-light);
    color: var(--deep-accent);
}

/* --------------------------------------------------------------------------
   7. ACTIVE TIMER GRID LAYOUT
   -------------------------------------------------------------------------- */
.active-timer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
    align-items: start;
}

/* Timer Card Left Side */
.timer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 1rem;
    background: var(--amber-light);
    color: var(--amber-hover);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.timer-display-container {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 0 auto 1.5rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.3s linear;
}

.timer-text-content {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.timer-clock {
    font-family: var(--font-heading);
    font-size: 3.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1;
}

.timer-subtext {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 0.4rem;
}

/* Active Book Metadata Display */
.active-book-info {
    width: 100%;
    background: var(--bg-card-header);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.active-book-info h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    word-break: break-word;
}

.book-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-value.highlight {
    color: var(--amber-primary);
}

/* Controls */
.timer-controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-danger.btn-stop {
    width: 100%;
    padding: 0.95rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-light);
    background: linear-gradient(135deg, #EF4444, #DC2626);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-danger.btn-stop:hover {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    transform: translateY(-2px);
}

.btn-danger.btn-stop:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.attempt-counter {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

/* --------------------------------------------------------------------------
   8. AI FOCUS MONITORING CARD RIGHT SIDE
   -------------------------------------------------------------------------- */
.ai-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.live-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--danger-color);
    background: var(--danger-light);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.live-tag i {
    font-size: 0.5rem;
    animation: pulseDot 1s infinite;
}

/* Webcam Container */
.webcam-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #1E1B18;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

#webcamVideo, #webcamCanvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.focus-overlay-badge {
    position: absolute;
    bottom: 0.85rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

.focus-overlay-badge.focus-ok {
    background: rgba(5, 150, 105, 0.9);
    color: #FFFFFF;
}

.focus-overlay-badge.focus-alert {
    background: rgba(220, 38, 38, 0.95);
    color: #FFFFFF;
    animation: pulseAlert 0.8s infinite alternate;
}

/* Distraction Meter */
.meter-section {
    background: var(--bg-card-header);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.meter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.meter-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.meter-value {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    color: var(--amber-primary);
}

.meter-bar-container {
    position: relative;
    width: 100%;
    height: 14px;
    background: #E5DEC9;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.meter-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--amber-primary), var(--danger-color));
    border-radius: var(--radius-full);
    transition: width 0.2s ease-out;
}

.meter-threshold-line {
    position: absolute;
    left: 60%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #000;
    z-index: 2;
}

.threshold-label {
    position: absolute;
    top: -16px;
    left: -10px;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-primary);
}

.meter-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
}

/* Teachable Machine Class Predictions */
.class-predictions-container h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.class-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.class-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.class-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
}

.class-bar-bg {
    width: 100%;
    height: 8px;
    background: var(--bg-card-header);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.class-bar-fill {
    height: 100%;
    background: var(--amber-primary);
    border-radius: var(--radius-full);
    transition: width 0.2s ease-out;
}

/* --------------------------------------------------------------------------
   9. MODAL TANTANGAN MATEMATIKA
   -------------------------------------------------------------------------- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 36, 32, 0.65);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.25s ease;
}

.modal-box {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    background: var(--bg-card-header);
    padding: 1.75rem 1.75rem 1.25rem 1.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 0.85rem auto;
}

.modal-icon.warning {
    background: var(--amber-light);
    color: var(--amber-primary);
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.modal-header p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.modal-body {
    padding: 1.75rem;
}

.math-question-box {
    background: var(--amber-subtle);
    border: 2px dashed var(--amber-primary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 1.25rem;
}

.math-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.math-expression {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.math-rules-box {
    background: var(--bg-card-header);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.math-rules-box ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.math-rules-box li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.math-rules-box li i {
    color: var(--amber-primary);
    width: 14px;
}

.modal-actions {
    display: flex;
    gap: 0.85rem;
}

.btn {
    padding: 0.8rem 1.25rem;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--amber-primary);
    color: var(--text-light);
    flex: 1;
}

.btn-primary:hover {
    background: var(--amber-hover);
}

.btn-secondary {
    background: var(--bg-card-header);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-outline-sm {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    border-radius: var(--radius-full);
}

.btn-outline-sm:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--amber-primary);
}

/* --------------------------------------------------------------------------
   10. FOOTER
   -------------------------------------------------------------------------- */
.app-footer {
    border-top: 1px solid var(--border-color);
    background: rgba(253, 251, 247, 0.9);
    padding: 1.25rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   11. KEYFRAME ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseDot {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

@keyframes pulseAlert {
    from { transform: translateX(-50%) scale(1); }
    to { transform: translateX(-50%) scale(1.06); }
}

@keyframes shakeError {
    0%, 100% { transform: translateX(-50%); }
    20%, 60% { transform: translateX(-58%); }
    40%, 80% { transform: translateX(-42%); }
}

/* --------------------------------------------------------------------------
   12. MEDIA QUERIES (RESPONSIVE)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .active-timer-grid {
        grid-template-columns: 1fr;
    }
    
    .setup-card {
        padding: 1.5rem;
    }
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }

    .mode-buttons-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .timer-clock {
        font-size: 2.75rem;
    }

    .timer-display-container {
        width: 220px;
        height: 220px;
    }

    .progress-ring {
        width: 220px;
        height: 220px;
    }

    .progress-ring circle {
        r: 95;
        cx: 110;
        cy: 110;
        stroke-dasharray: 596.9;
    }
}
