/* ================================================
   Yt Anak - Kids YouTube Player
   Custom Stylesheet
   ================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Fredoka+One&display=swap');

/* --- CSS Variables --- */
:root {
    /* Primary Colors - Kid Friendly */
    --color-primary: #4FC3F7;
    --color-primary-dark: #0288D1;
    --color-primary-light: #B3E5FC;
    
    /* Accent Colors */
    --color-yellow: #FFD54F;
    --color-yellow-dark: #FFC107;
    --color-green: #81C784;
    --color-green-dark: #4CAF50;
    --color-pink: #F48FB1;
    --color-pink-dark: #E91E63;
    --color-purple: #CE93D8;
    --color-orange: #FFB74D;
    --color-red: #EF5350;
    
    /* Backgrounds */
    --bg-gradient-start: #E3F2FD;
    --bg-gradient-end: #E8F5E9;
    --bg-card: #FFFFFF;
    --bg-dark: #1A237E;
    
    /* Text */
    --text-primary: #263238;
    --text-secondary: #546E7A;
    --text-white: #FFFFFF;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --shadow-glow: 0 0 20px rgba(79, 195, 247, 0.4);
    
    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 50%;
    
    /* Fonts */
    --font-main: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Fredoka One', cursive;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 50%, #FFF3E0 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* --- Animations --- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateX(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes zzz {
    0% { opacity: 0; transform: translateY(0) scale(0.5); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-40px) scale(1.2); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* --- Background Decorations --- */
.bg-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: float 6s ease-in-out infinite;
}

.bg-bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    background: var(--color-yellow);
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.bg-bubble:nth-child(2) {
    width: 120px;
    height: 120px;
    background: var(--color-pink);
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.bg-bubble:nth-child(3) {
    width: 60px;
    height: 60px;
    background: var(--color-green);
    bottom: 20%;
    left: 15%;
    animation-delay: 4s;
}

.bg-bubble:nth-child(4) {
    width: 100px;
    height: 100px;
    background: var(--color-purple);
    top: 30%;
    right: 25%;
    animation-delay: 1s;
}

.bg-bubble:nth-child(5) {
    width: 50px;
    height: 50px;
    background: var(--color-orange);
    bottom: 40%;
    right: 5%;
    animation-delay: 3s;
}

/* --- Header / Navbar --- */
.kids-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, #29B6F6 50%, var(--color-green) 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.kids-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kids-header .logo-icon {
    width: 48px;
    height: 48px;
    background: var(--color-yellow);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-sm);
    animation: pulse 3s ease-in-out infinite;
}

.kids-header .logo-text {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--text-white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

.kids-header .logo-text span {
    color: var(--color-yellow);
}

/* Hidden parent access button area */
.parent-access {
    width: 48px;
    height: 48px;
    cursor: default;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    position: relative;
}

.parent-access::after {
    content: '⚙️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    opacity: 0.15;
    pointer-events: none;
}

/* --- Screen Time Banner --- */
.time-banner {
    background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(255,255,255,0.9));
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-bottom: 2px solid var(--color-primary-light);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.time-banner .time-icon {
    font-size: 1.2rem;
}

.time-bar {
    flex: 1;
    max-width: 200px;
    height: 8px;
    background: #E0E0E0;
    border-radius: 10px;
    overflow: hidden;
}

.time-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-green), var(--color-yellow));
    border-radius: 10px;
    transition: width var(--transition-normal);
}

.time-bar-fill.warning {
    background: linear-gradient(90deg, var(--color-yellow), var(--color-orange));
}

.time-bar-fill.danger {
    background: linear-gradient(90deg, var(--color-orange), var(--color-red));
}

.time-text {
    font-weight: 700;
    color: var(--color-primary-dark);
    min-width: 70px;
    text-align: right;
}

/* --- Video Grid --- */
.video-grid-container {
    padding: 16px;
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-left: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .emoji {
    font-size: 1.6rem;
    animation: float 3s ease-in-out infinite;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* --- Video Card --- */
.video-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    animation: slideUp 0.5s ease forwards;
    opacity: 0;
    position: relative;
}

.video-card:hover, .video-card:active {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.video-card:active {
    transform: translateY(-2px) scale(0.98);
}

.video-card .thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
    background: var(--color-primary-light);
}

.video-card .thumbnail-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.video-card:hover .thumbnail-wrapper img {
    transform: scale(1.08);
}

.video-card .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.video-card:hover .play-overlay,
.video-card:active .play-overlay {
    opacity: 1;
}

.play-btn {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.95);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast);
}

.play-btn::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 22px;
    border-color: transparent transparent transparent var(--color-primary-dark);
    margin-left: 4px;
}

.video-card:hover .play-btn {
    transform: scale(1.1);
}

.video-card .video-title {
    padding: 12px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animation delays for grid items */
.video-card:nth-child(1) { animation-delay: 0.05s; }
.video-card:nth-child(2) { animation-delay: 0.1s; }
.video-card:nth-child(3) { animation-delay: 0.15s; }
.video-card:nth-child(4) { animation-delay: 0.2s; }
.video-card:nth-child(5) { animation-delay: 0.25s; }
.video-card:nth-child(6) { animation-delay: 0.3s; }
.video-card:nth-child(7) { animation-delay: 0.35s; }
.video-card:nth-child(8) { animation-delay: 0.4s; }

/* --- Loading State --- */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    gap: 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    border: 5px solid var(--color-primary-light);
    border-top-color: var(--color-primary);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--color-primary-dark);
    animation: pulse 1.5s ease-in-out infinite;
}

/* --- Error / Offline State --- */
.error-container, .offline-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    padding: 40px 20px;
    gap: 16px;
}

.error-icon, .offline-icon {
    font-size: 5rem;
    animation: bounceIn 0.8s ease;
}

.error-title, .offline-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
}

.error-desc, .offline-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 300px;
}

.retry-btn {
    margin-top: 16px;
    padding: 14px 36px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.retry-btn:active {
    transform: translateY(0);
}

/* --- Player Page --- */
.player-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
}

.player-container #yt-player {
    width: 100%;
    height: 100%;
}

.player-back-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: var(--radius-full);
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 1001;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    opacity: 0;
}

.player-container:hover .player-back-btn,
.player-back-btn:focus {
    opacity: 1;
}

.player-back-btn:hover {
    transform: scale(1.1);
    background: var(--text-white);
}

/* --- Time Limit Overlay --- */
.time-limit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1A237E 0%, #283593 50%, #311B92 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    gap: 20px;
}

.time-limit-overlay .sleep-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    animation: float 3s ease-in-out infinite;
}

.time-limit-overlay .zzz {
    font-size: 2rem;
    color: var(--color-yellow);
    position: absolute;
    animation: zzz 2s ease-in-out infinite;
}

.time-limit-overlay .zzz:nth-child(2) {
    animation-delay: 0.5s;
    font-size: 1.5rem;
}

.time-limit-overlay .zzz:nth-child(3) {
    animation-delay: 1s;
    font-size: 1rem;
}

.time-limit-overlay h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-yellow);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.time-limit-overlay p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    max-width: 400px;
}

.time-limit-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    color: var(--color-yellow);
    font-size: 1rem;
    animation: twinkle 2s ease-in-out infinite;
}

/* --- Login Page --- */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: slideUp 0.5s ease;
}

.login-card .lock-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    animation: bounceIn 0.8s ease;
}

.login-card h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-card .subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 0.9rem;
}

.pin-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
}

.pin-input {
    width: 48px;
    height: 56px;
    border: 2px solid #E0E0E0;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-main);
    outline: none;
    transition: all var(--transition-fast);
    -webkit-appearance: none;
}

.pin-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
    transform: scale(1.05);
}

.pin-input.error {
    border-color: var(--color-red);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.login-btn {
    width: 100%;
    padding: 16px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-error {
    color: var(--color-red);
    font-weight: 600;
    margin-top: 16px;
    font-size: 0.9rem;
    display: none;
}

.login-error.show {
    display: block;
    animation: slideUp 0.3s ease;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--color-primary-dark);
}

/* --- Dashboard --- */
.dashboard-header {
    background: linear-gradient(135deg, #1A237E 0%, #283593 100%);
    padding: 20px;
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-header h1 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-actions {
    display: flex;
    gap: 10px;
}

.dash-btn {
    padding: 10px 20px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dash-btn-primary {
    background: var(--color-primary);
    color: var(--text-white);
}

.dash-btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.dash-btn-danger {
    background: rgba(255,255,255,0.15);
    color: var(--text-white);
    border: 1px solid rgba(255,255,255,0.3);
}

.dash-btn-danger:hover {
    background: rgba(255,255,255,0.25);
}

.dashboard-content {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* --- Metric Cards --- */
.metric-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    animation: slideUp 0.5s ease forwards;
    opacity: 0;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.metric-card:nth-child(1)::before {
    background: linear-gradient(90deg, var(--color-primary), var(--color-green));
}
.metric-card:nth-child(1) { animation-delay: 0.1s; }

.metric-card:nth-child(2)::before {
    background: linear-gradient(90deg, var(--color-yellow), var(--color-orange));
}
.metric-card:nth-child(2) { animation-delay: 0.2s; }

.metric-card:nth-child(3)::before {
    background: linear-gradient(90deg, var(--color-pink), var(--color-purple));
}
.metric-card:nth-child(3) { animation-delay: 0.3s; }

.metric-card .metric-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.metric-card .metric-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metric-card .metric-value {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--text-primary);
}

.metric-card .metric-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Progress Ring */
.progress-ring-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.progress-ring {
    width: 80px;
    height: 80px;
    position: relative;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring circle {
    fill: none;
    stroke-width: 6;
}

.progress-ring .bg {
    stroke: #E0E0E0;
}

.progress-ring .progress {
    stroke: var(--color-primary);
    stroke-linecap: round;
    transition: stroke-dashoffset var(--transition-slow);
}

.progress-ring .percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* --- Chart Container --- */
.chart-container {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    animation: slideUp 0.5s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.chart-container h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Simple bar chart */
.simple-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 150px;
    padding: 0 10px;
}

.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.chart-bar {
    width: 100%;
    max-width: 40px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-primary-light));
    border-radius: 6px 6px 0 0;
    transition: height var(--transition-slow);
    position: relative;
    margin-top: auto;
    min-height: 4px;
}

.chart-bar:hover {
    background: linear-gradient(180deg, var(--color-primary-dark), var(--color-primary));
}

.chart-bar-value {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.chart-bar-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* --- No API Key Warning --- */
.api-warning {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    border: 2px solid var(--color-orange);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 20px;
    text-align: center;
    animation: slideUp 0.5s ease;
}

.api-warning .warning-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.api-warning h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.api-warning p {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.api-warning code {
    background: rgba(0,0,0,0.08);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* --- Responsive --- */
@media (min-width: 480px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .kids-header {
        padding: 16px 32px;
    }
    
    .video-grid-container {
        padding: 24px 32px;
    }
}

@media (min-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* --- Utility Classes --- */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}
/* --- Header Actions --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.4);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.about-btn:hover {
    background: white;
    color: var(--color-primary-dark);
    transform: rotate(15deg) scale(1.1);
}

/* --- Modal Style --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
}

.modal-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 48px 32px 32px;
    max-width: 400px;
    width: 100%;
    position: relative;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: bounceIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-close {
    position: absolute;
    top: 20px; right: 24px;
    background: #f5f5f5; border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 24px; color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #eee;
    color: var(--color-red);
    transform: rotate(90deg);
}

.developer-avatar {
    font-size: 64px;
    margin-bottom: 20px;
    background: #E3F2FD;
    width: 110px; height: 110px;
    line-height: 110px;
    border-radius: 50%;
    margin: 0 auto 24px;
    border: 4px solid #BBDEFB;
    box-shadow: var(--shadow-sm);
}

.dev-name {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.dev-role {
    color: var(--color-primary-dark);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.app-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 24px 0;
}

.dev-links {
    margin-top: 20px;
}
