* { box-sizing: border-box; margin: 0; padding: 0; }

body, html { width: 100vw; height: 100dvh; background-color: #0A241B; color: #FFFFFF; font-family: 'Century Schoolbook', Georgia, serif; overflow: hidden; user-select: none; touch-action: manipulation; }
.screen { display: none; width: 100vw; height: 100dvh; position: absolute; top: 0; left: 0; z-index: 10; }
.screen.active { display: flex; flex-direction: column; }

/* ZARİF EKRAN DÖNDÜRME KİLİDİ */
#portrait-lock {
    display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh;
    background-color: #0A241B; z-index: 9999999;
    color: #D4AF37; font-family: 'Chiller', cursive; text-align: center;
    justify-content: center; align-items: center; flex-direction: column;
}
#portrait-lock h2 { font-size: clamp(2.5rem, 5vw, 4rem); margin-top: 20px; text-shadow: 2px 2px 10px #000; padding: 0 20px; }
#portrait-lock svg { width: 80px; height: 80px; fill: #D4AF37; animation: rotatePhone 2s infinite ease-in-out; }
@keyframes rotatePhone { 0% { transform: rotate(0deg); } 50% { transform: rotate(-90deg); } 100% { transform: rotate(0deg); } }

@media screen and (max-width: 1024px) and (orientation: landscape) {
    #portrait-lock { display: flex !important; }
}

#start-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; background-color: rgba(5, 10, 9, 0.90); z-index: 9999; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: opacity 0.6s ease-in-out; backdrop-filter: blur(8px); pointer-events: auto; }

.bg-layer { position: absolute; top: 0; left: 0; width: 100vw; height: 100dvh; background-image: url('assets/zemin.jpg'); background-size: cover; background-position: center; filter: brightness(0.9) contrast(1.1); z-index: -1; }
.bg-layer.darkened { filter: brightness(0.12) contrast(1.2) !important; }

.gold-text { color: #D4AF37; } 
.dark-green { color: #E6E6E6; } 
.mono-font { font-family: 'Consolas', 'Courier New', monospace; } 
.green-glow { color: #FFFFFF; text-shadow: 0 0 15px rgba(255, 255, 255, 0.8); }

.side-numbers { position: absolute; left: 1vw; top: 5vh; display: flex; flex-direction: column; gap: 0px; font-family: 'Chiller', cursive; font-weight: bold; color: rgba(212,175,55,0.4); z-index: 1; line-height: 0.85; }

.bottom-numbers { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 0px; font-family: 'Chiller', cursive; font-weight: bold; color: rgba(212,175,55,0.4); z-index: 1; white-space: nowrap; bottom: 6vh; }

.num-char { transition: color 0.05s ease-out, text-shadow 0.05s ease-out, transform 0.05s ease-out; display: inline-block; position: relative; z-index: 1;} 
.num-char.light { color: #FFFFFF !important; text-shadow: 0 0 20px #FFF, 0 0 40px #FFF, 0 0 60px #D4AF37, 0 0 80px #FFD700 !important; transform: scale(2.2) translateY(-5px) !important; z-index: 100; filter: brightness(1.5);}

#target-counter { color: #D4AF37 !important; text-shadow: 0 0 10px rgba(212,175,55,0.5); }

#game-title { font-family: 'Chiller', cursive; font-size: clamp(3rem, 6vw, 5rem); text-align: center; margin-top: 2vh; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); z-index: 5; position: relative; cursor: pointer;}
.menu-panel { position: absolute; top: 3vh; right: 2vw; text-align: right; font-family: Arial, sans-serif; font-size: 1.1rem; z-index: 200; }
.menu-item { color: #D4AF37; margin-bottom: 1.5vh; cursor: pointer; font-weight: bold; transition: all 0.3s ease; padding: 5px; } .menu-item:hover { color: #FFFFFF; text-shadow: 0 0 10px #D4AF37; } .menu-item:nth-child(6) { color: #88AAFF; } 

.footer { position: absolute; bottom: 1vh; width: 100%; text-align: center; font-family: Arial, sans-serif; font-weight: normal; font-size: 0.85rem; color: rgba(230,230,230,0.6); z-index: 100; letter-spacing: 1px; pointer-events: none;}

.card-table { width: 100vw; height: 60vh; position: relative; margin-top: 2vh; z-index: 5; } 
.column-header { position: relative; width: 100vw; height: 50px; display: block; } 
.col-label { font-family: 'Chiller', cursive; font-size: clamp(3rem, 8vw, 4.5rem); font-weight: bold; color: #D4AF37; position: absolute; transform: translateX(-50%); text-shadow: 2px 2px 5px #000; } 
#cards-area { position: relative; width: 100vw; height: 100%; transition: filter 0.3s; }

/* PC KUTU SAĞDA SABİT */
.popup-box { 
    position: absolute !important; 
    right: 3vw !important; 
    top: 50% !important; 
    transform: translateY(-50%) !important; 
    left: auto !important;
    background-color: rgba(5, 10, 9, 0.98); 
    border: 2px solid #D4AF37; 
    border-radius: 8px; 
    text-align: center; 
    box-shadow: 0 0 25px rgba(0,0,0,0.9); 
    z-index: 10000; 
    width: 90%; 
    max-width: 320px; 
    padding: 15px; 
    display: none;
}
.popup-box h3 { font-family: 'Chiller', cursive; font-size: 2.2rem; margin-bottom: 5px; } .popup-box p { font-family: Arial, sans-serif; font-size: 1rem; margin-bottom: 15px; } 

@media (max-width: 1180px) {
    .popup-box {
        left: 50% !important; 
        right: auto !important; 
        top: auto !important; 
        bottom: 8vh !important; 
        transform: translateX(-50%) scale(0.9) !important; 
    }
}

.contact-input { width: 100%; background-color: rgba(5, 18, 15, 0.8); border: 1px solid #D4AF37; color: #FFF; padding: 12px; margin-bottom: 12px; font-family: Arial, sans-serif; font-size: 1rem; border-radius: 4px; outline: none;}
.contact-input:focus { border-color: #FFF; box-shadow: 0 0 10px rgba(212,175,55,0.5); }
.contact-input::placeholder { color: rgba(212, 175, 55, 0.4); font-style: italic;}

.mobile-col-buttons { display: flex; gap: 15px; justify-content: center; margin-top: 10px; }
.col-btn { background-color: #050A09; border: 2px solid #D4AF37; color: #D4AF37; font-family: 'Chiller', cursive; font-size: 2.8rem; width: 60px; height: 60px; cursor: pointer; border-radius: 8px; font-weight: bold; transition: all 0.1s; display: flex; align-items: center; justify-content: center; }
.col-btn:hover { background-color: #D4AF37; color: #0A241B; transform: scale(1.1); box-shadow: 0 0 15px #D4AF37; }
.col-btn:active { background-color: #FFFFFF !important; color: #000000 !important; box-shadow: 0 0 20px #FFF !important; transform: scale(0.95) !important; }

#contact-overlay { position: fixed !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%) !important; z-index: 9999 !important; box-shadow: 0 0 0 4000px rgba(0,0,0,0.85), 0 0 30px #D4AF37 !important; }

#counter-screen { align-items: center; justify-content: flex-start; overflow-x: hidden; padding-top: 5vh; } 
#cnt-title { font-size: clamp(1.5rem, 4vw, 2.5rem); margin-top: 5vh; text-align: center; width: 100%; transition: opacity 3s; } 
.cnt-menu { position: absolute; top: 5vh; left: 3vw; font-size: 1.2rem; font-weight: bold; z-index: 50; } 
.cnt-menu div { margin-bottom: 1.5vh; cursor: pointer; transition: all 0.3s ease; padding: 5px; } 
.cnt-menu div:hover { color: #FFFFFF; text-shadow: 0 0 10px #D4AF37; }
.cnt-menu div:nth-child(1) { color: #D4AF37; } 
.cnt-menu div:nth-child(4) { color: #88AAFF; } 
.time-grid { display: flex; gap: 2vw; margin-top: 4vh; justify-content: center; width: 100%; max-width: 900px; padding: 0 10px;} .time-box { width: 180px; height: 90px; background-color: #05120F; border: 2px solid #233D36; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; } .time-box .label { position: absolute; top: -25px; color: #D4AF37; font-weight: bold; font-size: 1rem; } .time-box .value { font-size: 2.5rem; font-weight: bold; color: #FFFFFF; } 
.ghost-grid { margin-top: 4vh; } .time-box.ghost { border: 1px solid #152515; } .time-box.ghost .label { color: #504010; font-size: 0.8rem; } .time-box.ghost .value { color: #334433; } 

.matrix-data { margin-top: 6vh; width: 100%; max-width: 1100px; text-align: center; margin-left: auto; margin-right: auto; padding: 0 10px; padding-bottom: 15vh; } 
.data-row { margin-bottom: 2vh; } .data-label { display: block; font-size: 1.2rem; color: #D4AF37; font-weight: bold; margin-bottom: 5px; } 
.speed-text { position: relative; margin-top: 2vh; width: 100%; text-align: center; font-weight: bold; font-size: 1.1rem; z-index: 10;}

.counter-content { transition: transform 4s cubic-bezier(0.25, 1, 0.5, 1), opacity 4s ease; width: 100%; display: flex; flex-direction: column; align-items: center; position: relative; transform-origin: top center; overflow-y: auto; overflow-x: hidden; max-height: 100dvh; padding-bottom: 120px; }
.counter-content.legacy-mode { transform: scale(0.38) translateY(-2vh); opacity: 0.55; pointer-events: none; }
.counter-content.legacy-mode #cnt-title { opacity: 0.3; }

.legacy-screen { position: absolute; top: 48dvh; left: 50%; transform: translateX(-50%); width: 85%; max-width: 900px; text-align: center; z-index: 50; display: none; flex-direction: column; align-items: center; }
.legacy-screen.active { display: flex; }
.legacy-date { font-family: 'Consolas', monospace; font-size: 2.0rem; color: #D4AF37; margin-bottom: 2.5vh; opacity: 0; transition: opacity 3s ease-in; text-shadow: 0 0 15px #D4AF37; letter-spacing: 3px; }
.legacy-text { font-family: 'Georgia', 'Century Schoolbook', serif; font-size: 2.0rem; color: #E6E6E6; line-height: 1.6; font-style: italic; opacity: 0; transition: opacity 5s ease-in; text-shadow: 0 0 10px rgba(0,0,0,0.8); }
.legacy-signature { font-family: 'Georgia', 'Century Schoolbook', serif; font-size: 1.6rem; color: #88AAFF; margin-top: 3.5vh; line-height: 1.6; opacity: 0; transition: opacity 4s ease-in; text-shadow: 0 0 10px rgba(0,0,0,0.8); white-space: pre-line; }

#f5-screen { display: none; width: 100vw; height: 100dvh; position: absolute; top: 0; left: 0; z-index: 10; overflow: hidden; } #f5-screen.active { display: block; }
#f5-cards-container { position: absolute; width: 100vw; height: 100dvh; top: 0; left: 0; z-index: 1; }
.f5-top-card { position: absolute; width: 60px; height: 90px; transition: opacity 0.3s; }
.f5-grid-card { position: absolute; box-shadow: 2px 2px 8px rgba(0,0,0,0.8); border-radius: 4px; }

.cinematic-text-box { position: absolute; bottom: 2dvh; width: 100%; text-align: center; display: flex; flex-direction: column; gap: 1.5vh; z-index: 30 !important; pointer-events: none;}
.cine-line { opacity: 0; transition: opacity 1.5s ease-in-out; } .cine-line.visible { opacity: 1; }
.cine-desc { font-size: min(1.8rem, 3.5vh); color: #E6E6E6; } 
.cine-num { font-size: min(2.4rem, 4.5vh); color: #D4AF37; font-family: 'Consolas', monospace; font-weight: bold; } 
.cine-math { font-size: min(2.0rem, 4vh); color: #FFFFFF; font-family: 'Consolas', monospace; font-weight: bold; }

.msg-pc { display: inline; }
.msg-mobile { display: none; }

#admin-panel { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 95%; max-width: 1000px; max-height: 85vh; overflow-y: auto; background: rgba(0, 15, 0, 0.95); border: 2px solid #00FF00; z-index: 3000; padding: 20px; box-shadow: 0 0 30px rgba(0, 255, 0, 0.4); font-family: 'Courier New', monospace; }
.admin-title { color: #00FF00; text-align: center; font-size: 1.8rem; border-bottom: 1px solid #00FF00; padding-bottom: 10px; margin-bottom: 20px; }
.admin-close { position: absolute; top: 15px; right: 15px; background: #330000; color: #FF0000; border: 1px solid #FF0000; padding: 5px 15px; cursor: pointer; font-weight: bold; }
.admin-content { color: #00FF00; font-size: 14px; display: flex; flex-direction: column; gap: 20px; }
.admin-section { background: rgba(0, 40, 0, 0.6); padding: 15px; border: 1px solid #005500; border-radius: 5px; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 10px; table-layout: auto; }
.admin-table th { background: rgba(0, 80, 0, 0.5); padding: 6px; text-align: center; cursor: pointer; transition: 0.2s; border: 1px solid #005500; font-size: 13px; }
.admin-table th:hover { background: rgba(0, 150, 0, 0.8); color: #FFF; }
.admin-table td { border: 1px solid #005500; padding: 4px 6px; text-align: center; vertical-align: middle; font-size: 13px; }
.admin-table tr:hover { background: rgba(0, 50, 0, 0.6); }

/* MOBİL TASARIM */
@media (max-width: 1024px) {
    .msg-pc { display: none !important; }
    .msg-mobile { display: inline !important; }

    #game-title { font-size: clamp(2.2rem, 5vw, 3.5rem) !important; margin-top: 2vh !important; text-align: center !important; width: 100% !important; line-height: 1; }
    
    .menu-panel, .cnt-menu, .f5-menu-mobile { 
        position: absolute !important;
        top: 8vh !important; 
        left: 50% !important; right: auto !important; 
        transform: translateX(-50%); 
        width: 95vw !important; 
        display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; 
        background: transparent !important; padding: 0 !important; text-align: center;
        z-index: 200 !important;
    }
    .cnt-menu, .f5-menu-mobile { top: 2vh !important; } 
    
    .menu-item, .cnt-menu div { 
        background: rgba(10, 36, 27, 0.9) !important;
        border: 1px solid #D4AF37 !important;
        padding: 4px 8px !important; 
        border-radius: 4px !important; 
        margin-bottom: 0 !important; 
        font-size: clamp(0.7rem, 2vw, 1rem) !important;
    }
    
    .footer { bottom: 1vh !important; font-size: 0.65rem; display: block !important; text-align: center !important;}
    #contact-overlay { top: 38% !important; }
    
    #column-prompt { 
        position: absolute !important;
        left: 50% !important; 
        right: auto !important; 
        top: auto !important; 
        bottom: 12vh !important; 
        transform: translateX(-50%) scale(0.9) !important; 
        min-width: 220px !important; 
    }
    .popup-box h3 { font-size: 1.3rem; margin-bottom: 2px; }
    .col-btn { width: 35px; height: 35px; font-size: 1.4rem; }
    
    #cnt-title { font-size: clamp(1.3rem, 4vw, 2rem); margin-top: 12vh; }
    .time-grid { gap: 1vw; margin-top: 3vh; flex-wrap: nowrap !important; width: 100%; justify-content: center; padding: 0 5px;}
    .time-box { width: 23%; height: 7vh; min-height: 50px; } 
    .time-box .value { font-size: clamp(1.1rem, 3vw, 2rem); }
    .time-box .label { font-size: 0.55rem; top: -14px; }
    .ghost-grid { margin-top: 5vh !important; }
    .time-box.ghost .label { color: #FFFFFF !important; font-size: 0.55rem; top: -14px !important; }
    
    .matrix-data { width: 90vw !important; margin: 3vh auto 0 auto; text-align: center; padding-bottom: 12vh; display: flex; flex-direction: column; align-items: center;}
    .matrix-data .mono-font { font-size: clamp(10px, 3vw, 14px); display: block; margin-top: 5px; white-space: normal !important; word-wrap: break-word !important; word-break: break-all !important; width: 100%; color: #FFF; text-shadow: 0 0 10px rgba(255,255,255,0.8); line-height: 1.5; }
    .speed-text { font-size: 0.8rem; display: block !important; margin-top: 2vh;}
    
    .cinematic-text-box { 
        padding: 10px; 
        gap: 1vh; 
        bottom: 2vh; 
        margin-bottom: 0px; 
        z-index: 2 !important; 
        background: transparent !important; 
        border-radius: 0px;
        box-shadow: none;
    }
    .cine-desc { font-size: clamp(12px, 3.5vw, 18px); }
    .cine-num { font-size: clamp(14px, 4vw, 22px); white-space: normal !important; word-break: break-all !important; padding: 0 10px; }
    .cine-math { font-size: clamp(12px, 3.5vw, 18px); }
    
    .bottom-numbers { bottom: 3vh; }
}

@media (max-width: 1024px) and (max-height: 720px) {
    .popup-box { bottom: 10vh !important; transform: translateX(-50%) scale(0.85) !important; }
}