/* Font Definitions */
@font-face {
    font-family: 'MANUKA-BOLD';
    src: url('../fonts/manuka-bold.woff2') format('woff2') !important;
    font-weight: normal;
    font-style: normal;
    font-display: block;
    font-feature-settings: 'kern' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography with Fallbacks */
h1.display-4 {
    font-family: 'MANUKA-BOLD', sans-serif !important;
    font-size: 5.5rem !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'kern' 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-bottom: 1rem !important;
    text-shadow: 0 0 30px rgba(var(--bs-info-rgb), 0.4);
    letter-spacing: -0.02em;
}

.fonts-loaded h1.display-4 {
    opacity: 1;
}

.fonts-failed h1.display-4 {
    opacity: 1;
    font-family: 'Arial Black', 'Helvetica Bold', sans-serif !important;
}

/* Banner Background */
.banner-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 84, 250, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    opacity: 0.8;
    z-index: 0;
    pointer-events: none;
}

/* Base Styles */
body, p, .lead, input, button, .btn {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.card-text, p, .lead {
    color: var(--bs-white) !important;
}

#referral-link,
.referral-code {
    font-family: 'DM Mono', 'Courier New', monospace;
}

/* Form Controls */
.form-control {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: var(--bs-white) !important;
    padding: 1rem 1.25rem !important;
    font-size: 1.1rem !important;
    transition: all 0.3s ease-in-out !important;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(var(--bs-info-rgb), 0.5) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-info-rgb), 0.25) !important;
}

/* Animation */
@keyframes sparkle {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

/* Sparkle Effect */
.sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--bs-info);
    border-radius: 50%;
    animation: sparkle 0.8s linear forwards;
    pointer-events: none;
    will-change: transform, opacity;
    box-shadow: 0 0 15px var(--bs-info), 0 0 25px var(--bs-info);
}

/* Countdown Timer Styles */
.countdown-wrapper {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-item span:first-child {
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--bs-info);
    line-height: 1;
}

.countdown-label {
    font-size: 0.9rem;
    color: var(--bs-light);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Base Styles */
.gradient-bg {
    background: linear-gradient(135deg, var(--bs-dark) 0%, #0054FA 100%);
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Enhanced Floating Image with Parallax */
.floating {
    animation: float 6s ease-in-out infinite;
    position: relative;
    perspective: 1000px;
    transform-style: preserve-3d;
    will-change: transform;
}

.floating img {
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
    will-change: transform;
    filter: drop-shadow(0 0 15px rgba(var(--bs-info-rgb), 0.3));
    cursor: move;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: none;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.content-wrapper {
    position: relative;
    z-index: 2;
}

/* Input Group Styles */
.input-group {
    background: transparent !important;
}

.input-group .btn {
    padding: 1rem 1.5rem !important;
    font-weight: 500;
    transition: all 0.3s ease-in-out;
}

/* Referral Section Styles */
#referral-section {
    margin-top: 2rem;
    transition: all 0.3s ease-in-out;
}

.card {
    background: rgba(0, 0, 0, 0.2) !important;
    margin-bottom: 2rem;
}

.card-body {
    padding: 1.5rem;
}

#referral-section.show {
    opacity: 1;
    transform: translateY(0);
}

#referral-section:not(.show) {
    opacity: 0;
    transform: translateY(-20px);
}

.referral-link-container {
    position: relative;
}

.copy-feedback {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bs-dark);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s;
    color: var(--bs-white);
}

.copy-feedback.show {
    opacity: 1;
}

/* High Contrast Text */
.text-info {
    color: #5cddff !important;
}

/* Media Query for touch devices */
@media (hover: none) {
    .floating img {
        transition: transform 0.3s ease-out;
    }
}