/* ==========================================================================
   GAMINARY DESIGN SYSTEM & CORE STYLES
   ========================================================================== */

:root {
    /* Color Palette */
    --neon-purple: #9d4edd;
    --neon-purple-bright: #c77dff;
    --neon-purple-dark: #5a189a;
    --neon-purple-glow: rgba(157, 78, 221, 0.6);
    --neon-purple-dim: rgba(157, 78, 221, 0.25);
    
    --bg-dark: #06020b;
    --card-bg: rgba(10, 5, 18, 0.75);
    
    --text-white: #ffffff;
    --text-gray: #b0aab9;
    --text-muted: #6b6375;
    
    --error-red: #ff3366;
    --error-glow: rgba(255, 51, 102, 0.5);
    
    --success-green: #00f5d4;
    --success-glow: rgba(0, 245, 212, 0.5);

    /* Fonts */
    --font-header: 'Orbitron', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Rajdhani', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-dark);
    overflow: hidden;
    height: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-white);
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Background Image Setup with radial glow overlay */
    background: 
        radial-gradient(circle at center, rgba(6, 2, 11, 0.2) 0%, rgba(6, 2, 11, 0.85) 80%, rgba(6, 2, 11, 0.98) 100%),
        url('assets/background-optimized.jpg') no-repeat center center fixed;
    background-size: cover;
}

/* Subtle Sci-Fi background particles/stars overlay */
.stars-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1.5px 1.5px at 20px 30px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, rgba(200, 125, 255, 0.8), rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 90px 110px, #fff, rgba(0,0,0,0)),
        radial-gradient(2.5px 2.5px at 150px 200px, rgba(157, 78, 221, 0.6), rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 250px 250px;
    opacity: 0.25;
    pointer-events: none;
    z-index: 1;
}

/* Lightning flicker micro-animation */
.lightning-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(157, 78, 221, 0.03);
    pointer-events: none;
    opacity: 0;
    z-index: 2;
    animation: lightning-glow 15s infinite;
}

@keyframes lightning-glow {
    0%, 92%, 94%, 98%, 100% { opacity: 0; }
    93% { opacity: 0.6; }
    95% { opacity: 0.1; }
    96% { opacity: 0.8; }
    97% { opacity: 0.2; }
}

/* ==========================================================================
   LAYOUT CONTAINERS
   ========================================================================== */

.page-container {
    width: 100%;
    max-width: 680px;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

/* Header & Logo with subtle drop-shadow pulsing glow */
.header {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    filter: drop-shadow(0 0 25px rgba(157, 78, 221, 0.35));
    animation: logo-pulse 6s ease-in-out infinite alternate;
}

.logo-img {
    display: block;
    width: 100%;
    max-width: 385px;
    height: auto;
}

@keyframes logo-pulse {
    0% {
        filter: drop-shadow(0 0 20px rgba(157, 78, 221, 0.3));
        transform: translateY(0);
    }
    100% {
        filter: drop-shadow(0 0 35px rgba(157, 78, 221, 0.6));
        transform: translateY(-4px);
    }
}

/* Main Waitlist Content Wrapper */
.waitlist-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0 1rem;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

/* Divider with lines and middle layout */
.divider {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 1.1rem;
}

.divider-line {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(157, 78, 221, 0) 0%, 
        rgba(157, 78, 221, 0.3) 50%, 
        rgba(157, 78, 221, 0.6) 85%, 
        var(--neon-purple-bright) 100%
    );
}

.divider-line:last-child {
    background: linear-gradient(270deg, 
        rgba(157, 78, 221, 0) 0%, 
        rgba(157, 78, 221, 0.3) 50%, 
        rgba(157, 78, 221, 0.6) 85%, 
        var(--neon-purple-bright) 100%
    );
}

.divider-text {
    font-family: var(--font-header);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--neon-purple-bright);
    text-shadow: 0 0 10px rgba(199, 125, 255, 0.4);
    padding: 0 0.85rem;
    white-space: nowrap;
    text-align: center;
}

/* Waitlist Headings */
.waitlist-title {
    font-family: var(--font-header);
    font-size: clamp(1.2rem, 2.8vw, 1.7rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--text-white);
    margin-bottom: 0.7rem;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.waitlist-title .highlight {
    color: var(--neon-purple-bright);
    background: linear-gradient(135deg, #fff 30%, var(--neon-purple-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    position: relative;
    display: inline-block;
}

/* Glow effect behind the highlighted word */
.waitlist-title .highlight::after {
    content: 'WAITLIST';
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    filter: blur(12px);
    background: linear-gradient(135deg, #fff 30%, var(--neon-purple-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.75;
}

.waitlist-subtitle {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-gray);
    margin-bottom: 1.9rem;
    text-align: center;
}

/* ==========================================================================
   CYBERPUNK INPUT & BUTTON FORM
   ========================================================================== */

.form-outer-wrapper {
    width: 100%;
    margin-bottom: 2.5rem;
}

.waitlist-form {
    width: 100%;
    position: relative;
}

/* Double-masked chamfered cyber-container */
.cyber-input-border {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, var(--neon-purple-bright), var(--neon-purple-dark));
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.2);
    padding: 1.5px; /* Creates the perfect 1.5px glowing border */
    transition: var(--transition-smooth);
    
    /* Chamfered corners styling:
       Top-left corner is cut by 14px.
       Bottom-right corner is cut by 14px.
       Top-right and bottom-left are square. */
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

.cyber-input-border:focus-within {
    background: linear-gradient(135deg, #ffffff, var(--neon-purple-bright));
    box-shadow: 0 0 25px var(--neon-purple-glow);
}

.cyber-input-inner {
    width: 100%;
    background: #090510;
    display: flex;
    align-items: center;
    padding: 3px 3px 3px 1.1rem;
    position: relative;
    
    /* Identical clip-path to perfectly mask the inner area */
    clip-path: polygon(13px 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%, 0 13px);
}

/* Input Mail Icon Badge */
.input-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-purple-bright);
    margin-right: 0.75rem;
    transition: var(--transition-fast);
}

.input-icon {
    width: 18px;
    height: 18px;
}

.cyber-input-border:focus-within .input-icon-wrapper {
    color: #ffffff;
    filter: drop-shadow(0 0 5px var(--neon-purple-bright));
}

/* Real Input Box */
.email-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-white);
    padding: 0.7rem 0.35rem;
    width: 100%;
}

.email-input::placeholder {
    color: var(--text-muted);
    font-weight: 500;
}

/* Dynamic error outline style when form is invalid */
.cyber-input-border.input-error {
    background: linear-gradient(135deg, var(--error-red), #aa1133);
    box-shadow: 0 0 25px var(--error-glow);
}

.cyber-input-border.input-error .input-icon-wrapper {
    color: var(--error-red);
}

/* Submit Button Cyber Border */
.cyber-button-border {
    position: relative;
    background: linear-gradient(135deg, #ffffff, var(--neon-purple-bright));
    padding: 1.5px;
    transition: var(--transition-smooth);
    margin-left: 0.35rem;
    
    /* Button chamfered corners: Top-left and bottom-right cut by 10px */
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.cyber-button-border:hover {
    background: linear-gradient(135deg, #ffffff, #ffffff);
    box-shadow: 0 0 20px var(--neon-purple-glow);
}

.cyber-button {
    font-family: var(--font-header);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: var(--text-white);
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-purple-dark));
    border: none;
    outline: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: var(--transition-smooth);
    
    clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

/* Shining sheen animation effect on hover */
.cyber-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.25) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-20deg);
    transition: none;
}

.cyber-button:hover::after {
    left: 140%;
    transition: left 0.8s ease-in-out;
}

.cyber-button:active {
    transform: scale(0.97);
}

.cyber-button-border:active {
    box-shadow: 0 0 8px var(--neon-purple-glow);
}

/* Error message field */
.error-message {
    position: absolute;
    bottom: -1.75rem;
    left: 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--error-red);
    opacity: 0;
    transform: translateY(-5px);
    transition: var(--transition-fast);
    pointer-events: none;
}

.error-message.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   SOCIAL MEDIA LINKS
   ========================================================================== */

.social-divider {
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 0.85rem;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.social-badge {
    text-decoration: none;
    display: inline-block;
    transition: var(--transition-smooth);
}

/* Octagonal chamfered shape for social badges */
.badge-border {
    padding: 1.5px;
    background: rgba(157, 78, 221, 0.25);
    transition: var(--transition-smooth);
    
    /* Octagon Clipped Path: Cut 8px from all 4 corners */
    clip-path: polygon(8px 0%, calc(100% - 8px) 0%, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0% calc(100% - 8px), 0% 8px);
}

.badge-inner {
    width: 52px;
    height: 52px;
    background: rgba(10, 5, 18, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neon-purple-bright);
    transition: var(--transition-smooth);
    
    clip-path: polygon(7.5px 0%, calc(100% - 7.5px) 0%, 100% 7.5px, 100% calc(100% - 7.5px), calc(100% - 7.5px) 100%, 7.5px 100%, 0% calc(100% - 7.5px), 0% 7.5px);
}

.badge-inner svg {
    width: 22px;
    height: 22px;
    transition: var(--transition-smooth);
}

/* Social Hover Animations */
.social-badge:hover {
    transform: translateY(-4px);
}

.social-badge:hover .badge-border {
    background: linear-gradient(135deg, #ffffff, var(--neon-purple-bright));
    box-shadow: 0 0 15px var(--neon-purple-glow);
}

.social-badge:hover .badge-inner {
    background: var(--neon-purple-dark);
    color: #ffffff;
}

.social-badge:hover .badge-inner svg {
    transform: scale(1.12);
    filter: drop-shadow(0 0 5px #ffffff);
}

/* ==========================================================================
   SUCCESS MODAL POPUP
   ========================================================================== */

/* ==========================================================================
   SUCCESS TOAST ALERTS
   ========================================================================== */

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    width: 100%;
    min-width: 320px;
    max-width: 440px;
    background: linear-gradient(135deg, var(--success-green), var(--neon-purple));
    padding: 1.5px; /* Perfect 1.5px glowing border */
    box-shadow: 0 0 20px var(--success-glow);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.15), opacity 0.5s ease;
    
    /* Cyber chamfer corners */
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.toast.active {
    transform: translateX(0);
    opacity: 1;
}

.toast-inner {
    background: #090510;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    
    clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

.toast-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success-green);
    filter: drop-shadow(0 0 5px var(--success-glow));
    flex-shrink: 0;
}

.toast-icon {
    width: 24px;
    height: 24px;
}

.toast-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.toast-title {
    font-family: var(--font-header);
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    color: var(--success-green);
    text-shadow: 0 0 5px var(--success-glow);
}

.toast-message {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 0.05em;
    word-break: normal;
    overflow-wrap: anywhere;
}

/* ==========================================================================
   RESPONSIVE OPTIMIZATIONS
   ========================================================================== */

@media (max-width: 600px) {
    html {
        overflow-y: auto;
        height: auto;
    }

    body {
        height: auto;
        max-height: none;
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        align-items: flex-start;
    }

    .header {
        margin-bottom: 1.75rem;
    }

    .page-container {
        padding: 2.25rem 1rem 2.75rem;
    }
    
    .logo-wrapper {
        max-width: 72%;
    }
    
    .divider-text {
        font-size: 0.52rem;
        padding: 0 0.6rem;
    }

    .waitlist-title {
        font-size: clamp(1.05rem, 6vw, 1.35rem);
    }

    .waitlist-title .highlight {
        display: inline;
    }

    .waitlist-subtitle {
        font-size: 0.74rem;
        margin-bottom: 1.5rem;
    }
    
    .cyber-input-inner {
        flex-direction: column;
        padding: 0.85rem;
        align-items: stretch;
        clip-path: none;
    }
    
    .cyber-input-border {
        clip-path: none;
    }
    
    .input-icon-wrapper {
        display: none; /* Hide icon on mobile to save horizontal space */
    }
    
    .email-input {
        text-align: center;
        padding: 0.25rem 0;
        margin-bottom: 0.5rem;
        font-size: 0.82rem;
        border-bottom: 1px solid rgba(157, 78, 221, 0.25);
    }
    
    .cyber-button-border {
        margin-left: 0;
        width: 100%;
        clip-path: none;
    }
    
    .cyber-button {
        width: 100%;
        clip-path: none;
        padding: 0.55rem 0.8rem;
        font-size: 0.72rem;
    }
    
    .social-links {
        gap: 0.75rem;
    }
    
    .badge-inner {
        width: 44px;
        height: 44px;
    }
    
    .badge-inner svg {
        width: 18px;
        height: 18px;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    .toast {
        min-width: unset;
        max-width: 100%;
    }
}
