/* ========================================
   VORTEX WORLD HUB - STYLES
   Plain CSS (No Tailwind)
======================================== */

/* ========================================
   CSS Variables
======================================== */
:root {
    --vortex-dark: #0a0a0f;
    --vortex-panel: #13131f;
    --vortex-accent: #6366f1;
    --vortex-glow: #818cf8;
    --vortex-gold: #fbbf24;
    --foreground: #ededed;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --white-10: rgba(255, 255, 255, 0.1);
    --white-05: rgba(255, 255, 255, 0.05);
    --black-60: rgba(0, 0, 0, 0.6);
}

/* ========================================
   Reset & Base
======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    margin: 0 !important;
    padding: 0 !important;
    scroll-behavior: smooth;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    font-family: Arial, Helvetica, sans-serif;
    /* Purple glow background starting from the very top */
    background: radial-gradient(ellipse 120% 60% at 50% 0%, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.08) 30%, #0a0a0f 60%), #0a0a0f;
    color: var(--foreground);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

.hidden {
    display: none !important;
}

/* ========================================
   Utility Classes
======================================== */
.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex;
    }
}

/* ========================================
   Navbar
======================================== */
.navbar {
    position: relative;
    z-index: 50;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.navbar>* {
    pointer-events: auto;
}

@media (min-width: 768px) {
    .navbar {
        padding: 0 32px;
    }
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-small {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 8px 16px;
    background: rgba(10, 10, 15, 0.6);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-radius: 9999px;
    border: 1px solid var(--white-05);
}

.nav-link {
    font-size: 14px;
    color: var(--gray-300);
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #fff;
}

/* Auth Section */
#auth-section,
#user-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(99, 102, 241, 0.5);
}

.user-name-text {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

/* Buttons */
.btn-primary {
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--vortex-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.btn-primary:hover {
    background: var(--vortex-glow);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.7);
}

.btn-primary-full {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: var(--vortex-accent);
    color: #fff;
    font-weight: 700;
}

.btn-icon {
    padding: 8px;
    border-radius: 50%;
    color: var(--gray-400);
    transition: background 0.2s ease;
}

.btn-icon:hover {
    background: var(--white-10);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

.btn-danger {
    color: #f87171;
    font-weight: 500;
    transition: color 0.2s ease;
}

.btn-danger:hover {
    color: #fca5a5;
}

/* Menu Toggle */
.menu-toggle {
    padding: 8px;
    color: #fff;
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* Mobile Menu */
.mobile-menu {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--vortex-dark);
    border-bottom: 1px solid var(--white-10);
    padding: 16px;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.mobile-link {
    color: var(--gray-300);
    padding: 8px 0;
    font-size: 16px;
    transition: color 0.2s ease;
}

.mobile-link:hover {
    color: #fff;
}

.mobile-auth,
.mobile-user {
    padding-top: 16px;
    border-top: 1px solid var(--white-10);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ========================================
   Main Content
======================================== */
.main-content {
    padding-top: 0;
    padding-bottom: 64px;
    padding-left: 16px;
    padding-right: 16px;
    max-width: 1280px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .main-content {
        padding-left: 32px;
        padding-right: 32px;
    }
}

/* ========================================
   Hero Section
======================================== */
.hero {
    text-align: center;
    margin-top: -100px;
    /* Pull hero up so glow reaches viewport top */
    margin-bottom: 96px;
    padding-top: 100px;
    /* Compensate for negative margin */
    position: relative;
    overflow: visible;
    /* Allow glow to extend beyond bounds */
}

.hero-glow {
    position: absolute;
    top: -200px;
    /* Extended higher to cover navbar area */
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    /* Wider for better coverage */
    height: 800px;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.25) 0%, rgba(99, 102, 241, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 32px;
    filter: drop-shadow(0 0 25px rgba(99, 102, 241, 0.5));
}

@media (min-width: 768px) {
    .hero-logo {
        width: 180px;
        height: 180px;
    }
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 24px;
    background: linear-gradient(to right, #fff, #e5e7eb, #6b7280);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 72px;
    }
}

.accent-text {
    color: var(--vortex-accent);
    -webkit-text-fill-color: var(--vortex-accent);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--gray-400);
    max-width: 672px;
    margin: 0 auto 40px;
}

/* ========================================
   Apps Section
======================================== */
.apps-section {
    margin-bottom: 128px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
}

.section-icon {
    width: 24px;
    height: 24px;
}

.section-icon.gold {
    color: var(--vortex-gold);
}

.section-title {
    font-size: 30px;
    font-weight: 700;
    color: #fff;
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .apps-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* App Card */
.app-card {
    background: rgba(19, 19, 31, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--white-10);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.app-card:hover {
    transform: translateY(-5px);
}

.app-external-link {
    position: absolute;
    top: 0;
    right: 0;
    padding: 16px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.app-external-link:hover {
    opacity: 1;
}

.app-external-link svg {
    width: 20px;
    height: 20px;
    color: var(--gray-400);
}

.app-card:hover .app-external-link svg {
    color: #fff;
}

.app-icon {
    margin-bottom: 16px;
}

.app-icon svg {
    width: 32px;
    height: 32px;
}

.app-icon.accent {
    color: var(--vortex-accent);
}

.app-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.app-description {
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 24px;
    flex-grow: 1;
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.app-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--vortex-glow);
    transition: color 0.2s ease;
}

.app-link:hover {
    color: #fff;
}

/* Badges */
.premium-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: var(--vortex-gold);
}

.premium-badge svg {
    width: 12px;
    height: 12px;
}

.free-badge {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--white-10);
    color: var(--gray-500);
}

/* Coming Soon Card */
.app-card.coming-soon {
    border-style: dashed;
    opacity: 0.7;
}

.app-card.coming-soon:hover {
    transform: none;
    opacity: 0.8;
}

.app-card.coming-soon .app-icon {
    color: var(--gray-500);
}

.coming-soon-badge {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--vortex-accent);
}

/* ========================================
   Premium Section
======================================== */
.premium-section {
    margin-bottom: 96px;
}

.premium-card {
    background: rgba(19, 19, 31, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--white-10);
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.premium-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(126, 34, 206, 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    /* Fix: Prevent blocking clicks to child elements */
}

.premium-title {
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
}

.premium-description {
    font-size: 16px;
    color: var(--gray-300);
    max-width: 672px;
    margin: 0 auto 32px;
}

.btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 9999px;
    background: var(--vortex-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.btn-premium:hover {
    background: var(--vortex-glow);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.6);
}

.btn-premium svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Footer
======================================== */
.footer {
    border-top: 1px solid var(--white-10);
    background: #050508;
    padding-top: 64px;
    padding-bottom: 32px;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .footer-content {
        padding: 0 32px;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.brand-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.footer-tagline {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.7;
}

.footer-heading {
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-link {
    font-size: 14px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--vortex-glow);
}

.footer-link svg {
    width: 12px;
    height: 12px;
}

.footer-bottom {
    border-top: 1px solid var(--white-05);
    padding-top: 32px;
    text-align: center;
}

.copyright {
    font-size: 14px;
    color: var(--gray-600);
}

.social-icon {
    display: inline-flex;
    margin-left: 8px;
    color: var(--gray-500);
    transition: color 0.2s ease;
    vertical-align: middle;
}

.social-icon:hover {
    color: var(--vortex-accent);
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   Modal
======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    /* Ensure modal is always on top */
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black-60);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 16px;
}

.modal {
    width: 100%;
    max-width: 512px;
    background: #101015;
    border: 1px solid var(--white-10);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--white-10);
    background: rgba(255, 255, 255, 0.05);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.modal-close {
    color: var(--gray-400);
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #fff;
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-content {
    padding: 24px;
}

/* Success State */
.success-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 0;
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    color: #22c55e;
    margin-bottom: 16px;
}

.success-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.success-text {
    color: var(--gray-400);
}

/* Form */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-400);
}

.form-input,
.form-textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--white-10);
    border-radius: 8px;
    padding: 8px 12px;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--vortex-accent);
}

.form-textarea {
    resize: none;
}

/* App Toggles */
.app-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.app-toggle {
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--white-10);
    color: var(--gray-400);
    transition: all 0.2s ease;
}

.app-toggle:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.app-toggle.active {
    background: var(--vortex-accent);
    border-color: var(--vortex-accent);
    color: #fff;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: var(--vortex-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.btn-submit:hover {
    background: var(--vortex-glow);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-submit svg {
    width: 20px;
    height: 20px;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Modal Footer */
.modal-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--white-10);
    text-align: center;
}

.alt-contact {
    font-size: 12px;
    color: var(--gray-400);
    margin-bottom: 4px;
}

.contact-email {
    color: var(--vortex-accent);
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-email:hover {
    color: var(--vortex-glow);
}

/* ========================================
   Legal Pages
======================================== */
.legal-page {
    max-width: 800px;
}

.legal-title {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.legal-date {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 48px;
}

.legal-section {
    margin-bottom: 32px;
}

.legal-section h2 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.legal-section p {
    font-size: 14px;
    color: var(--gray-400);
    line-height: 1.8;
    margin-bottom: 12px;
}

.legal-section ul {
    margin-left: 24px;
    margin-bottom: 12px;
}

.legal-section li {
    font-size: 14px;
    color: var(--gray-400);
    line-height: 1.8;
    list-style: disc;
    margin-bottom: 8px;
}

.legal-section strong {
    color: var(--gray-300);
}

.accent-link {
    color: var(--vortex-accent);
    transition: color 0.2s ease;
}

.accent-link:hover {
    color: var(--vortex-glow);
}

.simple-footer {
    padding: 32px 16px;
    text-align: center;
}

/* ========================================
   Custom Scrollbar
======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--vortex-dark);
}

::-webkit-scrollbar-thumb {
    background: #2d2d3a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--vortex-accent);
}

/* ========================================
   Premium Details Section (AppCard)
======================================== */
.premium-details {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--white-10);
    font-size: 12px;
    color: var(--gray-400);
}

.premium-details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Checking State */
.checking-badge {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--white-10);
    color: var(--gray-500);
}

/* Default User Avatar */
.default-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
}

.default-avatar svg {
    width: 16px;
    height: 16px;
    color: #fff;
}