/* ==========================================================================
    1. ROOT VARIABLES & THEMES
    ========================================================================== */
:root {
    --brand-red-rgb: 220, 38, 38; /* #DC2626 */
    --brand-red: rgb(var(--brand-red-rgb));
    --brand-red-dark: #B91C1C;
    --brand-black: #000000;
    --brand-white: #F9FAFB;
    
    --bg-primary: #000000;
    --bg-secondary: #111111;
    --bg-tertiary: #0a0a0a;
    
    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-muted: #9CA3AF;
    --border-color: #333333;
    
    --agency-bg: #050b14;
    --agency-panel: #0f172a;
    --agency-card: #1e293b;
    --agency-border: #334155;
    --agency-accent: #38bdf8;
}

html.theme-light {
    --brand-red-rgb: 59, 130, 246; 
    --brand-red: rgb(var(--brand-red-rgb));
    --brand-red-dark: #2563EB; 
    --brand-white: #111827; 
    --bg-primary: #F9FAFB; 
    --bg-secondary: #FFFFFF; 
    --bg-tertiary: #E5E7EB; 
    --text-primary: #1F2937; 
    --text-secondary: #374151; 
    --text-muted: #6B7280; 
    --border-color: #D1D5DB; 
}

html.theme-blue { --brand-red-rgb: 59, 130, 246; --brand-red-dark: #2563EB; }
html.theme-green { --brand-red-rgb: 34, 197, 94; --brand-red-dark: #16A34A; }

html.font-large { font-size: 110%; }
html.font-xlarge { font-size: 120%; }

html.high-contrast body, html.high-contrast .bg-gray-900, html.high-contrast .header-scrolled, html.high-contrast .team-front, html.high-contrast .team-back, html.high-contrast .service-card, html.high-contrast .modal-content, html.high-contrast .form-input, html.high-contrast .stat-box:hover {
    background-color: #000000 !important; color: #FFFFFF !important;
}
html.high-contrast .text-brand-red { color: #FFFF00 !important; }
html.high-contrast .btn-primary, html.high-contrast .agency-prestige-btn, html.high-contrast .work-badge, html.high-contrast .setting-btn.active {
    background-color: #FFFF00 !important; color: #000000 !important;
}

/* ==========================================================================
    2. BASE RESETS & TYPOGRAPHY
    ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', sans-serif; background-color: var(--bg-primary); 
    color: var(--text-primary); line-height: 1.6; overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button, input, textarea { font-family: inherit; outline: none; }
img { max-width: 100%; height: auto; display: block; }

/* Accessibility Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand-red);
    color: white;
    padding: 10px 20px;
    z-index: 99999;
    border-radius: 0 0 0.5rem 0.5rem;
    font-weight: bold;
    transition: top 0.3s;
}
.skip-link:focus { top: 0; }

/* ==========================================================================
    3. LAYOUT & UTILITIES
    ========================================================================== */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 56rem; }

.section-dark { background-color: transparent; padding: 5rem 0; overflow: hidden; position: relative; z-index: 10; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.relative { position: relative; }
.absolute { position: absolute; }
.hidden { display: none !important; }

.grid-3 { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 2.5rem; 
}
@media (min-width: 640px) { 
    .grid-3 { grid-template-columns: repeat(2, 1fr); } 
}
@media (min-width: 1024px) { 
    .grid-3 { grid-template-columns: repeat(3, 1fr); } 
}

.section-title { font-size: 2rem; font-weight: 700; color: var(--brand-white); margin-bottom: 1rem; }
.section-divider { width: 6rem; height: 4px; background-color: var(--brand-red); margin: 0 auto 3rem; }
.text-brand-red { color: var(--brand-red); transition: color 0.3s ease; }
.text-glow { color: var(--text-primary); font-weight: 700; text-shadow: 0 0 10px var(--brand-red), 0 0 20px var(--brand-red); }

/* --- Scroll Animation Timeline Classes --- */
.scroll-anim { opacity: 0; transition: all 1.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.anim-fade-up { transform: translateY(40px); }
.anim-slide-left { transform: translateX(-60px); }
.anim-slide-right { transform: translateX(60px); }
.anim-zoom { transform: scale(0.9); }
.anim-pop-up { transform: scale(0.85) translateY(30px); }

.anim-paper-slide { 
    transform: translateY(-150px) scale(0.95) rotateX(5deg); 
    transform-origin: top center;
    perspective: 1000px;
}

.scroll-anim.is-visible { opacity: 1; transform: translate(0) scale(1) rotateX(0); }

.fade-in-section { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in-section.is-visible { opacity: 1; transform: translateY(0); }

.glass-panel {
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(16px); 
    border: 1px solid rgba(255, 255, 255, 0.15); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    border-radius: 1rem; padding: 2.5rem;
}

/* --- Paper Panel Styling --- */
.paper-panel {
    background: #fdfbf7; 
    border-radius: 4px;
    padding: 4rem 3rem;
    position: relative;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.7), 
        0 0 20px rgba(0,0,0,0.2),
        inset 0 0 60px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
}
.paper-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 12px;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.04) 10px, rgba(0,0,0,0.04) 20px);
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}
.paper-panel .section-title { color: #0f172a; }
.paper-panel .subtitle-hero { color: #475569; }
.paper-panel .form-label { color: #334155; font-weight: 600; }
.paper-panel .form-input { 
    background-color: #ffffff; 
    border: 2px solid #cbd5e1; 
    color: #0f172a; 
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.paper-panel .form-input:focus { 
    border-color: var(--brand-red); 
    box-shadow: 0 0 0 3px rgba(var(--brand-red-rgb), 0.2); 
    background-color: #fff; 
}

/* Buttons */
.btn { display: inline-block; font-weight: 600; padding: 0.75rem 2rem; border-radius: 0.5rem; cursor: pointer; transition: all 0.3s ease; border: none; text-align: center; font-size: 1rem; color: #F9FAFB; }
.btn-primary { background-color: var(--brand-red); }
.btn-primary:hover { background-color: var(--brand-red-dark); transform: scale(1.05); box-shadow: 0 10px 15px -3px rgba(var(--brand-red-rgb), 0.3); }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary { background-color: var(--border-color); color: var(--text-primary); }
.btn-secondary:hover { background-color: #4B5563; }
.btn-full { width: 100%; display: block; }

.page-back-btn { color: var(--text-muted); font-size: 1rem; font-weight: 500; cursor: pointer; border: none; background: transparent; margin-bottom: 2rem; display: inline-flex; align-items: center; gap: 0.5rem; transition: 0.2s; }
.page-back-btn:hover { color: var(--brand-red); transform: translateX(-5px); }

#scroll-to-top { position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--brand-red); color: white; border: none; width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer; opacity: 0; visibility: hidden; transition: 0.3s; z-index: 40; box-shadow: 0 5px 15px rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; }
#scroll-to-top.show { opacity: 1; visibility: visible; }
#scroll-to-top:hover { background: var(--brand-red-dark); transform: translateY(-3px); }

/* Custom Scroll Meter */
#scroll-meter-container { position: fixed; top: 0; left: 0; width: 100%; height: 5px; background: rgba(255,255,255,0.1); z-index: 9999; }
#scroll-meter { height: 100%; background: var(--brand-red); width: 0%; transition: width 0.1s ease-out; box-shadow: 0 0 10px rgba(var(--brand-red-rgb), 0.8); }

/* Scrollers */
.scroll-wrapper { position: relative; padding: 0 1rem; }
.horizontal-scroller { display: flex; gap: 2rem; overflow-x: auto; padding: 1.5rem 0; scroll-snap-type: x mandatory; -ms-overflow-style: none; scrollbar-width: none; }
.horizontal-scroller::-webkit-scrollbar { display: none; }
.scroll-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(17, 17, 17, 0.8); border: 1px solid var(--border-color); border-radius: 50%; width: 3rem; height: 3rem; color: var(--text-primary); cursor: pointer; z-index: 10; transition: 0.2s; display: none; align-items: center; justify-content: center; }
.scroll-btn:hover { background: var(--brand-red); border-color: var(--brand-red); box-shadow: 0 0 15px rgba(var(--brand-red-rgb), 0.5); color: white; }
.scroll-left { left: 0; } .scroll-right { right: 0; }
@media (min-width: 768px) { .scroll-btn { display: flex; } .scroll-left { left: -0.5rem; } .scroll-right { right: -0.5rem; } }

/* Seamless Marquee Banner */
.marquee-container { 
    width: 110%; 
    margin-left: -5%;
    transform: rotate(-3deg);
    overflow: hidden; 
    background: var(--brand-red); 
    color: white; 
    padding: 1.5rem 0; 
    position: relative; 
    z-index: 40; 
    border-top: 1px solid rgba(255,255,255,0.1); 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex; 
}
.marquee-content { 
    display: flex; 
    white-space: nowrap; 
    flex-shrink: 0; 
    animation: marquee 25s linear infinite; 
}
.marquee-item { display: inline-flex; align-items: center; font-weight: 800; font-size: 1.5rem; letter-spacing: 1px; text-transform: uppercase; }
.marquee-separator { opacity: 0.5; padding: 0 2rem; display: inline-flex; align-items: center; font-size: 1.5rem; }
@keyframes marquee { 
    0% { transform: translateX(0); } 
    100% { transform: translateX(-100%); } 
}
html.high-contrast .marquee-container { background: #FFFF00 !important; color: #000000 !important; }

/* ==========================================================================
    4. SITE SECTIONS (Main Page Components)
    ========================================================================== */

/* Header */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: all 0.3s ease; background-color: rgba(0, 0, 0, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; margin-top: 5px; }
.header-scrolled { border-bottom-color: rgba(255,255,255,0.05); box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.header-container { padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.brand-logo { display: flex; align-items: center; gap: 0.75rem; font-size: 1.5rem; font-weight: 700; color: var(--brand-white); letter-spacing: 0.05em; }
.brand-logo img { height: 2.5rem; width: 2.5rem; border-radius: 0.5rem; }
.desktop-nav { display: none; }
.desktop-nav a { color: var(--text-secondary); font-weight: 500; transition: color 0.3s ease; }
.desktop-nav a:hover { color: var(--brand-red); }
.mobile-menu-toggle { color: var(--brand-white); background: transparent; border: none; cursor: pointer; width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; }
.mobile-nav { display: none; padding: 0 1.5rem 1rem 1.5rem; background-color: rgba(0, 0, 0, 0.95); }
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; padding: 0.75rem 0; color: var(--text-secondary); border-bottom: 1px solid var(--border-color); }
@media (min-width: 768px) { .desktop-nav { display: flex; gap: 2rem; } .mobile-menu-toggle { display: none; } }

/* Hero */
.hero-section { height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; z-index: 10; }
.global-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.hero-content { position: relative; z-index: 10; padding: 0 1.5rem; }
.title-hero { font-size: 2.5rem; font-weight: 700; line-height: 1.2; color: var(--text-primary); transition: color 0.3s ease; }
.title-hero:hover { color: var(--brand-red); }
.title-hero:hover .text-brand-red { color: var(--text-primary); }
.subtitle-hero { font-size: 1.125rem; color: var(--text-secondary); margin-top: 1rem; max-width: 42rem; margin-left: auto; margin-right: auto; transition: transform 0.3s ease, color 0.3s ease; }
.subtitle-hero:hover { transform: scale(1.05); color: var(--text-primary); }
@media (min-width: 768px) { .title-hero { font-size: 4rem; } .subtitle-hero { font-size: 1.25rem; } }

/* Services & Stats (Themed Cards) */

/* Refined Service Cards with Glassmorphism */
.service-card { 
    border-radius: 1rem; 
    padding: 2.5rem 1.5rem; 
    text-align: center; 
    border-top: 4px solid var(--brand-red); 
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
    cursor: pointer; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
    border-left: 1px solid rgba(255,255,255,0.05); 
    border-right: 1px solid rgba(255,255,255,0.05); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.service-card:hover { transform: translateY(-8px); }

.theme-card-design { background: linear-gradient(145deg, rgba(17, 17, 17, 0.6), rgba(45, 27, 46, 0.6)); border-top-color: #ec4899; }
.theme-card-design:hover { box-shadow: 0 15px 35px rgba(236, 72, 153, 0.2); border-color: rgba(236, 72, 153, 0.5); }
.theme-card-design .service-icon { color: #ec4899; }

.theme-card-dev { background: linear-gradient(145deg, rgba(17, 17, 17, 0.6), rgba(30, 42, 59, 0.6)); border-top-color: #3b82f6; }
.theme-card-dev:hover { box-shadow: 0 15px 35px rgba(59, 130, 246, 0.2); border-color: rgba(59, 130, 246, 0.5); }
.theme-card-dev .service-icon { color: #3b82f6; }

.theme-card-edit { background: linear-gradient(145deg, rgba(17, 17, 17, 0.6), rgba(49, 28, 28, 0.6)); border-top-color: #ef4444; }
.theme-card-edit:hover { box-shadow: 0 15px 35px rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.5); }
.theme-card-edit .service-icon { color: #ef4444; }

.service-icon { width: 4rem; height: 4rem; margin: 0 auto 1.5rem; transition: 0.3s ease; }
.service-card:hover .service-icon { transform: scale(1.1); }

/* --- Custom SVG Illustration Styles --- */
.service-illustration {
    width: 100%;
    height: 150px;
    margin: 0 auto 1.5rem;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3));
}

.service-card:hover .service-illustration {
    transform: scale(1.08) translateY(-10px);
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.5));
}

/* SVG Internal Animation Classes */
@keyframes svgFloat {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}
@keyframes svgPulse {
    0% { opacity: 0.6; filter: brightness(1); }
    50% { opacity: 1; filter: brightness(1.3); }
    100% { opacity: 0.6; filter: brightness(1); }
}

.svg-float { animation: svgFloat 4s ease-in-out infinite; }
.svg-pulse { animation: svgPulse 3s ease-in-out infinite; }
.svg-float-delayed { animation: svgFloat 5s ease-in-out infinite 1.5s; }

/* Expandable Accordion Card Style */
.service-card-actions {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0;
}
.service-card:hover .service-card-actions {
    max-height: 150px;
    opacity: 1;
    margin-top: 1.5rem;
}
.service-action-btn {
    font-size: 0.9rem;
    padding: 0.5rem;
    width: 100%;
}

.stat-box { padding: 1.5rem; background-color: var(--bg-secondary); border-radius: 0.75rem; transition: transform 0.3s ease; border: 1px solid var(--border-color); }
.stat-box:hover { transform: translateY(-8px); box-shadow: 0 0 20px rgba(var(--brand-red-rgb), 0.3); border-color: var(--brand-red); }
.stat-number { font-size: 3rem; font-weight: 700; color: var(--brand-red); line-height: 1; }
.stat-label { color: var(--text-muted); margin-top: 0.5rem; font-weight: 500; }

/* Team Cards - Custom Scroll Split Slide Animation */
.team-card { perspective: 1000px; flex: 0 0 280px; height: 400px; scroll-snap-align: center; opacity: 0; transition: all 1.8s cubic-bezier(0.25, 1, 0.5, 1); }

.team-slide-left { transform: translate(-30vw, -50px); }
.team-slide-right { transform: translate(30vw, -50px); }

.team-card.is-visible { opacity: 1 !important; transform: translate(0, 0) !important; }

.team-inner { position: relative; width: 100%; height: 100%; transition: transform 0.8s; transform-style: preserve-3d; }
.team-card:hover .team-inner { transform: rotateY(180deg); }
.team-front, .team-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; flex-direction: column; border-radius: 0.75rem; background-color: var(--bg-secondary); overflow: hidden; border: 1px solid var(--border-color); }
.team-front img { height: 65%; object-fit: cover; }
.team-info { padding: 1rem; display: flex; flex-direction: column; justify-content: center; flex-grow: 1; text-align: center; }
.team-back { transform: rotateY(180deg); padding: 2rem 1.5rem; text-align: center; justify-content: space-between; }

/* Work / Projects */
.work-card { position: relative; flex: 0 0 350px; height: 400px; scroll-snap-align: center; border-radius: 0.75rem; overflow: hidden; cursor: pointer; border: 1px solid var(--border-color); }
.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.work-card:hover img { transform: scale(1.1); }
.work-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); display: flex; flex-direction: column; justify-content: flex-end; padding: 1.5rem; }
.work-badge { position: absolute; top: 1rem; right: 1rem; background-color: var(--brand-red); color: white; font-size: 0.75rem; font-weight: 600; padding: 0.35rem 0.75rem; border-radius: 99px; opacity: 0; transition: all 0.3s ease; transform: translateY(-10px); }
.work-card:hover .work-badge { opacity: 1; transform: translateY(0); }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; color: var(--text-secondary); margin-bottom: 0.5rem; font-weight: 500; text-align: left; }
.form-input { width: 100%; padding: 1rem; border-radius: 0.5rem; border: 2px solid var(--border-color); background-color: var(--bg-secondary); color: var(--text-primary); transition: 0.3s; }
.form-input:focus { border-color: var(--brand-red); box-shadow: 0 0 15px rgba(var(--brand-red-rgb), 0.3); }

/* ==========================================================================
    5. MODALS & SUBPAGES
    ========================================================================== */

/* Modals */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-content { background-color: var(--bg-secondary); border-radius: 1rem; padding: 2.5rem; max-width: 32rem; width: 100%; position: relative; transform: scale(0.95); transition: transform 0.3s ease; border: 1px solid var(--border-color); box-shadow: 0 20px 40px rgba(0,0,0,0.6); }
.modal-overlay.show .modal-content { transform: scale(1); }
.close-modal { position: absolute; top: 1rem; right: 1.5rem; background: transparent; border: none; color: var(--text-muted); font-size: 2.5rem; cursor: pointer; line-height: 1; transition: 0.2s; }
.close-modal:hover { color: var(--brand-red); transform: rotate(90deg); }

/* Subpages */
.page-content { padding-top: 7rem; padding-bottom: 4rem; min-height: 100vh; position: relative; overflow: hidden; background-color: var(--bg-primary); }

/* ==========================================================================
    6. GAME STYLES: CODE TYPER & AGENCY
    ========================================================================== */
.typer-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; width: 100%; max-width: 800px; margin: 0 auto; padding: 2rem; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; width: 100%; max-height: 60vh; overflow-y: auto; padding-right: 1rem; margin-top: 2rem; }
.lang-grid::-webkit-scrollbar { width: 6px; }
.lang-grid::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
.lang-btn { background: var(--bg-secondary); color: var(--text-primary); border: 2px solid var(--border-color); padding: 1rem; border-radius: 0.5rem; font-weight: 600; cursor: pointer; transition: 0.2s; font-size: 1rem; }
.lang-btn:hover { border-color: var(--brand-red); transform: translateY(-2px); }
.lang-btn.active { background: var(--brand-red); border-color: var(--brand-red); color: white; }

.diff-btn { background: var(--bg-secondary); color: var(--text-primary); border: 2px solid var(--border-color); padding: 0.5rem 1.5rem; border-radius: 0.5rem; font-weight: 600; cursor: pointer; transition: 0.2s; }
.diff-btn:hover { border-color: var(--brand-red); }
.diff-btn.active { background: var(--brand-red); border-color: var(--brand-red); color: white; }

.typer-stats { display: flex; justify-content: space-between; width: 100%; margin-bottom: 1.5rem; font-size: 1.1rem; font-weight: 600; background: var(--bg-secondary); padding: 1rem 1.5rem; border-radius: 0.5rem; border: 1px solid var(--border-color); flex-wrap: wrap; gap: 1rem; }
.typer-display { background: #0f172a; color: #4ade80; font-family: monospace; font-size: 1.1rem; padding: 1.5rem; border-radius: 0.5rem; border: 1px solid #1e293b; min-height: 120px; width: 100%; white-space: pre-wrap; line-height: 1.6; margin-bottom: 1.5rem; text-align: left; position: relative;}
.typer-display .correct { color: #4ade80; font-weight: 700; }

/* High accessibility indicator for error typing */
.typer-display .incorrect { 
    color: #ef4444; 
    background: rgba(239, 68, 68, 0.2); 
    text-decoration: underline wavy #ef4444; 
    font-weight: 700;
    border-radius: 2px; 
}
.typer-display .remaining { color: #94a3b8; }

.typer-progress-bg { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; margin-bottom: 1.5rem; overflow: hidden; }
.typer-progress-fill { height: 100%; width: 0%; background: var(--brand-red); transition: width 0.2s ease-out; }

.typer-input { width: 100%; font-family: monospace; font-size: 1.1rem; padding: 1.25rem; border-radius: 0.5rem; background: var(--bg-secondary); color: var(--text-primary); border: 2px solid var(--border-color); margin-bottom: 2rem; transition: border-color 0.2s; }
.typer-input:focus { outline: none; border-color: var(--brand-red); box-shadow: 0 0 15px rgba(var(--brand-red-rgb), 0.3); }
.typer-input.error { border-color: #ef4444; background: rgba(239, 68, 68, 0.05); }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}
.shake-anim { animation: shake 0.3s; }

.modal-fullscreen { padding: 0; }
.modal-fullscreen .modal-content { max-width: 100%; height: 100vh; max-height: 100vh; border-radius: 0; padding: 0; display: flex; flex-direction: column; background-color: var(--bg-primary); border: none; }
.modal-header { padding: 1.25rem 2rem; background-color: var(--bg-secondary); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); z-index: 10; }
.modal-body { flex-grow: 1; position: relative; display: flex; overflow: hidden; background: var(--bg-primary); }

.agency-app-wrapper { position: absolute; inset: 0; width: 100%; height: 100%; display: flex; flex-direction: column; background-color: var(--agency-bg); color: #e2e8f0; overflow: hidden; }
.agency-layout { display: flex; flex-direction: column; flex-grow: 1; height: 100%; overflow: hidden; }
@media (min-width: 1024px) { .agency-layout { flex-direction: row; } }

.agency-panel { display: flex; flex-direction: column; height: 100%; overflow-y: auto; padding: 1.5rem; background-color: var(--agency-panel); }
.agency-panel::-webkit-scrollbar { width: 6px; }
.agency-panel::-webkit-scrollbar-thumb { background: var(--agency-border); border-radius: 3px; }
.agency-panel::-webkit-scrollbar-thumb:hover { background: #475569; }

.agency-main-panel { flex: 1; background: radial-gradient(circle at top, var(--bg-secondary) 0%, var(--agency-bg) 100%); border-right: 1px solid rgba(255,255,255,0.05); position: relative; z-index: 10; }
.agency-side-panel { flex: 1; border-right: 1px solid rgba(255,255,255,0.05); display: none; }
@media (min-width: 1024px) { .agency-side-panel { display: flex; } }
.agency-panel.is-active-tab { display: flex; } 

.agency-mobile-nav { display: flex; background: #020617; padding: 0.5rem; gap: 0.5rem; border-top: 1px solid var(--agency-border); z-index: 30; flex-shrink: 0; padding-bottom: max(0.5rem, env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { .agency-mobile-nav { display: none; } }
.nav-tab-btn { flex: 1; padding: 0.75rem 0; border: none; background: var(--agency-panel); color: #64748b; font-weight: 700; border-radius: 0.5rem; transition: 0.3s; cursor: pointer; font-size: 0.95rem; }
.nav-tab-btn.active-tab { background: var(--brand-red); color: #fff; box-shadow: 0 0 15px rgba(220, 38, 38, 0.4); }

.agency-dashboard { background: rgba(15, 23, 42, 0.8); border: 1px solid rgba(56, 189, 248, 0.2); border-radius: 1rem; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1); flex-shrink: 0; text-align: center; }
.agency-stat-value { font-size: 2.5rem; font-weight: 800; color: #fff; margin: 0; line-height: 1.1; text-shadow: 0 0 20px rgba(255,255,255,0.2); }
@media(min-width: 640px) { .agency-stat-value { font-size: 3.5rem; } }
.agency-substat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1rem; margin-top: 1rem; }
.agency-substat-val { font-size: 1.25rem; font-weight: 700; margin: 0; color: var(--agency-accent); transition: color 0.2s;}
.agency-substat-val.clout { color: #c084fc; text-shadow: 0 0 10px rgba(192, 132, 252, 0.5); }
.agency-substat-label { font-size: 0.75rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; }

.agency-click-btn { width: 100%; flex-grow: 1; min-height: 120px; border-radius: 1.5rem; border: none; cursor: pointer; background: linear-gradient(145deg, #2563eb, #1d4ed8); color: white; box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4), inset 0 2px 5px rgba(255,255,255,0.3), inset 0 -8px 20px rgba(0,0,0,0.3); transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1); outline: none; margin-bottom: 1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden;}
.agency-click-btn:active { transform: scale(0.97) translateY(4px); box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4), inset 0 2px 5px rgba(255,255,255,0.1), inset 0 2px 10px rgba(0,0,0,0.4); }
.click-btn-text { font-size: 1.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; text-shadow: 0 2px 4px rgba(0,0,0,0.3); position: relative; z-index: 2;}
.click-btn-sub { font-size: 0.9rem; color: #bfdbfe; font-weight: 600; margin-top: 0.25rem; position: relative; z-index: 2;}

.agency-frenzy-bar { position: absolute; bottom: 0; left: 0; height: 10px; background-color: #f59e0b; transition: width 0.1s; width: 0%; z-index: 1;}

.agency-footer-actions { flex-shrink: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.agency-prestige-btn { background: linear-gradient(90deg, #9333ea, #db2777); border: none; padding: 1rem; border-radius: 1rem; color: white; font-weight: 700; font-size: 1.1rem; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; box-shadow: 0 5px 15px rgba(219, 39, 119, 0.3); transition: 0.3s; }
.agency-prestige-btn:disabled { opacity: 0.5; filter: grayscale(100%); cursor: not-allowed; box-shadow: none; }
.agency-prestige-btn:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(219, 39, 119, 0.5); }
.agency-reset-link { text-align: center; color: #64748b; font-size: 0.85rem; font-weight: 600; transition: 0.2s; cursor: pointer; border: none; background: transparent; padding: 0.5rem; }
.agency-reset-link:hover { color: #ef4444; }

.panel-header { font-size: 1.5rem; font-weight: 700; color: #f8fafc; margin-bottom: 1rem; text-align: center; flex-shrink: 0; }

.agency-item { display: flex; align-items: center; padding: 1rem; margin-bottom: 0.75rem; border-radius: 0.75rem; background: var(--agency-card); border: 1px solid var(--agency-border); cursor: pointer; transition: 0.2s; position: relative; overflow: hidden;}
.agency-item:hover:not(.disabled) { background: rgba(45, 212, 191, 0.1); border-color: #2dd4bf; transform: translateX(4px); }
.agency-item.disabled { opacity: 0.6; cursor: not-allowed; filter: grayscale(100%); }
.item-icon { font-size: 2rem; margin-right: 1rem; background: rgba(0,0,0,0.2); width: 3.5rem; height: 3.5rem; display: flex; align-items: center; justify-content: center; border-radius: 0.5rem; }
.item-details { flex-grow: 1; }
.item-name { font-size: 1rem; font-weight: 700; color: #f8fafc; }
.item-cost { font-size: 0.85rem; color: #34d399; font-weight: 600; }
.item-count { font-size: 1.5rem; font-weight: 800; color: #fff; text-align: right; line-height: 1; }
.item-rps { font-size: 0.75rem; color: #94a3b8; text-align: right; }

.agency-shop-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media(min-width: 640px) { .agency-shop-grid { grid-template-columns: 1fr 1fr; } }
@media(min-width: 1024px) { .agency-shop-grid { grid-template-columns: 1fr; } }

.agency-shop-item { background: var(--agency-card); border: 1px solid var(--agency-border); border-radius: 0.75rem; padding: 1rem; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; text-align: left; }
.agency-shop-item:hover:not(.disabled) { background: rgba(59, 130, 246, 0.1); border-color: #3b82f6; transform: translateY(-2px); }
.agency-shop-item.disabled { opacity: 0.6; cursor: not-allowed; filter: grayscale(100%); }
.shop-name { font-weight: 700; color: #f8fafc; font-size: 1rem; }
.shop-desc { font-size: 0.8rem; color: #94a3b8; margin: 0.25rem 0 0.5rem 0; line-height: 1.3; flex-grow: 1; }
.shop-cost { font-size: 0.9rem; color: #60a5fa; font-weight: 600; }

.agency-toast { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%) translateY(-150%); background: var(--agency-card); border: 1px solid var(--agency-border); padding: 1rem 1.5rem; border-radius: 0.75rem; box-shadow: 0 10px 25px rgba(0,0,0,0.5); z-index: 9999; min-width: 280px; opacity: 0; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); text-align: center; }
.agency-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.25rem; }
.toast-msg { color: #cbd5e1; font-size: 0.9rem; }
.toast-success { border-color: #34d399; } .toast-success .toast-title { color: #34d399; }
.toast-error { border-color: #f87171; } .toast-error .toast-title { color: #f87171; }
.toast-info { border-color: #60a5fa; } .toast-info .toast-title { color: #60a5fa; }

/* ==========================================================================
    7. FOOTER
    ========================================================================== */
.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem 0;
    position: relative;
    z-index: 10;
}
.footer-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.05);
    color: var(--text-muted);
    transition: all 0.3s ease;
}
.social-links a:hover {
    background-color: var(--brand-red);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(var(--brand-red-rgb), 0.4);
}
.social-links svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.footer-copy {
    color: var(--text-secondary);
    font-size: 0.875rem;
}