:root {
    --bg-color: #050508;
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --orb-base: #110022;
    --orb-glow: #7a11ff;
    --font-title: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Background Stars - Clean & Minimal */
.stars {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background-color: var(--bg-color);
}
/* Large ambient lights in background */
.stars::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 15% 50%, rgba(122, 17, 255, 0.04), transparent 35%),
        radial-gradient(circle at 85% 30%, rgba(79, 23, 135, 0.05), transparent 40%);
}

/* Moving Starry Layers (Parallax Effect) */
.twinkling {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background-image: 
        radial-gradient(circle at 25px 35px, rgba(255,255,255,0.7) 1px, transparent 1px),
        radial-gradient(circle at 150px 110px, rgba(255,255,255,0.5) 1px, transparent 1px),
        radial-gradient(circle at 80px 190px, rgba(255,255,255,0.8) 1.5px, transparent 1.5px);
    background-size: 250px 250px;
    animation: drift 150s linear infinite;
    opacity: 0.6;
}

.twinkling::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(circle at 10px 150px, rgba(255,255,255,0.4) 1px, transparent 1px),
        radial-gradient(circle at 120px 50px, rgba(255,255,255,0.9) 2px, transparent 2px),
        radial-gradient(circle at 200px 210px, rgba(255,255,255,0.5) 1px, transparent 1px);
    background-size: 300px 300px;
    animation: drift 90s linear infinite;
}

@keyframes drift {
    from { background-position: 0 0; }
    to { background-position: -600px 600px; }
}

/* Header / Language Switcher */
header {
    padding: 24px;
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 100;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.donate-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 18px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.donate-btn:hover {
    background: rgba(122, 17, 255, 0.3);
    border-color: rgba(122, 17, 255, 0.5);
    box-shadow: 0 0 15px rgba(122, 17, 255, 0.4);
}

.donate-btn svg {
    color: #ff4757;
}

select {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 18px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
}

select:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

select option {
    background: #111;
    color: var(--text-primary);
}

/* Main Content */
.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 10;
}

h1 {
    font-family: var(--font-title);
    font-size: clamp(2rem, 8vw, 4rem);
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 12px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0 10px;
}

.instruction {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    color: var(--text-muted);
    margin-bottom: clamp(30px, 8vw, 60px);
    text-align: center;
    font-weight: 400;
    padding: 0 15px;
}

/* Premium 3D Crystal Orb */
.orb-container {
    position: relative;
    width: clamp(140px, 25vw, 200px);
    height: clamp(140px, 25vw, 200px);
    margin: 0 auto 50px;
    cursor: pointer;
    perspective: 1000px;
    user-select: none;
}

.orb {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle at 40% 30%, rgba(122, 17, 255, 0.4), var(--orb-base) 80%);
    box-shadow: 
        0 15px 40px rgba(122, 17, 255, 0.2), /* outer glow */
        inset 0 0 40px rgba(0, 0, 0, 0.8), /* inner darkness */
        inset 0 20px 40px rgba(255, 255, 255, 0.1), /* top light rim */
        inset 0 -20px 40px rgba(122, 17, 255, 0.4); /* bottom rim light */
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    animation: float 6s ease-in-out infinite;
    backdrop-filter: blur(5px);
}

/* Glass glare effect inside orb */
.orb::after {
    content: '';
    position: absolute;
    top: 5%;
    left: 10%;
    width: 45%;
    height: 35%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 60%);
    transform: rotate(-30deg);
}

.orb-container:hover .orb {
    transform: scale(1.05);
    box-shadow: 
        0 20px 50px rgba(122, 17, 255, 0.35),
        inset 0 0 30px rgba(0, 0, 0, 0.8),
        inset 0 25px 40px rgba(255, 255, 255, 0.15),
        inset 0 -25px 50px rgba(122, 17, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.orb-container:active .orb {
    transform: scale(0.95);
    box-shadow: 
        0 5px 20px rgba(122, 17, 255, 0.2),
        inset 0 0 50px rgba(0, 0, 0, 0.9),
        inset 0 10px 20px rgba(255, 255, 255, 0.1);
}

.orb.shaking {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* Result Area */
.result-container {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    padding: 0 20px;
    box-sizing: border-box;
    pointer-events: none;
}

.result-container.hidden .result-text {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
}

/* Sleek Dark Box for Result */
.result-text {
    font-family: var(--font-title);
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    color: #e2e8f0;
    text-align: center;
    font-weight: 500;
    line-height: 1.5;
    
    background: rgba(10, 10, 16, 0.7);
    border: 1px solid rgba(122, 17, 255, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 20px 32px;
    width: 100%;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4), 
        0 0 20px rgba(122, 17, 255, 0.1);

    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- Donate Modal --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
    padding: 20px;
}

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

.modal-content {
    background: rgba(10, 10, 16, 0.85);
    border: 1px solid rgba(122, 17, 255, 0.3);
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 550px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(122, 17, 255, 0.1);
    position: relative;
    transform: translateY(0);
    transition: transform 0.3s ease;
    text-align: center;
}

.modal-overlay.hidden .modal-content {
    transform: translateY(20px);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

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

.modal-content h2 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.donate-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.donate-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
}

.donate-card h3 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    color: var(--orb-highlight);
    margin-bottom: 10px;
}

.donate-card p {
    font-size: 0.95rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.paypal-link {
    display: inline-block;
    background: #0070ba;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.paypal-link:hover {
    background: #005ea6;
}

.qr-code {
    max-width: 150px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

@media (min-width: 600px) {
    .donate-options {
        flex-direction: row;
    }
    .donate-card {
        flex: 1;
    }
}

.result-text.show {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes shake {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(4px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
    40%, 60% { transform: translate3d(6px, 0, 0); }
}
