/**
 * BURNOUT DEFENDER - css/attention-thief.css
 * Corporate aesthetic so bland it hurts - the visual equivalent of elevator music
 * 
 * Imports: css/reset.css (inherits the existential foundation)
 * Supports: Phase 1 - The trap that looks like productivity
 * 
 * Created in session: #002
 * Last modified: Current session
 */

/* Import our therapy session first */
@import url('reset.css');

/* ==========================================
   INSTRUCTIONS PANEL
   Because reading documentation is productive
   ========================================== */

.instructions-panel {
    background: var(--color-surface, #f8f9fa);
    border: 1px solid var(--color-border, #dadce0);
    border-radius: 8px;
    margin-bottom: var(--space-lg, 24px);
    overflow: hidden;
    transition: all 0.3s ease;
}

.instructions-panel.collapsed .instructions-content {
    display: none;
}

.instructions-panel.collapsed .toggle-btn {
    transform: rotate(-90deg);
}

.instructions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md, 16px);
    background: var(--color-primary, #1a73e8);
    color: white;
}

.instructions-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.toggle-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: transform 0.3s ease;
}

.instructions-content {
    padding: var(--space-lg, 24px);
}

.instruction-section {
    margin-bottom: var(--space-md, 16px);
}

.instruction-section:last-child {
    margin-bottom: 0;
}

.instruction-section h4 {
    margin: 0 0 8px 0;
    color: var(--color-text, #202124);
    font-size: 0.95rem;
}

.instruction-section p {
    margin: 0;
    color: var(--color-text-secondary, #5f6368);
    line-height: 1.5;
}

.instruction-section ul {
    margin: 0;
    padding-left: 20px;
    color: var(--color-text-secondary, #5f6368);
}

.instruction-section li {
    margin-bottom: 4px;
    line-height: 1.5;
}

.instruction-section.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 12px;
    border-radius: 4px;
}

.instruction-section.warning p {
    color: #856404;
    font-weight: 500;
}

/* ==========================================
   CORPORATE PHASE OVERRIDES
   When the game pretends to be professional
   ========================================== */

[data-game-phase="attention-thief"] {
    --color-primary: #1a73e8;        /* Google blue - peak corporate */
    --color-background: #ffffff;      /* Sterile white */
    --color-surface: #f8f9fa;        /* Slightly off-white (rebels!) */
    --color-text: #202124;           /* Almost black but not quite */
    --color-text-secondary: #5f6368; /* Gray like your soul */
    --color-border: #dadce0;         /* Borders. Everywhere. Always. */
    --color-success: #1e8e3e;        /* Money green */
    --color-error: #d93025;          /* Urgent red */
    --color-warning: #f9ab00;        /* Caution yellow */
    
    /* Corporate spacing - everything is a multiple of 8 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    
    /* Shadows that whisper "trust us" */
    --shadow-sm: 0 1px 2px 0 rgba(60,64,67,0.3);
    --shadow-md: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
    --shadow-lg: 0 1px 3px 0 rgba(60,64,67,0.3), 0 8px 16px 8px rgba(60,64,67,0.15);
    
    /* Timing - smooth like corporate lies */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   CORPORATE HEADER
   Where dreams go to get a 401k
   ========================================== */

.corporate-header {
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-primary);
    letter-spacing: -0.02em;
    /* Trying so hard to be modern */
}

.corporate-nav {
    display: flex;
    gap: var(--space-lg);
}

.nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover:not(.disabled) {
    color: var(--color-primary);
}

.nav-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================
   UNDER CONSTRUCTION MESSAGE
   The lie that brings them in
   ========================================== */

.construction-message {
    text-align: center;
    padding: var(--space-xxl) var(--space-lg);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 600ms ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.construction-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    letter-spacing: -0.03em;
}

.construction-text {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.construction-eta {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-style: italic;
    margin-bottom: var(--space-xxl);
}

.meanwhile-section {
    margin-top: var(--space-xxl);
    padding-top: var(--space-xxl);
    border-top: 1px solid var(--color-border);
}

.meanwhile-text {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
}

/* ==========================================
   CORPORATE BUTTON
   Designed by committee, approved by legal
   ========================================== */

.corporate-button {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: none;
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-sm);
    min-height: 44px; /* Accessibility or whatever */
}

.corporate-button:hover {
    background: #1557b0;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.corporate-button:active {
    background: #1249a3;
    box-shadow: var(--shadow-sm);
    transform: translateY(0);
}

/* ==========================================
   GAME CONTAINER
   Where productivity goes to die
   ========================================== */

.game-container {
    padding: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
    animation: slideIn 400ms ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================
   DEVELOPER CONSOLE
   Fake productivity vibes
   ========================================== */

.console {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-lg);
    font-family: 'Consolas', 'Monaco', monospace;
}

.console-header {
    background: #323233;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #464647;
}

.console-title {
    color: #cccccc;
    font-size: 0.875rem;
    font-weight: normal;
}

.console-time {
    color: #f48771;
    font-size: 0.875rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.console-content {
    padding: var(--space-md);
    height: 180px;  /* Slightly taller */
    overflow-y: auto;
    background: #0d0d0d;  /* Darker for better contrast */
    border: 1px solid #2a2a2a;  /* Subtle border */
    font-family: 'Consolas', 'Courier New', monospace;
}

.console-line {
    color: #4ec54e;  /* Bright green for better visibility */
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 6px;
    padding: 2px 0;
    opacity: 0;
    animation: typeIn 200ms ease-out forwards;
    text-shadow: 0 0 2px rgba(78, 197, 78, 0.3); /* Subtle glow */
}

.console-line:nth-child(1) { animation-delay: 100ms; }
.console-line:nth-child(2) { animation-delay: 200ms; }
.console-line:nth-child(3) { animation-delay: 300ms; }
.console-line:nth-child(4) { animation-delay: 400ms; }

@keyframes typeIn {
    to {
        opacity: 1;
    }
}

/* ==========================================
   GAME STATS
   Numbers going up (except productivity)
   ========================================== */

.game-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.stat-item {
    background: var(--color-surface);
    padding: var(--space-md);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    text-align: center;
    transition: all var(--transition-fast);
}

.stat-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

/* ==========================================
   GAME CANVAS
   Where bugs attack your will to live
   ========================================== */

.game-canvas {
    width: 100%;
    height: 400px;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    cursor: crosshair;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ==========================================
   TOWER SELECTION
   Your arsenal of procrastination
   ========================================== */

.tower-selection {
    margin-top: var(--space-lg, 24px);
    padding: var(--space-md, 16px);
    background: var(--color-surface, #f8f9fa);
    border-radius: 8px;
    border: 1px solid var(--color-border, #dadce0);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-md, 16px);
}

.tower-option {
    background: var(--color-background, #ffffff);
    border: 2px solid var(--color-border, #dadce0);
    border-radius: 4px;
    padding: var(--space-md, 16px);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast, 150ms ease);
    user-select: none;
    font-size: 0.9rem;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tower-option:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.tower-option:active {
    transform: translateY(0);
}

.tower-option.selected {
    border-color: var(--color-primary);
    background: rgba(26, 115, 232, 0.1);
}

.tower-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tower-icon {
    font-size: 2rem;
    margin-bottom: var(--space-xs);
}

.tower-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.tower-cost {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

/* ==========================================
   MOBILE ADJUSTMENTS
   Because who has a desktop anymore?
   ========================================== */

@media (max-width: 768px) {
    .corporate-header {
        padding: var(--space-sm) var(--space-md);
    }
    
    .corporate-nav {
        gap: var(--space-md);
    }
    
    .construction-title {
        font-size: 2rem;
    }
    
    .game-canvas {
        height: 300px;
    }
    
    .game-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tower-selection {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   SUBTLE HINTS OF BREAKDOWN
   The cracks starting to show
   ========================================== */

/* After 2 minutes, things get slightly weird */
[data-time-wasted="high"] .console-line {
    animation: glitchText 3s ease-in-out infinite;
}

@keyframes glitchText {
    0%, 100% { transform: translateX(0); }
    95% { transform: translateX(0); }
    96% { transform: translateX(2px); }
    97% { transform: translateX(-2px); }
    98% { transform: translateX(0); }
}

/* Productivity starts lying to you */
[data-productivity="low"] .stat-value {
    animation: flicker 4s ease-in-out infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.4; }
    94% { opacity: 1; }
    95% { opacity: 0.6; }
    96% { opacity: 1; }
}

/* Hidden message for the observant */
.console-content::after {
    content: "// WHY ARE YOU STILL HERE?";
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: #3e3e3e;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

[data-time-wasted="very-high"] .console-content::after {
    opacity: 1;
}