/* ========================================
   Phrasal Verbs Lab - Set 01 (MAXIMUM POP VERSION)
   Â© Cool English 2026
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Teal/Blue focused palette */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    
    /* Primary - Teal */
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    
    /* Accent - Blue */
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    
    --emerald-500: #10b981;
    
    /* Shadows - MAXIMUM for depth */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.15), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.15), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.18), 0 8px 10px -6px rgba(0,0,0,0.15);
    
    /* Card shadows - colored accent */
    --card-shadow: 0 4px 14px rgba(0,0,0,0.12);
    --card-shadow-hover: 0 14px 28px rgba(0,0,0,0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* DARKER tinted background for maximum contrast */
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 50%, #ddd6fe 100%);
    color: var(--slate-800);
    min-height: 100vh;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   Header
   ======================================== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 3rem;
    background: white;
    border-bottom: 2px solid var(--slate-200);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.logo {
    width: 4rem;
    height: 4rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg);
}

.title-group {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.main-title {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--slate-800);
}

.main-title .accent {
    color: var(--teal-600);
}

.set-badge {
    background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Progress */
.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--slate-50);
    padding: 0.875rem 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--slate-200);
}

.progress-label {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.progress-dots {
    display: flex;
    gap: 0.5rem;
}

.progress-dot {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: var(--slate-300);
    transition: all 0.3s ease;
}

.progress-dot.completed {
    background: var(--emerald-500);
}

.progress-count {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--emerald-500);
}

/* PDF Button */
.btn-pdf {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--teal-600);
    color: white;
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: 0.875rem;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-lg);
}

.btn-pdf:hover {
    background: var(--teal-700);
    transform: scale(1.03);
    box-shadow: var(--shadow-xl);
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    flex: 1;
    padding: 1.5rem 3rem;
    display: flex;
    flex-direction: column;
}

.instruction {
    text-align: center;
    font-size: 1.625rem;
    color: var(--slate-700);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* ========================================
   Activities Grid
   ======================================== */
.activities-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.25rem;
}

/* Activity Card - MAXIMUM POP VERSION */
.activity-card {
    position: relative;
    border-radius: 1.25rem;
    /* THICK borders for maximum definition */
    border: 4px solid;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    /* Strong shadow for depth */
    box-shadow: var(--card-shadow), inset 0 2px 0 rgba(255,255,255,0.7);
}

.activity-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: var(--card-shadow-hover);
}

.activity-card:hover .card-icon {
    transform: scale(1.12);
}

/* Completion Check */
.card-check {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--emerald-500);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.card-check.visible {
    opacity: 1;
    transform: scale(1);
}

.card-check svg {
    color: white;
    width: 1.5rem;
    height: 1.5rem;
}

/* Card Icon */
.card-icon {
    width: 6.5rem;
    height: 6.5rem;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-xl), 0 0 0 3px rgba(255,255,255,0.5);
    transition: transform 0.2s ease;
}

.card-icon svg {
    width: 3.5rem;
    height: 3.5rem;
    color: white;
    stroke-width: 2;
}

/* Card Text - LARGER for classroom visibility */
.card-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--slate-800);
    text-align: center;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.card-subtitle {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--slate-600);
    text-align: center;
}

/* ========================================
   Card Color Themes - MAXIMUM POP
   ======================================== */

/* 1 - Amber/Orange - MAXIMUM */
.card-amber {
    background: linear-gradient(145deg, #fef3c7 0%, #fde68a 40%, #fcd34d 100%);
    border-color: #d97706;
}
.card-amber:hover { border-color: #b45309; background: linear-gradient(145deg, #fde68a 0%, #fcd34d 100%); }
.card-amber .card-icon { background: linear-gradient(135deg, #f59e0b, #c2410c); }

/* 2 - Teal - MAXIMUM */
.card-teal {
    background: linear-gradient(145deg, #ccfbf1 0%, #99f6e4 40%, #5eead4 100%);
    border-color: #0d9488;
}
.card-teal:hover { border-color: #0f766e; background: linear-gradient(145deg, #99f6e4 0%, #5eead4 100%); }
.card-teal .card-icon { background: linear-gradient(135deg, #14b8a6, #065f56); }

/* 3 - Emerald/Green - MAXIMUM */
.card-emerald {
    background: linear-gradient(145deg, #d1fae5 0%, #a7f3d0 40%, #6ee7b7 100%);
    border-color: #059669;
}
.card-emerald:hover { border-color: #047857; background: linear-gradient(145deg, #a7f3d0 0%, #6ee7b7 100%); }
.card-emerald .card-icon { background: linear-gradient(135deg, #10b981, #065f46); }

/* 4 - Blue - MAXIMUM */
.card-blue {
    background: linear-gradient(145deg, #dbeafe 0%, #bfdbfe 40%, #93c5fd 100%);
    border-color: #2563eb;
}
.card-blue:hover { border-color: #1d4ed8; background: linear-gradient(145deg, #bfdbfe 0%, #93c5fd 100%); }
.card-blue .card-icon { background: linear-gradient(135deg, #3b82f6, #1e40af); }

/* 5 - Sky Blue - MAXIMUM */
.card-sky {
    background: linear-gradient(145deg, #e0f2fe 0%, #bae6fd 40%, #7dd3fc 100%);
    border-color: #0284c7;
}
.card-sky:hover { border-color: #0369a1; background: linear-gradient(145deg, #bae6fd 0%, #7dd3fc 100%); }
.card-sky .card-icon { background: linear-gradient(135deg, #0ea5e9, #075985); }

/* 6 - Cyan - MAXIMUM */
.card-cyan {
    background: linear-gradient(145deg, #cffafe 0%, #a5f3fc 40%, #67e8f9 100%);
    border-color: #0891b2;
}
.card-cyan:hover { border-color: #0e7490; background: linear-gradient(145deg, #a5f3fc 0%, #67e8f9 100%); }
.card-cyan .card-icon { background: linear-gradient(135deg, #06b6d4, #155e75); }

/* 7 - Indigo - MAXIMUM */
.card-indigo {
    background: linear-gradient(145deg, #e0e7ff 0%, #c7d2fe 40%, #a5b4fc 100%);
    border-color: #4f46e5;
}
.card-indigo:hover { border-color: #4338ca; background: linear-gradient(145deg, #c7d2fe 0%, #a5b4fc 100%); }
.card-indigo .card-icon { background: linear-gradient(135deg, #6366f1, #3730a3); }

/* 8 - Rose/Coral - MAXIMUM */
.card-rose {
    background: linear-gradient(145deg, #ffe4e6 0%, #fecdd3 40%, #fda4af 100%);
    border-color: #e11d48;
}
.card-rose:hover { border-color: #be123c; background: linear-gradient(145deg, #fecdd3 0%, #fda4af 100%); }
.card-rose .card-icon { background: linear-gradient(135deg, #f43f5e, #9f1239); }

/* 9 - Orange - MAXIMUM */
.card-orange {
    background: linear-gradient(145deg, #ffedd5 0%, #fed7aa 40%, #fdba74 100%);
    border-color: #ea580c;
}
.card-orange:hover { border-color: #c2410c; background: linear-gradient(145deg, #fed7aa 0%, #fdba74 100%); }
.card-orange .card-icon { background: linear-gradient(135deg, #f97316, #9a3412); }

/* 10 - Yellow/Gold - MAXIMUM */
.card-yellow {
    background: linear-gradient(145deg, #fef9c3 0%, #fef08a 40%, #fde047 100%);
    border-color: #ca8a04;
}
.card-yellow:hover { border-color: #a16207; background: linear-gradient(145deg, #fef08a 0%, #fde047 100%); }
.card-yellow .card-icon { background: linear-gradient(135deg, #eab308, #854d0e); }

/* 11 - Sunset - MAXIMUM */
.card-sunset {
    background: linear-gradient(145deg, #FFE4CC 0%, #FFD4B3 40%, #FFC299 100%);
    border-color: #C56A42;
}
.card-sunset:hover { border-color: #A85232; background: linear-gradient(145deg, #FFD4B3 0%, #FFC299 100%); }
.card-sunset .card-icon { background: linear-gradient(135deg, #E07A4F, #8B4513); }

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 1rem 3rem;
    background: white;
    border-top: 2px solid var(--slate-200);
}

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

.footer p {
    font-size: 1.25rem;
    color: var(--slate-400);
    font-weight: 500;
}

.btn-reset {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--slate-400);
    border: 2px solid var(--slate-200);
    padding: 0.5rem 1.25rem;
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reset:hover {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fef2f2;
}

.btn-reset:active {
    transform: scale(0.97);
}

/* Reset confirmation overlay */
.reset-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.reset-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.reset-dialog {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.reset-overlay.visible .reset-dialog {
    transform: scale(1);
}

.reset-dialog-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: #fef2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: #dc2626;
}

.reset-dialog-icon svg {
    width: 2rem;
    height: 2rem;
}

.reset-dialog h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--slate-800);
    margin-bottom: 0.75rem;
}

.reset-dialog p {
    font-size: 1.125rem;
    color: var(--slate-500);
    line-height: 1.5;
    margin-bottom: 2rem;
}

.reset-dialog-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.reset-dialog-buttons button {
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.btn-cancel {
    background: var(--slate-100);
    color: var(--slate-600);
    border-color: var(--slate-200);
}

.btn-cancel:hover {
    background: var(--slate-200);
}

.btn-confirm-reset {
    background: #dc2626;
    color: white;
}

.btn-confirm-reset:hover {
    background: #b91c1c;
    transform: scale(1.03);
}

/* ========================================
   Responsive Design
   ======================================== */

/* Large screens - slight adjustments */
@media (max-width: 1400px) {
    .activities-grid {
        gap: 1rem;
    }
    
    .card-title {
        font-size: 1.625rem;
    }
    
    .card-subtitle {
        font-size: 1.125rem;
    }
    
    .card-icon {
        width: 5.5rem;
        height: 5.5rem;
    }
    
    .card-icon svg {
        width: 2.75rem;
        height: 2.75rem;
    }
}

/* Tablet Landscape */
@media (max-width: 1200px) {
    .header {
        padding: 1rem 2rem;
    }
    
    .main-content {
        padding: 1rem 2rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .set-badge {
        font-size: 0.875rem;
        padding: 0.375rem 0.875rem;
    }
    
    .progress-label {
        display: none;
    }
    
    .btn-pdf span {
        display: none;
    }
    
    .btn-pdf {
        padding: 0.75rem;
    }
}

/* Tablet Portrait */
@media (max-width: 1024px) {
    .activities-grid {
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .card-subtitle {
        font-size: 0.95rem;
    }
    
    .card-icon {
        width: 4rem;
        height: 4rem;
        margin-bottom: 0.75rem;
    }
    
    .card-icon svg {
        width: 2rem;
        height: 2rem;
    }
    
    .activity-card {
        padding: 1rem;
        border-radius: 1rem;
        border-width: 3px;
    }
}

/* Small Tablet / Large Phone */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1.5rem;
    }
    
    .header-left {
        width: 100%;
        justify-content: center;
    }
    
    .header-right {
        width: 100%;
        justify-content: center;
    }
    
    .main-content {
        padding: 1rem 1.5rem;
    }
    
    .instruction {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    /* 2 rows of 5 -> 5 rows of 2 for better mobile viewing */
    .activities-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(5, 1fr);
        gap: 0.75rem;
    }
    
    .card-title {
        font-size: 1.375rem;
    }
    
    .card-subtitle {
        font-size: 1rem;
    }
    
    .card-icon {
        width: 4.5rem;
        height: 4.5rem;
        margin-bottom: 0.75rem;
    }
    
    .card-icon svg {
        width: 2.25rem;
        height: 2.25rem;
    }
    
    .activity-card {
        padding: 1.25rem 1rem;
    }
    
    .card-check {
        width: 2rem;
        height: 2rem;
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .card-check svg {
        width: 1.125rem;
        height: 1.125rem;
    }
    
    .footer p {
        font-size: 1rem;
    }
    
    .footer {
        padding: 1rem 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-reset {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

/* Mobile Phone */
@media (max-width: 480px) {
    .header {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }
    
    .logo {
        width: 3rem;
        height: 3rem;
        border-radius: 0.625rem;
    }
    
    .logo svg {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .title-group {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }
    
    .main-title {
        font-size: 1.5rem;
    }
    
    .set-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.625rem;
    }
    
    .progress-container {
        padding: 0.5rem 0.875rem;
        gap: 0.5rem;
    }
    
    .progress-dot {
        width: 0.875rem;
        height: 0.875rem;
    }
    
    .progress-count {
        font-size: 1.125rem;
    }
    
    .btn-pdf {
        padding: 0.625rem;
        border-radius: 0.625rem;
    }
    
    .btn-pdf svg {
        width: 20px;
        height: 20px;
    }
    
    .main-content {
        padding: 0.875rem 1rem;
    }
    
    .instruction {
        font-size: 1.125rem;
        margin-bottom: 0.875rem;
    }
    
    .activities-grid {
        gap: 0.625rem;
    }
    
    .activity-card {
        padding: 1rem 0.75rem;
        border-radius: 0.875rem;
        border-width: 3px;
    }
    
    .card-icon {
        width: 3.5rem;
        height: 3.5rem;
        border-radius: 0.75rem;
        margin-bottom: 0.625rem;
    }
    
    .card-icon svg {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .card-title {
        font-size: 1.125rem;
        margin-bottom: 0.25rem;
    }
    
    .card-subtitle {
        font-size: 0.875rem;
    }
    
    .card-check {
        width: 1.75rem;
        height: 1.75rem;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .card-check svg {
        width: 1rem;
        height: 1rem;
    }
    
    .footer {
        padding: 0.75rem 1rem;
    }
    
    .footer p {
        font-size: 0.875rem;
    }
    
    .btn-reset {
        font-size: 0.8125rem;
        padding: 0.375rem 0.875rem;
        gap: 0.375rem;
    }
    
    .btn-reset svg {
        width: 14px;
        height: 14px;
    }
}

/* ========================================
   V4 RESPONSIVE CLIP/SCROLL SAFETY PATCH
   Same principle as Definitions V4:
   shrink first, then scroll the real content area instead of clipping.
   This patch is intentionally last so it wins the cascade.
   ======================================== */
/* Menu page: this one was not dangerously locked, but this preserves scrolling
   and compresses the activity grid on short teacher/projector screens. */
@media (min-width: 900px) {
    html,
    body {
        min-height: 100dvh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .app {
        min-height: 100dvh;
    }

    .main-content {
        min-height: 0;
        overflow: visible;
    }

    .activities-grid {
        min-height: 0;
    }

    .header,
    .footer {
        flex-shrink: 0;
    }
}

@media (min-width: 900px) and (max-height: 1100px) {
    .header {
        padding-top: clamp(0.75rem, 1.15vh, 1.15rem);
        padding-bottom: clamp(0.75rem, 1.15vh, 1.15rem);
    }

    .main-content {
        padding-top: clamp(0.8rem, 1.35vh, 1.25rem);
        padding-bottom: clamp(0.8rem, 1.35vh, 1.25rem);
    }

    .activities-grid {
        gap: clamp(0.75rem, 1vw, 1.15rem);
    }

    .activity-card {
        padding: clamp(1rem, 1.6vh, 1.4rem);
    }

    .card-title {
        font-size: clamp(1.15rem, 2.4vh, 1.65rem);
        line-height: 1.05;
    }

    .card-subtitle {
        font-size: clamp(0.8rem, 1.5vh, 0.95rem);
        line-height: 1.25;
    }

    .footer {
        padding-top: clamp(0.55rem, 0.9vh, 0.8rem);
        padding-bottom: clamp(0.55rem, 0.9vh, 0.8rem);
    }
}

@media (min-width: 900px) and (max-height: 820px) {
    .main-content {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .activities-grid {
        gap: 0.75rem;
    }

    .activity-card {
        padding: 0.9rem;
    }
}

@media (min-width: 900px) and (max-height: 720px) {
    .card-title {
        font-size: 1.1rem;
    }

    .card-subtitle {
        font-size: 0.78rem;
    }
}
