/* Signal IQ v3.50 - Premium Homepage Styles */

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: #0a0c10;
    color: #ffffff;
    position: relative;
}

/* Background Gradient */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 80% 50% at 50% 50%, rgba(30, 58, 95, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse 60% 40% at 80% 70%, rgba(100, 116, 139, 0.1) 0%, transparent 40%),
        linear-gradient(180deg, #0a0c10 0%, #0f1419 50%, #0a0c10 100%);
    z-index: 0;
}

/* Subtle animated background pulse */
.background-gradient::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
    animation: backgroundPulse 8s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}

/* Orb Layers */
.orb-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.orb-layer-back {
    z-index: 1;
}

.orb-layer-front {
    z-index: 10;
}

/* Individual Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
}

.orb-back {
    opacity: 0.4;
    filter: blur(1px);
}

.orb-front {
    opacity: 0.7;
    filter: blur(0.5px);
}

/* Orb glow effect */
.orb::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: inherit;
    filter: blur(8px);
    opacity: 0.5;
}

/* Content Wrapper */
.content-wrapper {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

/* Brand Name */
.brand-name {
    font-size: clamp(48px, 10vw, 120px);
    font-weight: 200;
    letter-spacing: -0.02em;
    line-height: 1.2;
    display: flex;
    align-items: baseline;
    gap: 0.15em;
    text-shadow: 
        0 0 60px rgba(59, 130, 246, 0.3),
        0 0 120px rgba(59, 130, 246, 0.15);
    position: relative;
    padding-bottom: 0.1em;
}

.brand-signal {
    color: #e2e8f0;
    font-weight: 300;
    background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-iq {
    color: #3b82f6;
    font-weight: 500;
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.brand-version {
    font-size: 0.22em;
    font-weight: 400;
    color: #64748b;
    letter-spacing: 0.05em;
    margin-left: 0.3em;
    align-self: flex-end;
    margin-bottom: 0.15em;
    opacity: 0.8;
}

/* Character collision effect */
.brand-name .char {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.brand-name .char.hit {
    animation: charBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes charBounce {
    0% { transform: scale(1) translateY(0); }
    30% { transform: scale(1.15) translateY(-8px); }
    60% { transform: scale(0.95) translateY(2px); }
    100% { transform: scale(1) translateY(0); }
}

/* Enter Button */
.enter-btn {
    position: relative;
    padding: 18px 64px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #e2e8f0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(30, 58, 95, 0.2) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.enter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    transition: left 0.5s ease;
}

.enter-btn:hover::before {
    left: 100%;
}

.enter-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(30, 58, 95, 0.3) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 
        0 10px 40px rgba(59, 130, 246, 0.2),
        0 0 60px rgba(59, 130, 246, 0.1);
}

.enter-btn:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.enter-btn:hover .btn-glow {
    opacity: 1;
}

/* Implosion Container */
.implosion-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

/* Implosion Particles */
.implosion-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

/* Implosion flash effect */
.implosion-flash {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: flashPulse 0.4s ease-out forwards;
}

@keyframes flashPulse {
    0% { 
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% { 
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* Orb imploding animation */
.orb.imploding {
    animation: orbImplode 0.3s ease-in forwards;
}

@keyframes orbImplode {
    0% { 
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }
    100% { 
        transform: scale(0);
        opacity: 0;
    }
}

/* Particle burst animation */
.implosion-particle {
    animation: particleBurst 0.6s ease-out forwards;
}

@keyframes particleBurst {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Subtle noise overlay for premium feel */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        gap: 50px;
    }
    
    .enter-btn {
        padding: 16px 48px;
        font-size: 14px;
    }
    
    .brand-name {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-section {
        gap: 40px;
    }
    
    .enter-btn {
        padding: 14px 40px;
        font-size: 13px;
    }
}

/* Password Modal Styles */
.password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 12, 16, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.password-modal.active {
    opacity: 1;
    visibility: visible;
}

.password-modal-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 40px 50px;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(59, 130, 246, 0.1);
}

.password-modal.active .password-modal-content {
    transform: scale(1) translateY(0);
}

.password-title {
    font-size: 24px;
    font-weight: 400;
    color: #e2e8f0;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 0.05em;
}

.password-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

/* Slightly tighter spacing since we now have 2 inputs (email + password) */
.password-input-wrapper + .password-input-wrapper {
    margin-top: 12px;
}

.password-input {
    width: 100%;
    padding: 15px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

.password-input::placeholder {
    color: #64748b;
}

.password-input:focus {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

.password-input.error {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
    animation: inputShake 0.5s ease;
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.password-underline {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 0 0 8px 8px;
}

.password-input:focus + .password-underline {
    width: 100%;
    left: 0;
}

.password-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    margin-bottom: 25px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.password-error.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.error-icon {
    color: #ef4444;
    font-size: 18px;
}

.error-text {
    color: #fca5a5;
    font-size: 14px;
    line-height: 1.4;
}

.password-help-links {
    margin: -10px 0 18px;
    text-align: right;
}

.password-help-links a {
    color: #93c5fd;
    text-decoration: none;
    font-size: 13px;
}

.password-help-links a:hover {
    color: #dbeafe;
}

.password-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.password-btn {
    flex: 1;
    padding: 14px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-btn-cancel {
    background: transparent;
    border: 1px solid rgba(100, 116, 139, 0.4);
    color: #94a3b8;
}

.password-btn-cancel:hover {
    background: rgba(100, 116, 139, 0.1);
    border-color: rgba(100, 116, 139, 0.6);
    color: #e2e8f0;
}

.password-btn-submit {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.4) 100%);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #e2e8f0;
}

.password-btn-submit:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4) 0%, rgba(37, 99, 235, 0.5) 100%);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.password-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Locked state for 30 second countdown */
.password-modal.locked .password-input {
    pointer-events: none;
    opacity: 0.5;
}

.password-modal.locked .password-btn-submit {
    pointer-events: none;
    opacity: 0.5;
}

@media (max-width: 480px) {
    .password-modal-content {
        padding: 30px 25px;
    }
    
    .password-title {
        font-size: 20px;
    }
    
    .password-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
}
