/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Cyan/Teal Theme */
    --bg-primary: #13171f;
    --bg-secondary: #1a1f2e;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    --cyan-primary: #00bcd4;
    --cyan-glow: #4dd0e1;
    --cyan-dark: #00838f;
    --teal: #26c6da;
    
    /* Glass Effect */
    --glass-bg: rgba(26, 31, 46, 0.6);
    --glass-border: rgba(0, 188, 212, 0.2);
    
    /* Shadows */
    --shadow-glow: 0 0 40px rgba(0, 188, 212, 0.3), 0 0 80px rgba(0, 188, 212, 0.15);
    --shadow-md: 0 8px 24px rgba(0, 188, 212, 0.15);
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* Background Mesh Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(at 0% 0%, rgba(0, 131, 143, 0.3) 0, transparent 50%),
        radial-gradient(at 100% 0%, rgba(38, 198, 218, 0.25) 0, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 131, 143, 0.2) 0, transparent 50%),
        radial-gradient(at 0% 100%, rgba(38, 198, 218, 0.25) 0, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

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

.particle {
    position: absolute;
    background: var(--cyan-glow);
    border-radius: 50%;
    opacity: 0.2;
    animation: float-particle 3s ease-in-out infinite;
}

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

/* Background Glows */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.glow-1 {
    top: 40px;
    right: 40px;
    width: 256px;
    height: 256px;
    background: rgba(0, 188, 212, 0.1);
}

.glow-2 {
    bottom: 40px;
    left: 40px;
    width: 320px;
    height: 320px;
    background: rgba(38, 198, 218, 0.08);
}

/* Main Container */
.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 560px;
    animation: fadeInUp 1s ease;
}

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

/* Glass Card */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px 32px;
    position: relative;
    overflow: hidden;
}

/* Top Glow Effect */
.top-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 75%;
    height: 128px;
    background: radial-gradient(circle, rgba(0, 188, 212, 0.3), transparent 70%);
    opacity: 0.3;
    filter: blur(60px);
    pointer-events: none;
}

/* Logo Container */
.logo-container {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

/* Pulse Ring */
.pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 188, 212, 0.3), 0 0 40px rgba(0, 188, 212, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 188, 212, 0.5), 0 0 60px rgba(0, 188, 212, 0.3);
    }
}

.logo-border {
    position: relative;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan-primary), var(--teal));
    padding: 4px;
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.logo-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-gradient {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan-primary), var(--teal));
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float-logo 3s ease-in-out infinite;
}

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

.logo-icon {
    color: white;
}

/* Sparkles */
.sparkle {
    position: absolute;
    animation: sparkle-pulse 1.5s ease-in-out infinite;
}

.sparkle-1 {
    top: -8px;
    right: -8px;
    color: var(--cyan-glow);
}

.sparkle-2 {
    bottom: -4px;
    left: -4px;
    color: var(--teal);
    animation-delay: 0.5s;
}

@keyframes sparkle-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Headings */
.heading-container {
    text-align: center;
    margin-bottom: 24px;
}

.main-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.gradient-title {
    font-size: 40px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan-primary), var(--teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(77, 208, 225, 0.5), 0 0 40px rgba(77, 208, 225, 0.3);
    line-height: 1.2;
}

/* Subscribers */
.subscribers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    color: var(--text-secondary);
    font-size: 18px;
}

/* Description Box */
.description-box {
    margin-bottom: 32px;
}

.description-content {
    background: rgba(26, 31, 46, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 188, 212, 0.3);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.gift-icon {
    color: var(--cyan-primary);
    flex-shrink: 0;
    margin-top: 4px;
}

.description-content p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-primary);
}

.highlight {
    font-weight: 600;
    color: var(--cyan-glow);
}

/* Button */
.button-container {
    margin-bottom: 32px;
}

.join-button {
    position: relative;
    width: 100%;
    padding: 20px 32px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, var(--cyan-primary), var(--teal));
    color: white;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
}

.join-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 188, 212, 0.4);
}

.join-button:active {
    transform: translateY(0);
}

/* Button Shine Effect */
.button-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
}

.join-button:hover .button-shine {
    left: 100%;
}

.button-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.button-content svg {
    transition: transform 0.3s ease;
}

.join-button:hover .button-content svg {
    transform: translate(4px, -4px);
}

.button-hint {
    text-align: center;
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Bottom Info */
.bottom-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
    font-size: 14px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan-primary);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.info-separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-secondary);
    opacity: 0.3;
}

/* Bottom Glow */
.bottom-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 66%;
    height: 96px;
    background: radial-gradient(circle, rgba(0, 188, 212, 0.2), transparent 70%);
    opacity: 0.2;
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card {
        padding: 32px 24px;
    }
    
    .main-title {
        font-size: 36px;
    }
    
    .gradient-title {
        font-size: 32px;
    }
    
    .description-content {
        padding: 20px;
    }
    
    .description-content p {
        font-size: 16px;
    }
    
    .join-button {
        font-size: 16px;
        padding: 18px 24px;
    }
    
    .bottom-info {
        flex-direction: column;
        gap: 12px;
    }
    
    .info-separator {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    
    .card {
        padding: 24px 20px;
    }
    
    .logo-border {
        width: 112px;
        height: 112px;
    }
    
    .logo-gradient {
        width: 84px;
        height: 84px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .main-title {
        font-size: 32px;
    }
    
    .gradient-title {
        font-size: 28px;
    }
    
    .subscribers {
        font-size: 16px;
    }
    
    .description-content {
        padding: 16px;
    }
    
    .description-content p {
        font-size: 15px;
    }
}


/* ====== Mobile Full-Height Centering & Scroll Control (Overrides) ====== */

/* Make the background layers truly full-viewport on mobile toolbars */
@supports (height: 100svh) {
  html, body { min-height: 100svh; }
  .particles-container { height: 100svh; }
}

/* Lock the page to one screen (no vertical scroll) by default */
html, body {
  height: 100%;
}
body {
  overflow-y: hidden;            /* prevent scroll unless very small screens */
  padding: 16px;                 /* slightly smaller padding on phones */
  display: grid;                 /* perfect centering */
  place-items: center;
}

/* Ensure fixed background layers cover the whole screen sharply */
body::before,
.bg-glow,
.particles-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Card sizing & perfect centering */
.container {
  width: min(92vw, 560px);
  margin: 0 auto;
}

/* Allow scrolling only on extra‑small heights or tiny screens */
@media (max-height: 680px), (max-width: 360px) {
  body {
    overflow-y: auto;            /* enable scroll when needed */
  }
  .container {
    margin-block: 16px;          /* breathing room when scrolling appears */
  }
}

/* Avoid any subtle blurs on background on mobile */
@media (max-width: 768px) {
  .bg-glow { filter: blur(60px); }    /* keep effect but not too aggressive */
  body::before { will-change: auto; } /* avoid excessive compositing blur */
}


/* ====== Fix top/bottom background cut-off on mobile toolbars ====== */
/* Make background layers taller than viewport and center them
   so when the browser UI appears/disappears there are no gaps */
:root {
  --overscan: 140svh;    /* bigger than screen */
  --overscan-shift: -20svh;
}

@supports (height: 100svh) {
  body::before,
  .bg-glow,
  .particles-container {
    height: var(--overscan) !important;
    top: var(--overscan-shift) !important;
    bottom: auto !important;
  }
}

/* Fallback for older browsers */
@supports not (height: 100svh) {
  body::before,
  .bg-glow,
  .particles-container {
    height: 140vh !important;
    top: -20vh !important;
    bottom: auto !important;
  }
}

/* Respect safe areas (iOS notch etc.) while keeping center */
body {
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

/* Keep card clear of rounded screen corners on tiny heights */
@media (max-height: 680px) {
  .container { margin-block: 20px; }
}
