/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-cyan: #00D4FF;
    --primary-magenta: #FF006E;
    --accent-yellow: #FFBE0B;
    --bg-dark: #1A1A2E;
    --bg-darker: #16213E;
    --text-light: #FFFFFF;
    --text-gray: #A8A8A8;

    /* Fonts */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    color: var(--text-light);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* ===================================
   GAME CANVAS
   =================================== */
#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
}

/* ===================================
   LOADING SCREEN
   =================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1A1A2E 0%, #0F3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.logo-container {
    margin-bottom: 30px;
}

.brand-logo {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-magenta), var(--accent-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: 3px;
}

.pixel-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top: 4px solid var(--primary-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.progress-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-magenta));
    width: 0%;
    transition: width 0.3s ease;
}

/* ===================================
   INTRO SCREEN
   =================================== */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(15, 52, 96, 0.95) 100%);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.intro-screen.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.intro-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(10px);
}

.brand-title {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-magenta), var(--accent-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.tagline {
    font-size: 1.3rem;
    color: var(--text-gray);
    margin-bottom: 30px;
    font-weight: 300;
}

.intro-description {
    margin-bottom: 40px;
}

.intro-description p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

.controls-info {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.controls-info h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-cyan);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.key {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(255, 0, 110, 0.2));
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-display);
    border: 1px solid var(--primary-cyan);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.or {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.control-item p {
    color: var(--text-gray);
    font-size: 0.95rem;
    width: 100%;
    margin-top: 5px;
}

.start-btn {
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-magenta));
    color: var(--text-light);
    border: none;
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-display);
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.start-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.6);
}

/* ===================================
   GAME UI
   =================================== */
.game-ui {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.game-ui.hidden {
    opacity: 0;
}

.game-ui>* {
    pointer-events: auto;
}

/* Minimap */
.minimap {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 250px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    padding: 15px;
    backdrop-filter: blur(10px);
    box-shadow: var(--glass-shadow);
}

.minimap-title {
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--primary-cyan);
}

.minimap-svg {
    width: 100%;
    height: auto;
    display: block;
}

.zone-marker {
    transition: fill 0.3s ease;
}

.history-marker {
    fill: var(--accent-yellow);
}

.work-marker {
    fill: var(--primary-cyan);
}

.services-marker {
    fill: var(--primary-magenta);
}

.contact-marker {
    fill: #4CAF50;
}

.car-marker {
    fill: white;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Interaction Prompt */
.interaction-prompt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--glass-bg);
    border: 2px solid var(--primary-cyan);
    padding: 15px 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    font-size: 1.2rem;
    font-weight: 600;
    animation: float 2s ease-in-out infinite;
    transition: opacity 0.3s ease;
}

.interaction-prompt.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes float {

    0%,
    100% {
        transform: translate(-50%, -50%) translateY(0);
    }

    50% {
        transform: translate(-50%, -50%) translateY(-10px);
    }
}

/* Mobile Controls */
.mobile-controls {
    display: none;
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    padding: 0 20px;
    justify-content: space-between;
    align-items: flex-end;
}

.joystick-container {
    width: 120px;
    height: 120px;
}

.joystick {
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    position: relative;
    box-shadow: var(--glass-shadow);
}

.joystick-knob {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-magenta));
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.6);
    transition: transform 0.1s ease;
}

.interact-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-magenta), var(--accent-yellow));
    border: none;
    color: white;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 0, 110, 0.5);
    transition: transform 0.2s ease;
}

.interact-btn:active {
    transform: scale(0.95);
}

/* ===================================
   ZONE MODAL
   =================================== */
.zone-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.zone-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    max-width: 900px;
    max-height: 80vh;
    width: 100%;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
    z-index: 10;
}

.close-btn:hover {
    color: var(--primary-cyan);
    transform: rotate(90deg);
}

.modal-body h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-body h3 {
    font-size: 1.8rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--primary-cyan);
}

.modal-body p {
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.timeline {
    margin: 30px 0;
}

.timeline-item {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 4px solid var(--primary-cyan);
    margin-bottom: 20px;
    border-radius: 8px;
}

.timeline-item h4 {
    color: var(--accent-yellow);
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.project-card {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.project-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.project-info {
    padding: 15px;
}

.project-info h4 {
    margin-bottom: 8px;
    color: var(--primary-cyan);
}

.project-info p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.service-card {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(255, 0, 110, 0.1));
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.4);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.service-card h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-cyan);
}

.service-card p {
    margin-bottom: 0;
}

.contact-form {
    margin: 30px 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-cyan);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-light);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-cyan);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-magenta));
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.5);
}

.contact-info {
    margin: 30px 0;
    padding: 25px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.contact-info h4 {
    color: var(--accent-yellow);
    margin-bottom: 15px;
}

.contact-info p {
    margin-bottom: 10px;
}

/* Boost Meter */
.boost-meter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    padding: 15px;
    backdrop-filter: blur(10px);
    box-shadow: var(--glass-shadow);
}

.boost-label {
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--primary-cyan);
    letter-spacing: 2px;
    font-family: var(--font-display);
}

.boost-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.boost-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF6B00, #FF006E, #FFBE0B);
    border-radius: 10px;
    width: 100%;
    transition: width 0.1s linear;
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.8);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .brand-title {
        font-size: 2.5rem;
    }

    .brand-logo {
        font-size: 2rem;
    }

    .intro-content {
        padding: 30px 20px;
    }

    .mobile-controls {
        display: flex;
    }

    .minimap {
        width: 120px;
        top: 10px;
        right: 10px;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .modal-body h2 {
        font-size: 2rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* Custom Scrollbar */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-magenta));
    border-radius: 10px;
}