@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;600;700;900&display=swap');

:root {
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --green-100: #dcfce7;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --red-100: #fee2e2;
    --red-500: #ef4444;
    --orange-500: #f97316;
}

* { box-sizing: border-box; }

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background-color: var(--slate-200);
    margin: 0;
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
}

.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.relative { position: relative; }
.absolute { position: absolute; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.uppercase { text-transform: uppercase; }
.cursor-pointer { cursor: pointer; }

.app-container {
    width: 100%;
    max-width: 450px;
    height: 95vh; 
    max-height: 850px;
    background-color: white;
    border-radius: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 4px solid var(--slate-900);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.app-header {
    background-color: var(--slate-900);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
}

.header-title {
    color: white;
    line-height: 1.1;
    letter-spacing: 0.05em;
}

.header-title h1 {
    margin: 0;
    font-size: 16px;
}

.step-badge {
    background-color: var(--blue-600);
    color: white;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: bold;
}

.timer-bar {
    height: 6px;
    background-color: var(--slate-200);
    width: 100%;
    position: relative;
}

.timer-fill {
    height: 100%;
    background-color: var(--blue-500);
    width: 0%;
}

.content-area {
    flex: 1;
    background-color: var(--slate-50);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    overflow: hidden;
    position: relative;
}

.instruction-box {
    width: 95%;
    background-color: white;
    border-left: 5px solid var(--blue-600);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 20px;
    min-height: 70px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.instruction-text {
    color: var(--slate-800);
    margin: 0;
    line-height: 1.4;
    font-size: 14px;
}

.car-container {
    width: 260px;
    height: 460px;
    position: relative;
    margin: 0 auto;
    transition: opacity 0.5s ease;
}

.car-body {
    width: 100%;
    height: 100%;
    background-color: var(--slate-200);
    border-radius: 45px 45px 35px 35px;
    border: 4px solid var(--slate-400);
    position: relative;
    z-index: 10;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.wheel {
    position: absolute;
    width: 18px;
    height: 55px;
    background-color: var(--slate-800);
    border-radius: 4px;
    z-index: 5;
}
.w-fl { top: 55px; left: -8px; }
.w-fr { top: 55px; right: -8px; }
.w-bl { bottom: 75px; left: -8px; }
.w-br { bottom: 75px; right: -8px; }

.mirror {
    position: absolute;
    width: 28px;
    height: 18px;
    background-color: var(--slate-300);
    border: 2px solid var(--slate-400);
    top: 90px;
    z-index: 20;
}
.m-l { left: -18px; border-radius: 10px 0 0 10px; }
.m-r { right: -18px; border-radius: 0 10px 10px 0; }

.windshield {
    width: 86%;
    height: 65px;
    background: linear-gradient(to bottom, var(--blue-100), var(--blue-400));
    margin: 45px auto 0;
    border-radius: 10px 10px 35px 35px;
    border: 2px solid var(--blue-500);
}

.rear-window {
    width: 80%;
    height: 45px;
    background: var(--blue-100);
    position: absolute;
    bottom: 75px;
    left: 10%;
    border-radius: 15px 15px 8px 8px;
    border: 2px solid var(--blue-100);
}

.interior-grid {
    position: absolute;
    top: 125px;
    width: 100%;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.seat-zone {
    aspect-ratio: 1/1;
    background-color: white;
    border-radius: 12px;
    border: 2px dashed var(--slate-400);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.seat-zone:hover { background-color: var(--blue-50); }

.driver-seat {
    border: 2px solid var(--slate-300);
    background-color: var(--slate-100);
    opacity: 0.6;
    cursor: default;
}

.zone-label {
    position: absolute;
    bottom: 4px;
    font-size: 8px;
    font-weight: bold;
    color: var(--slate-400);
}

.placed-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 5px;
}

.trunk-zone {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background-color: var(--slate-300);
    border-top: 2px dashed var(--slate-400);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.trunk-label {
    font-size: 10px;
    font-weight: bold;
    color: var(--slate-500);
    text-transform: uppercase;
}

.door-handle {
    position: absolute;
    width: 10px;
    height: 35px;
    background-color: var(--slate-500);
    border-radius: 4px;
    z-index: 25;
    cursor: pointer;
    top: 160px;
    left: 2px;
    transition: all 0.2s;
}

.door-handle:hover { background-color: var(--blue-500); }

.phone-overlay {
    width: 250px;
    height: 450px;
    background: black;
    border-radius: 35px;
    border: 6px solid var(--slate-800);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.phone-screen {
    flex: 1;
    background: white;
    margin: 4px;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    padding: 20px;
    justify-content: center;
    gap: 12px;
}

.app-btn {
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    font-family: inherit;
    font-size: 13px;
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.app-btn:active { transform: scale(0.98); }
.app-btn.disabled { opacity: 0.5; cursor: not-allowed; }

.btn-alarm { background-color: var(--orange-500); }
.btn-social { background-color: var(--blue-500); }
.btn-news { background-color: var(--slate-500); }
.btn-game { background-color: #8b5cf6; } 

.footer-dock {
    background-color: white;
    border-top: 1px solid var(--slate-200);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 30;
}

.dock-label {
    font-size: 10px;
    color: var(--slate-400);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.item-capsule {
    background-color: var(--blue-50);
    border: 1px solid var(--blue-100);
    padding: 10px 25px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    animation: bounce 2s infinite;
    cursor: pointer;
}

.item-icon {
    color: var(--blue-500);
    width: 24px;
    height: 24px;
}

.item-text {
    color: var(--slate-900);
    font-weight: bold;
    font-size: 14px;
}

.scan-hint {
    font-size: 12px;
    color: var(--red-500);
    font-weight: bold;
    text-align: center;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.95);
    z-index: 200;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    backdrop-filter: blur(4px);
}

.modal-icon { margin-bottom: 20px; transition: transform 0.3s; transform: scale(0); }
.modal-icon.show { transform: scale(1); }

.modal-title {
    color: white;
    font-size: 28px;
    font-weight: 900;
    margin: 0 0 10px 0;
    font-style: italic;
}

.modal-desc {
    color: var(--slate-300);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 30px;
    max-width: 280px;
}

.modal-btn {
    background-color: white;
    color: var(--slate-900);
    border: none;
    padding: 15px 40px;
    border-radius: 99px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s;
}
.modal-btn:active { transform: scale(0.95); }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes superFlashGreen {
    0% { 
        box-shadow: 0 0 10px var(--green-400), inset 0 0 10px var(--green-400); 
        opacity: 0.8;
        background-color: var(--green-100);
        border-color: var(--green-500);
    }
    100% { 
        box-shadow: 0 0 40px var(--green-500), inset 0 0 30px var(--green-500); 
        opacity: 1; 
        transform: scale(1.05);
        background-color: var(--green-100);
        border-color: var(--green-500);
    }
}

.sparkle-green {
    animation: superFlashGreen 0.8s infinite alternate !important;
    z-index: 50;
    border-style: solid !important;
}

@keyframes textGlow {
    from { text-shadow: 0 0 5px var(--green-400); }
    to { text-shadow: 0 0 20px var(--green-500); }
}

.text-glow {
    animation: textGlow 0.8s infinite alternate;
    color: var(--green-600) !important;
    text-shadow: 0 0 10px var(--green-400);
}

@keyframes pulseAlertRed {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    100% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
}

.pulse-alert-red {
    animation: pulseAlertRed 0.6s infinite;
    background-color: var(--red-100) !important;
    border: 3px solid var(--red-500) !important;
    z-index: 50;
}

@keyframes guideBlink {
    0%, 100% { background-color: var(--slate-500); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    50% { background-color: var(--green-500); box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
}

.hint-blink { animation: guideBlink 1s infinite; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.highlight-danger {
    animation: shake 0.5s;
    border-color: var(--red-500) !important;
    background-color: var(--red-100) !important;
}

.bg-green-100 { background-color: var(--green-100) !important; }
.border-green-500 { border-color: var(--green-500) !important; border-style: solid !important; }
.text-green-600 { color: var(--green-600) !important; }
.text-blue-600 { color: var(--blue-600) !important; }

@media (min-width: 768px) {
    .header-title h1 { font-size: 26px; }
    .instruction-text { font-size: 21px; }
    .app-container { transform: scale(1.05); }
}

@media (max-width: 767px) {
    .header-title h1 { font-size: 21px; }
}