/* Polymarket-inspired landing page design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Kalshi-green palette */
    --bg-primary: #04140d;
    --bg-secondary: #072015;
    --bg-tertiary: #0b2a1b;
    --bg-quaternary: #0f3824;
    --text-primary: #e9f7ee;
    --text-secondary: #b7d7c3;
    --text-muted: #7ea18d;
    --accent-primary: #00d54b;
    --accent-secondary: #0fbf7f;
    --accent-tertiary: #1f9f55;
    --border-primary: #1a3b29;
    --border-secondary: #1f4631;
    --success: #00d54b;
    --warning: #f59e0b;
    --error: #ff4d6d;
    --gradient-primary: linear-gradient(135deg, #00d54b 0%, #0fbf7f 100%);
    --gradient-secondary: linear-gradient(135deg, #0fbf7f 0%, #1f9f55 100%);
    --gradient-tertiary: linear-gradient(135deg, #0b7a3c 0%, #1f9f55 100%);
    --gradient-hero: linear-gradient(135deg, #04140d 0%, #072015 45%, #0b2a1b 100%);
    --gradient-purple: linear-gradient(135deg, #04140d 0%, #072015 30%, #0b2a1b 70%, #0f3824 100%);
    --shadow-primary: 0 4px 20px rgba(0, 213, 75, 0.25);
    --shadow-secondary: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-tertiary: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(0, 213, 75, 0.2);
    --shadow-purple: 0 0 60px rgba(0, 213, 75, 0.25);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-hero) !important;
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Global footer */
.site-footer {
    background: rgba(255, 255, 255, 0.06);
    border-top: 1px solid var(--border-primary);
    backdrop-filter: blur(10px);
    margin-top: 2rem;
    position: relative;
    z-index: 10;
}
.footer-inner {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    color: var(--text-secondary);
}
.footer-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}
.footer-link:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: radial-gradient(circle at 10% 10%, rgba(0, 213, 75, 0.14), transparent 35%), 
                radial-gradient(circle at 80% 20%, rgba(15, 191, 127, 0.12), transparent 40%),
                var(--gradient-purple) !important;
    background-color: var(--bg-primary) !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: center;
    padding: 2rem 0;
}

/* Logo Section */
.logo-section {
    margin-bottom: 4rem;
}

/* Logo Section */
.logo-section {
    margin-bottom: 4rem;
}

.logo-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.animated-logo {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.4));
    animation: logoFloat 3s ease-in-out infinite;
    transition: all 0.3s ease;
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.2);
}

/* Logo animations */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    50% {
        transform: translateY(-10px) rotate(2deg) scale(1.05);
    }
}

/* Logo hover effects */
.logo-container:hover .animated-logo {
    animation-play-state: paused;
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 50px rgba(255, 255, 255, 0.8));
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.4);
}

.logo-section h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 20px rgba(0, 213, 75, 0.35));
    }
    to {
        filter: drop-shadow(0 0 30px rgba(20, 178, 255, 0.5));
    }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 160px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 213, 75, 0.12), transparent);
    transition: left 0.6s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.feature-card:nth-child(4):hover {
    border-color: var(--accent-tertiary);
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

/* Auth Section */
.auth-section {
    margin-top: 3rem;
}

.auth-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    backdrop-filter: blur(15px);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 20px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.auth-btn::before {
    content: '';
    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.5s;
}

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

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

.auth-note {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Background Elements */
.background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-card {
    position: absolute;
    width: 200px;
    height: 120px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.floating-card.card-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-card.card-2 {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-card.card-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.neon-line {
    position: absolute;
    width: 220px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 213, 75, 0.8), transparent);
    box-shadow: 0 0 18px rgba(0, 213, 75, 0.6);
    filter: blur(0.2px);
    opacity: 0.6;
    animation: neonPulse 4s ease-in-out infinite;
}

.neon-line.line-1 { top: 18%; left: 12%; transform: rotate(8deg); }
.neon-line.line-2 { top: 55%; right: 10%; width: 280px; transform: rotate(-6deg); animation-delay: 1s; }
.neon-line.line-3 { bottom: 22%; left: 25%; width: 260px; transform: rotate(4deg); animation-delay: 2s; }

@keyframes neonPulse {
    0%, 100% { opacity: 0.4; box-shadow: 0 0 14px rgba(0, 213, 75, 0.4); }
    50% { opacity: 0.9; box-shadow: 0 0 24px rgba(0, 213, 75, 0.8); }
}

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

/* Modal window */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: var(--bg-secondary);
    margin: 5% auto;
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-primary);
    width: 90%;
    max-width: 450px;
    box-shadow: var(--shadow-secondary);
    position: relative;
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.wallet-status {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid;
}

.wallet-connected {
    background: rgba(0, 212, 170, 0.1);
    color: var(--success);
    border-color: var(--success);
}

.wallet-not-connected {
    background: rgba(255, 71, 87, 0.1);
    color: var(--error);
    border-color: var(--error);
}

.connect-wallet-btn {
    background: var(--gradient-secondary);
    color: var(--text-primary);
    border: none;
    padding: 14px 24px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    width: 100%;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.connect-wallet-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.25);
}

.connect-wallet-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-submit-btn {
    background: var(--gradient-primary);
    color: var(--text-primary);
    border: none;
    padding: 16px 32px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 212, 170, 0.25);
}

.auth-submit-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 20px;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--text-primary);
}

.message {
    margin-top: 1.5rem;
    padding: 12px 16px;
    text-align: center;
    border-radius: 8px;
    font-weight: 500;
}

.message.success {
    background: rgba(0, 212, 170, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.message.error {
    background: rgba(255, 71, 87, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
}

.message.info {
    background: rgba(79, 70, 229, 0.1);
    color: var(--accent-tertiary);
    border: 1px solid var(--accent-tertiary);
}

/* Modal animations */
@keyframes modalOverlayFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalOverlayFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes modalContentZoomIn { from { transform: translateY(8px) scale(0.97); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes modalContentZoomOut { from { transform: translateY(0) scale(1); opacity: 1; } to { transform: translateY(8px) scale(0.97); opacity: 0; } }

.modal.modal-open { animation: modalOverlayFadeIn 200ms ease forwards; }
.modal.modal-closing { animation: modalOverlayFadeOut 180ms ease forwards; }

.modal.modal-open .modal-content { animation: modalContentZoomIn 240ms cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.modal.modal-closing .modal-content { animation: modalContentZoomOut 180ms ease forwards; }

/* Kalshiacademy palette overrides */
body {
    background: var(--gradient-hero) !important;
    color: var(--text-primary) !important;
}

.hero-section {
    background: radial-gradient(circle at 10% 10%, rgba(0, 213, 75, 0.14), transparent 35%), 
                radial-gradient(circle at 80% 20%, rgba(15, 191, 127, 0.12), transparent 40%),
                var(--gradient-purple) !important;
}

.feature-card {
    background: linear-gradient(135deg, rgba(13, 51, 33, 0.9), rgba(9, 34, 22, 0.95));
    border-color: rgba(26, 59, 41, 0.85);
    box-shadow: 0 12px 40px rgba(0, 213, 75, 0.18);
}

.feature-card:hover {
    border-color: rgba(0, 213, 75, 0.65);
    box-shadow: 0 12px 40px rgba(0, 213, 75, 0.28);
    background: linear-gradient(135deg, rgba(18, 72, 44, 0.95), rgba(11, 46, 30, 0.98));
}

.auth-btn {
    background: linear-gradient(135deg, rgba(0, 213, 75, 0.26), rgba(15, 191, 127, 0.18));
    border-color: rgba(0, 213, 75, 0.4);
}

.auth-btn:hover {
    border-color: rgba(0, 213, 75, 0.65);
    box-shadow: 0 12px 40px rgba(0, 213, 75, 0.3);
}

.floating-card {
    background: rgba(0, 213, 75, 0.08);
    border-color: rgba(0, 213, 75, 0.25);
    opacity: 0.22;
}

.modal-content {
    background: linear-gradient(180deg, rgba(8, 30, 18, 0.96) 0%, rgba(6, 20, 13, 0.96) 100%);
    border-color: var(--border-primary);
    box-shadow: 0 10px 50px rgba(0, 213, 75, 0.2);
}

.form-group input {
    background: var(--bg-tertiary);
    border-color: var(--border-secondary);
}

.auth-submit-btn {
    background: var(--gradient-primary);
    box-shadow: 0 8px 30px rgba(0, 213, 75, 0.2);
}

/* Responsive design */
@media (max-width: 768px) {
    .logo-section h1 {
        font-size: 3rem;
    }
    
    .animated-logo {
        width: 100px;
        height: 100px;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .auth-btn {
        padding: 16px 32px;
        font-size: 1rem;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 2rem;
    }
    
    .floating-card {
        width: 150px;
        height: 90px;
    }
}

@media (max-width: 480px) {
    .logo-section h1 {
        font-size: 2.5rem;
    }
    
    .animated-logo {
        width: 80px;
        height: 80px;
    }
    
    .features-grid {
        margin-bottom: 2rem;
    }
    
    .feature-card {
        padding: 1.25rem;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
    
    .floating-card {
        display: none;
    }
}