/* === BASE RESET & BODY === */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #1a1a1a;
    font-family: 'Rajdhani', sans-serif;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    color: #f5f5f5;
    position: relative;
}

/* === CARBON FIBER BACKGROUND === */
.carbon-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-conic-gradient(#1a1a1a 0deg 5deg, #222 5deg 10deg);
    background-size: 20px 20px;
    z-index: 0;
}

/* === THREE.JS CANVAS OVERLAY === */
#three-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}

.overlay-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(255,0,0,0.15) 0%, rgba(0,0,0,0.75) 80%);
    z-index: 2;
}

/* === MAIN CONTENT WRAPPER === */
.content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 20px 0;
}

/* === LOGO === */
.logo-container {
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.logo {
    width: 450px;
    max-width: 95%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 25px rgba(255,0,0,0.6));
}

/* === MARQUEE TEXT === */
.marquee-text {
    width: 100%;
    background: rgba(10,10,10,0.9);
    padding: 14px 0;
    /* Checkered flag border via repeating-conic-gradient */
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-image: repeating-conic-gradient(#000 0% 25%, #fff 25% 50%) 6 / 6px;
    margin-bottom: 30px;
    overflow: hidden;
    white-space: nowrap;
    color: #ff0000;
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(14px, 4vw, 20px);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    box-shadow: 0 0 20px rgba(255,0,0,0.3);
}

.marquee-inner {
    display: inline-block;
    animation: scrollText 25s linear infinite;
    padding-left: 100%;
}

@keyframes scrollText {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* === SPEED LINES ANIMATION === */
.speed-lines {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.speed-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,0,0,0.4), transparent);
    animation: speedLine 1.5s linear infinite;
    opacity: 0;
}

@keyframes speedLine {
    0%   { transform: translateX(-100%); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateX(200%); opacity: 0; }
}

/* === CTA BUTTON === */
.btn-wrapper {
    margin-bottom: 50px;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Chrome metallic gradient text effect */
.ref-btn {
    display: inline-block;
    background: linear-gradient(145deg, #ff0000, #cc0000, #ff3333);
    color: #f5f5f5;
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: clamp(20px, 6vw, 30px);
    padding: clamp(14px, 3vw, 20px) clamp(30px, 8vw, 60px);
    border-radius: 4px;
    text-decoration: none;
    /* Checkered flag border accent */
    border: 4px solid transparent;
    outline: 2px solid rgba(192,192,192,0.6);
    box-shadow:
        0 10px 30px rgba(255,0,0,0.6),
        inset 0 2px 5px rgba(255,255,255,0.2),
        0 0 0 1px #333;
    transition: 0.3s;
    letter-spacing: 3px;
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

/* Speed shimmer on button */
.ref-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: btnShimmer 2.5s ease-in-out infinite;
}

@keyframes btnShimmer {
    0%   { left: -100%; }
    100% { left: 200%; }
}

.ref-btn:hover {
    background: linear-gradient(145deg, #cc0000, #990000, #ff0000);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 50px rgba(255,0,0,0.8), inset 0 2px 5px rgba(255,255,255,0.3);
    outline-color: #c0c0c0;
}

/* === FLAG SECTION === */
.flag-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.flag-row {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.flag-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 130px;
    margin-bottom: 15px;
    cursor: pointer;
}

.flag {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ff0000;
    box-shadow: 0 0 25px rgba(255,0,0,0.5);
    animation: spinLeft 10s linear infinite;
    pointer-events: none;
}

.flag-item:active { opacity: 0.8; }

@keyframes spinLeft {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

.country-name {
    margin-top: 10px;
    font-size: clamp(16px, 5vw, 22px);
    font-weight: 700;
    color: #f5f5f5;
    text-shadow: 2px 2px 4px #000;
    text-align: center;
    pointer-events: none;
    font-family: 'Rajdhani', sans-serif;
}

.greeting {
    font-size: clamp(14px, 4.5vw, 18px);
    font-weight: 600;
    color: #c0c0c0;
    text-shadow: 1px 1px 2px #000;
    margin-bottom: 2px;
    pointer-events: none;
    font-family: 'Rajdhani', sans-serif;
}

/* === SEO CONTENT === */
.seo-content {
    width: 100%;
    max-width: 1200px;
    background: rgba(10,10,10,0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(192,192,192,0.3);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: left;
    margin-top: 50px;
    color: #f5f5f5;
    box-shadow: 0 0 30px rgba(255,0,0,0.15);
    /* Carbon fiber inner texture */
    background-image: repeating-conic-gradient(rgba(30,30,30,0.5) 0deg 5deg, rgba(40,40,40,0.5) 5deg 10deg);
    background-size: 12px 12px;
}

.seo-content h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    font-weight: 600;
    /* Chrome metallic gradient text */
    background: linear-gradient(180deg, #fff 0%, #c0c0c0 40%, #888 60%, #c0c0c0 80%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    border-left: 6px solid #ff0000;
    padding-left: 18px;
}

.seo-content p {
    font-size: 16px;
    line-height: 1.9;
    margin-bottom: 18px;
    color: #d0d0d0;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
}

.seo-content b {
    color: #ff0000;
    font-weight: 700;
}

.security-badge {
    background: rgba(255,0,0,0.15);
    border: 1px solid rgba(192,192,192,0.5);
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
    color: #c0c0c0;
    font-weight: 700;
    text-align: center;
    margin-top: 20px;
    backdrop-filter: blur(5px);
    letter-spacing: 2px;
    font-family: 'Oswald', sans-serif;
}

/* === JACKPOT TICKER === */
.jackpot-section {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 15px 20px;
    background: rgba(10,10,10,0.9);
    border: 1px solid rgba(255,0,0,0.3);
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(255,0,0,0.1);
}

.jackpot-title {
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #ff0000;
    margin-bottom: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ticker-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(255,0,0,0.2);
    font-size: 14px;
    color: #ccc;
    font-family: 'Rajdhani', sans-serif;
}

.ticker-item:last-child { border-bottom: none; }
.ticker-time { color: #888; min-width: 45px; font-size: 13px; }
.ticker-game { color: #f5f5f5; min-width: 100px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: bold; }
.ticker-user { color: #aaa; flex: 1; font-family: monospace; font-size: 13px; }
.ticker-amount { color: #ff0000; font-weight: 700; font-size: 14px; }

/* === REVIEW SECTION === */
.review-section {
    width: 100%;
    max-width: 1200px;
    margin: 60px auto 40px;
    padding: 40px 30px;
    background: rgba(10,10,10,0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(192,192,192,0.2);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(255,0,0,0.15);
}

.review-title {
    font-family: 'Oswald', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #c0c0c0;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 3px;
}

.review-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(192,192,192,0.2);
}

.rating-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stars {
    display: flex;
    flex-direction: row-reverse;
    gap: 8px;
}

.stars input { display: none; }

.stars label {
    font-size: 35px;
    color: #444;
    cursor: pointer;
    transition: 0.1s;
}

.stars label:hover,
.stars label:hover ~ label,
.stars input:checked ~ label {
    color: #ff0000;
    text-shadow: 0 0 20px rgba(255,0,0,0.7);
}

.review-input {
    width: 100%;
    max-width: 600px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.review-input textarea {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    background: rgba(255,255,255,0.07);
    border: 2px solid rgba(192,192,192,0.3);
    border-radius: 4px;
    color: #f5f5f5;
    font-size: 16px;
    font-family: 'Rajdhani', sans-serif;
    resize: none;
    height: 60px;
    transition: 0.3s;
}

.review-input textarea:focus {
    outline: none;
    border-color: #ff0000;
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 20px rgba(255,0,0,0.2);
}

.review-input textarea::placeholder {
    color: rgba(255,255,255,0.4);
}

.submit-btn {
    padding: 0 30px;
    background: linear-gradient(145deg, #ff0000, #cc0000);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid rgba(255,255,255,0.3);
    height: 60px;
    min-width: 120px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 2px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255,0,0,0.5);
    background: linear-gradient(145deg, #cc0000, #990000);
}

.reviews-header {
    font-size: 20px;
    font-weight: 600;
    color: #c0c0c0;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 2px;
}

.reviews-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: stretch;
    gap: 20px;
    flex-wrap: wrap;
    min-height: 280px;
}

.review-card {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    background: rgba(20,20,20,0.8);
    border: 1px solid rgba(192,192,192,0.2);
    border-radius: 4px;
    padding: 25px 20px;
    backdrop-filter: blur(5px);
    transition: 0.3s;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.review-card:hover {
    background: rgba(30,30,30,0.9);
    border-color: #ff0000;
    box-shadow: 0 0 30px rgba(255,0,0,0.2);
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff0000, #660000);
    border: 2px solid #c0c0c0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

.reviewer-info {
    display: flex;
    flex-direction: column;
}

.reviewer-name {
    font-weight: 700;
    color: #c0c0c0;
    font-size: 16px;
    font-family: 'Rajdhani', sans-serif;
}

.review-date {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    font-family: monospace;
}

.review-stars {
    color: #ff0000;
    margin-bottom: 15px;
    font-size: 16px;
}

.review-stars i { margin-right: 3px; }

.review-text {
    color: #d0d0d0;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
    font-family: 'Rajdhani', sans-serif;
}

/* === MODAL STYLES (Speed Meter Mini-game) === */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: linear-gradient(135deg, #0a0a0a, #1a0000);
    border: 2px solid #ff0000;
    border-radius: 8px;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 0 60px rgba(255,0,0,0.4), inset 0 0 30px rgba(255,0,0,0.05);
    animation: modal-pop 0.3s ease-out;
    /* Carbon fiber modal background */
    background-image: repeating-conic-gradient(rgba(20,20,20,0.8) 0deg 5deg, rgba(26,26,26,0.8) 5deg 10deg);
    background-size: 10px 10px;
}

@keyframes modal-pop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-title {
    font-family: 'Oswald', sans-serif;
    color: #ff0000;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(255,0,0,0.5);
    letter-spacing: 3px;
}

/* Speed Meter mini-game container */
.minigame-container {
    background: rgba(0,0,0,0.8);
    border: 2px solid #333;
    border-radius: 8px;
    padding: 25px 20px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

/* Speed gauge track */
.speed-gauge-track {
    width: 100%;
    height: 28px;
    background: rgba(50,50,50,0.8);
    border-radius: 14px;
    border: 2px solid #333;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
}

/* Speed gauge fill bar */
.speed-gauge-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #cc0000, #ff0000, #ff4444);
    border-radius: 14px;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 12px rgba(255,0,0,0.6);
    position: relative;
    overflow: hidden;
}

.speed-gauge-fill::after {
    content: '';
    position: absolute;
    top: 0; left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: gaugePulse 1s ease-in-out infinite;
}

@keyframes gaugePulse {
    0%   { left: -50%; }
    100% { left: 150%; }
}

.speed-gauge-label {
    font-family: 'Oswald', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #c0c0c0;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.speed-tap-btn {
    background: linear-gradient(145deg, #ff0000, #cc0000);
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 22px;
    font-weight: 700;
    padding: 18px 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 3px;
    box-shadow: 0 0 20px rgba(255,0,0,0.5);
    transition: 0.1s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.speed-tap-btn:active {
    transform: scale(0.97);
    box-shadow: 0 0 8px rgba(255,0,0,0.4);
}

.speed-tap-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.speed-timer {
    font-family: 'Oswald', sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: #ff0000;
    text-shadow: 0 0 20px rgba(255,0,0,0.6);
    margin: 10px 0;
    letter-spacing: 4px;
}

.modal-message {
    font-size: 18px;
    color: #c0c0c0;
    margin-bottom: 20px;
    min-height: 24px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
}

.success-text {
    color: #ff0000;
    font-weight: 700;
    font-size: 20px;
    text-shadow: 0 0 15px rgba(255,0,0,0.7);
    font-family: 'Oswald', sans-serif;
    letter-spacing: 2px;
}

.hidden {
    display: none !important;
}

.modal-cta-btn {
    background: linear-gradient(145deg, #ff0000, #cc0000);
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 22px;
    font-weight: 700;
    padding: 18px 30px;
    border: 3px solid rgba(255,255,255,0.4);
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 3px;
    box-shadow: 0 0 25px rgba(255,0,0,0.5), inset 0 0 15px rgba(255,255,255,0.1);
    transition: 0.3s;
}

.modal-cta-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 0 45px rgba(255,0,0,0.8), inset 0 0 20px rgba(255,255,255,0.15);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .logo { width: 350px; }
    .flag { width: 85px; height: 85px; }
    .flag-item { min-width: 110px; }
}

@media (max-width: 480px) {
    .logo { width: 280px; }
    .flag { width: 75px; height: 75px; }
    .flag-item { min-width: 100px; }
    .marquee-text { font-size: 13px; padding: 10px 0; }
    .ref-btn { white-space: normal; font-size: 22px; padding: 16px 30px; line-height: 1.3; word-break: keep-all; }
    .ticker-item { font-size: 12px; gap: 6px; }
    .ticker-time { min-width: 35px; }
    .ticker-game { min-width: 80px; }
    .speed-timer { font-size: 32px; }
}

/* === REDUCED MOTION FALLBACK === */
@media (prefers-reduced-motion: reduce) {
    .marquee-inner { animation: none; }
    .flag { animation: none; }
    .ref-btn::after { animation: none; }
    .speed-gauge-fill::after { animation: none; }
    .speed-line { animation: none; }
}
