/* ============================================
   RADAR EBN ALAA - STYLES
   ============================================ */

/* Light is default */
:root {
    --bg-dark: #f5f0e8;
    --bg-deeper: #ede4d4;
    --radar-green: #e8913a;
    --radar-green-dim: #e8913a44;
    --radar-green-glow: #e8913a88;
    --gold: #c9a84c;
    --gold-dim: #c9a84c55;
    --purple: #c23b5c;
    --purple-dim: #c23b5c44;
    --cyan: #c17850;
    --card-bg: #ffffff;
    --card-border: #ddd0c0;
    --text-primary: #1a1410;
    --text-secondary: #6b5e4e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', 'Reem Kufi', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    direction: rtl;
    text-align: center;
    transition: background 0.4s ease, color 0.4s ease;
}

body[data-lang="en"] {
    font-family: 'Inter', 'Cairo', sans-serif;
    direction: ltr;
}

body[data-lang="en"] .card-body {
    text-align: left;
}

body[data-lang="en"] .genie-bubble {
    direction: ltr;
    text-align: left;
}

.hidden {
    display: none !important;
}

/* ============================================
   STARFIELD CANVAS
   ============================================ */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.15;
}

/* ============================================
   FLOATING PARTICLES
   ============================================ */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: floatParticle linear infinite;
    opacity: 0;
}

@keyframes floatParticle {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ============================================
   INTRO SCREEN
   ============================================ */
#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-deeper);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

#intro-screen.fade-out {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.intro-content {
    text-align: center;
    animation: fadeInUp 1s ease 0.3s both;
}

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

/* Genie Lamp */
.genie-lamp-intro {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.lamp {
    position: relative;
    width: 180px;
    height: 160px;
    animation: lampFloat 3s ease-in-out infinite;
}

.lamp-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px var(--gold-dim));
}

@keyframes lampFloat {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

/* Intro Title */
.intro-title {
    margin-bottom: 1rem;
}

.title-line-1 {
    display: block;
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    background: linear-gradient(135deg, #e8913a, #f2c464);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 0 20px var(--radar-green-dim));
    animation: titleGlow 2s ease-in-out infinite alternate;
    line-height: 1.2;
}

.title-line-2 {
    display: block;
    font-size: clamp(2rem, 7vw, 4rem);
    font-weight: 700;
    background: linear-gradient(135deg, #c23b5c, #e86a5a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 15px var(--purple-dim));
    line-height: 1.2;
}

@keyframes titleGlow {
    from { filter: drop-shadow(0 0 20px var(--radar-green-dim)); }
    to { filter: drop-shadow(0 0 40px var(--radar-green-glow)); }
}

.intro-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease 0.8s both;
}

/* Magic Button */
.magic-btn {
    position: relative;
    padding: 1rem 3rem;
    font-family: 'Cairo', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #c9a84c, #e8913a, #c9a84c);
    background-size: 200% 200%;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    overflow: hidden;
    animation: fadeInUp 1s ease 1.2s both, shimmerBtn 3s ease infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.magic-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 40px var(--gold-dim), 0 0 80px var(--gold-dim);
}

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

@keyframes shimmerBtn {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-sparkle {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: sparkleSlide 2.5s ease-in-out infinite;
}

@keyframes sparkleSlide {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* ============================================
   MAIN HEADER
   ============================================ */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 2rem;
    background: linear-gradient(180deg, var(--bg-deeper) 0%, transparent 100%);
    backdrop-filter: blur(10px);
    animation: slideDown 0.6s ease both;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.mini-radar-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--radar-green);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px var(--radar-green-dim);
}

.mini-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    background: var(--radar-green);
    transform-origin: left center;
    animation: miniSweepRotate 2s linear infinite;
    box-shadow: 0 0 8px var(--radar-green);
}

@keyframes miniSweepRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.site-title {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #e8913a, #c9a84c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Genie Helper */
.genie-helper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    border: 1px solid var(--purple-dim);
    background: rgba(194, 59, 92, 0.1);
    transition: all 0.3s ease;
}

.genie-helper:hover {
    background: rgba(194, 59, 92, 0.2);
    box-shadow: 0 0 20px var(--purple-dim);
    transform: scale(1.05);
}

.genie-avatar {
    position: relative;
    font-size: 1.5rem;
    line-height: 1;
}

.genie-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--purple);
    animation: pulseBorder 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulseBorder {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

.genie-label {
    font-size: 0.9rem;
    color: var(--purple);
    font-weight: 700;
}

/* Genie Bubble */
.genie-bubble {
    position: fixed;
    top: 80px;
    right: 2rem;
    z-index: 99;
    max-width: 320px;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #fff, #faf5ef);
    border: 1px solid var(--purple-dim);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
    animation: bubbleIn 0.4s ease both;
    direction: rtl;
    text-align: right;
}

.genie-bubble.hidden {
    display: none !important;
}

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.bubble-arrow {
    position: absolute;
    top: -8px;
    right: 30px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-top: 1px solid var(--purple-dim);
    border-right: 1px solid var(--purple-dim);
    transform: rotate(-45deg);
}

#genie-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #3d2e22;
}

/* ============================================
   RADAR SECTION
   ============================================ */
#radar-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 1rem 2rem;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

#radar-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232, 145, 58, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: radarBgPulse 4s ease-in-out infinite;
}

@keyframes radarBgPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.radar-container {
    position: relative;
    width: clamp(280px, 80vmin, 500px);
    height: clamp(280px, 80vmin, 500px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 145, 58, 0.05) 0%, transparent 70%);
    animation: radarAppear 1s ease both;
}

@keyframes radarAppear {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* Radar Rings */
.radar-outer-ring {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    border: 2px solid var(--radar-green-dim);
    animation: ringPulse 4s ease-in-out infinite;
}

.radar-middle-ring {
    position: absolute;
    top: 16.5%; left: 16.5%; right: 16.5%; bottom: 16.5%;
    border-radius: 50%;
    border: 1px solid var(--radar-green-dim);
    animation: ringPulse 4s ease-in-out 1s infinite;
}

.radar-inner-ring {
    position: absolute;
    top: 33%; left: 33%; right: 33%; bottom: 33%;
    border-radius: 50%;
    border: 1px solid var(--radar-green-dim);
    animation: ringPulse 4s ease-in-out 2s infinite;
}

@keyframes ringPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Cross Lines */
.radar-cross-h, .radar-cross-v {
    position: absolute;
    background: var(--radar-green-dim);
}

.radar-cross-h {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    transform: translateY(-0.5px);
}

.radar-cross-v {
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    transform: translateX(-0.5px);
}

/* Sweep */
.radar-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 50%;
    transform-origin: top left;
    animation: sweepRotate 3s linear infinite;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(232, 145, 58, 0.15) 25deg,
        rgba(232, 145, 58, 0.4) 35deg
    );
    border-radius: 0 0 100% 0;
    filter: blur(2px);
}

@keyframes sweepRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Center Dot */
.radar-center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--radar-green);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--radar-green), 0 0 20px var(--radar-green-dim);
    z-index: 5;
}

/* Radar Blips */
#radar-blips {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
}

.radar-blip {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--radar-green);
    cursor: pointer;
    transform: translate(-50%, -50%) scale(0);
    animation: blipAppear 0.5s ease both, blipPulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--radar-green), 0 0 20px var(--radar-green-dim);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 6;
}

.radar-blip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--radar-green);
    animation: blipRipple 2s ease-out infinite;
}

.radar-blip:hover {
    transform: translate(-50%, -50%) scale(1.5) !important;
    box-shadow: 0 0 20px var(--radar-green), 0 0 40px var(--radar-green-glow);
}

.radar-blip.discovered {
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold), 0 0 20px var(--gold-dim);
}

.radar-blip.discovered::before {
    border-color: var(--gold);
}

@keyframes blipAppear {
    from { transform: translate(-50%, -50%) scale(0); }
    to { transform: translate(-50%, -50%) scale(1); }
}

@keyframes blipPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes blipRipple {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.radar-hint {
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 1rem;
    animation: fadeInUp 1s ease 0.5s both;
    text-align: center;
}

/* ============================================
   PLACES SECTION
   ============================================ */
#places-section {
    position: relative;
    z-index: 2;
    padding: 5rem 1.5rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.title-icon {
    animation: bounceIcon 2s ease-in-out infinite;
}

@keyframes bounceIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.discovered-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 16px;
    background: linear-gradient(135deg, #e8913a, #c9a84c);
    color: var(--bg-dark);
    font-size: 0.9rem;
    font-weight: 900;
    animation: countPop 0.3s ease;
}

@keyframes countPop {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Places Grid */
.places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Place Card */
.place-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    animation: cardReveal 0.6s ease both;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.place-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(232, 145, 58, 0.1), 0 0 30px var(--radar-green-dim);
    border-color: var(--radar-green-dim);
}

@keyframes cardReveal {
    from { opacity: 0; transform: translateY(30px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.card-image-wrap {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.place-card:hover .card-image {
    transform: scale(1.1);
}

.card-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.card-body {
    padding: 1rem 1.2rem;
    text-align: right;
}

.card-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-location-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    background: rgba(232, 145, 58, 0.1);
    border: 1px solid var(--radar-green-dim);
    color: var(--radar-green);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-location-link:hover {
    background: rgba(232, 145, 58, 0.2);
    box-shadow: 0 0 15px var(--radar-green-dim);
    transform: scale(1.05);
}

.pin-icon {
    font-size: 1rem;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--card-border);
}

/* ============================================
   SCREEN FLASH (on discover)
   ============================================ */
.screen-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #e8913a;
    opacity: 0;
    z-index: 9999;
    pointer-events: none;
    animation: flashBang 0.4s ease both;
}

@keyframes flashBang {
    0% { opacity: 0.3; }
    100% { opacity: 0; }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    #main-header {
        padding: 0.8rem 1rem;
    }

    .site-title {
        font-size: 1rem;
    }

    .genie-label {
        display: none;
    }

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

    .genie-bubble {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }

    .radar-hint {
        font-size: 0.85rem;
    }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deeper);
}

::-webkit-scrollbar-thumb {
    background: var(--radar-green-dim);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--radar-green-glow);
}

/* ============================================
   DARK MODE (opt-in)
   ============================================ */
body.dark {
    --bg-dark: #0f0a06;
    --bg-deeper: #080503;
    --radar-green-dim: #e8913a33;
    --radar-green-glow: #e8913a66;
    --gold-dim: #c9a84c44;
    --purple-dim: #c23b5c33;
    --card-bg: #1a1410;
    --card-border: #2e2318;
    --text-primary: #ede4d4;
    --text-secondary: #8a7e6e;
}

body.dark #main-header {
    background: linear-gradient(180deg, var(--bg-deeper) 0%, transparent 100%);
}

body.dark .genie-bubble {
    background: linear-gradient(135deg, #1e100c, #2a1518);
}

body.dark .bubble-arrow {
    background: #1e100c;
}

body.dark #genie-text {
    color: #e8c4b0;
}

body.dark .magic-btn {
    color: var(--bg-dark);
}

body.dark .secret-key-input {
    background: rgba(0, 0, 0, 0.3);
}

body.dark .lang-toggle {
    background: rgba(0,0,0,0.2);
}

body.dark .theme-toggle {
    background: rgba(0,0,0,0.2);
}

body.dark .modal-box {
    background: var(--card-bg);
}

body.dark #starfield {
    opacity: 1;
}

body.dark .place-card {
    box-shadow: none;
}

/* ============================================
   TOGGLE BUTTONS
   ============================================ */
.intro-toggles {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    z-index: 1001;
    animation: fadeInUp 1s ease 0.2s both;
}

.lang-toggle {
    display: flex;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: rgba(0,0,0,0.2);
}

/* light lang-toggle bg is base default */

.lang-option {
    padding: 0.35rem 0.9rem;
    font-family: 'Cairo', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-option.active {
    background: var(--radar-green);
    color: #fff;
}

/* light lang-option active is base default */

.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

/* light theme-toggle is base default */

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--radar-green);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

#theme-toggle-header {
    width: 34px;
    height: 34px;
    font-size: 1rem;
}

/* ============================================
   SECRET KEY INPUT
   ============================================ */
.secret-key-area {
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease 1s both;
}

.key-input-wrap {
    position: relative;
    max-width: 320px;
    margin: 0 auto 0.75rem;
}

.secret-key-input {
    width: 100%;
    padding: 0.8rem 3rem 0.8rem 1.2rem;
    font-family: 'Cairo', 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid var(--card-border);
    border-radius: 40px;
    outline: none;
    text-align: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* light secret-key-input is base default */

.secret-key-input:focus {
    border-color: var(--radar-green);
    box-shadow: 0 0 20px var(--radar-green-dim);
}

.secret-key-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.eye-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

body[data-lang="en"] .eye-toggle {
    right: 12px;
    left: auto;
}

.key-error {
    color: var(--purple);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.3s ease;
}

.key-hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.hints-link {
    color: var(--radar-green);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
}

.hints-link:hover {
    opacity: 0.7;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-8px); }
    30% { transform: translateX(8px); }
    45% { transform: translateX(-6px); }
    60% { transform: translateX(6px); }
    75% { transform: translateX(-3px); }
    90% { transform: translateX(3px); }
}

.shake {
    animation: shake 0.5s ease;
}

/* ============================================
   HINTS MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
}

.modal-overlay.hidden {
    display: none !important;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    animation: fadeInUp 0.4s ease;
}

/* light modal-box is base default */

.modal-close {
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

body[data-lang="en"] .modal-close {
    right: 1rem;
    left: auto;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-title {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    text-align: center;
}

.hints-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.hint-item {
    padding: 0.8rem 1rem;
    background: rgba(232, 145, 58, 0.08);
    border: 1px solid var(--radar-green-dim);
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* light hint-item is base default */

/* ============================================
   CARD FALLBACK
   ============================================ */
.card-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 4rem;
    background: linear-gradient(135deg, var(--card-bg), var(--card-border));
}

/* ============================================
   RESPONSIVE (additions)
   ============================================ */
@media (max-width: 600px) {
    .header-controls .lang-toggle {
        display: none;
    }

    #theme-toggle-header {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
}
