/* ===================================
   CRYSTALLINE PREMIUM THEME
   Golden Dark Luxury Design
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ===================================
   CSS CUSTOM PROPERTIES
   =================================== */

:root {
    /* Primary - Golden Luxury */
    --primary: #FFC700;
    --primary-dark: #E5B300;
    --primary-light: #FFD740;
    --primary-glow: rgba(255, 199, 0, 0.4);
    --primary-subtle: rgba(255, 199, 0, 0.1);
    
    /* Background - Deep Black */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111111;
    --bg-card: rgba(20, 20, 20, 0.8);
    --bg-glass: rgba(38, 38, 38, 0.5);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-dim: rgba(255, 255, 255, 0.3);
    
    /* Borders */
    --border: #424242;
    --border-light: rgba(255, 255, 255, 0.1);
    --border-primary: rgba(255, 199, 0, 0.3);
    
    /* Shadows */
    --shadow-glow: 0 0 30px rgba(255, 199, 0, 0.3);
    --shadow-glow-strong: 0 0 50px rgba(255, 199, 0, 0.5);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.6);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Polygon Roundness */
    --poly-roundness: 16px;
    --poly-roundness-sm: 8px;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ===================================
   BASE RESET
   =================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===================================
   CRYSTALLINE CLIP PATHS
   =================================== */

.clip-crystal {
    --r: var(--poly-roundness);
    clip-path: polygon(
        var(--r) 0,
        calc(100% - var(--r)) 0,
        100% var(--r),
        100% calc(100% - var(--r)),
        calc(100% - var(--r)) 100%,
        var(--r) 100%,
        0 calc(100% - var(--r)),
        0 var(--r)
    );
}

.clip-crystal-sm {
    --r: var(--poly-roundness-sm);
    clip-path: polygon(
        var(--r) 0,
        calc(100% - var(--r)) 0,
        100% var(--r),
        100% calc(100% - var(--r)),
        calc(100% - var(--r)) 100%,
        var(--r) 100%,
        0 calc(100% - var(--r)),
        0 var(--r)
    );
}

/* Crystal corner decorations */
.crystal-corners {
    position: relative;
}

.crystal-corners::before,
.crystal-corners::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 2px;
    background: var(--border);
}

.crystal-corners::before {
    top: 1.5px;
    left: 1.5px;
    transform: rotate(-45deg);
    transform-origin: top left;
}

.crystal-corners::after {
    bottom: 1.5px;
    right: 1.5px;
    transform: rotate(-45deg);
    transform-origin: bottom right;
}

/* ===================================
   NAVIGATION - Glassmorphic
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--spacing-lg) 0;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: var(--spacing-md) 0;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nav-logo .logo-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 24px;
}

.nav-logo .logo-bars span {
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-logo .logo-bars span:nth-child(1) { height: 12px; }
.nav-logo .logo-bars span:nth-child(2) { height: 18px; }
.nav-logo .logo-bars span:nth-child(3) { height: 24px; }

.nav-links {
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--spacing-sm) var(--spacing-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hide nav links on mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

/* ===================================
   MOBILE MENU BUTTON
   =================================== */

.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.menu-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.menu-line {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-base);
    transform-origin: center;
}

.mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===================================
   MOBILE MENU PANEL
   =================================== */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform var(--transition-base) cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-menu-panel.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--border-light);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 700;
    font-size: 1.25rem;
}

.mobile-logo .logo-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
}

.mobile-logo .logo-bars span {
    width: 3px;
    background: var(--primary);
    border-radius: 1px;
}

.mobile-logo .logo-bars span:nth-child(1) { height: 10px; }
.mobile-logo .logo-bars span:nth-child(2) { height: 15px; }
.mobile-logo .logo-bars span:nth-child(3) { height: 20px; }

.mobile-menu-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.mobile-menu-close:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
    border-color: var(--primary);
}

.mobile-nav {
    flex: 1;
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-glass);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateX(20px);
    transition: all var(--transition-base);
    transition-delay: var(--delay, 0s);
}

.mobile-nav-link.visible {
    opacity: 1;
    transform: translateX(0);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(255, 199, 0, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.mobile-nav-link .link-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition-fast);
}

.mobile-nav-link:hover .link-arrow {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu-footer {
    padding: var(--spacing-xl);
    border-top: 1px solid var(--border-light);
}

.mobile-social {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.mobile-social .social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.mobile-social .social-link:hover {
    background: var(--primary);
    color: var(--bg-primary);
    border-color: var(--primary);
}

.mobile-copyright {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ===================================
   CRYSTALLINE BUTTONS
   =================================== */

.btn-crystal {
    --r: var(--poly-roundness);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg) var(--spacing-2xl);
    background: var(--bg-primary);
    border: 1px solid var(--primary);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    clip-path: polygon(
        var(--r) 0,
        calc(100% - var(--r)) 0,
        100% 0,
        100% calc(100% - var(--r)),
        calc(100% - var(--r)) 100%,
        0 100%,
        0 calc(100% - var(--r)),
        0 var(--r)
    );
    box-shadow: inset 0 0 54px 0 rgba(235, 184, 0, 0.15);
}

.btn-crystal::before,
.btn-crystal::after {
    content: '';
    position: absolute;
    width: 32px;
    height: 2px;
    background: var(--primary);
}

.btn-crystal::before {
    top: 6.5px;
    left: 6.5px;
    transform: rotate(-45deg);
    transform-origin: top left;
}

.btn-crystal::after {
    bottom: 6.5px;
    right: 6.5px;
    transform: rotate(-45deg);
    transform-origin: bottom right;
}

.btn-crystal:hover {
    box-shadow: 
        inset 0 0 54px 0 rgba(235, 184, 0, 0.25),
        0 0 30px rgba(255, 199, 0, 0.3);
    transform: translateY(-2px);
}

.btn-crystal-sm {
    --r: 12px;
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 0.8125rem;
}

.btn-crystal-sm::before,
.btn-crystal-sm::after {
    width: 24px;
}

.btn-crystal-sm::before {
    top: 4px;
    left: 4px;
}

.btn-crystal-sm::after {
    bottom: 4px;
    right: 4px;
}

/* ===================================
   CRYSTALLINE CARDS
   =================================== */

.card-crystal {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all var(--transition-base);
}

.card-crystal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.card-crystal:hover {
    border-color: var(--border-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

.card-crystal:hover::before {
    opacity: 1;
}

/* ===================================
   CRYSTALLINE BADGE
   =================================== */

.badge-crystal {
    --r: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-muted);
    backdrop-filter: blur(8px);
    clip-path: polygon(
        var(--r) 0,
        calc(100% - var(--r)) 0,
        100% var(--r),
        100% calc(100% - var(--r)),
        calc(100% - var(--r)) 100%,
        var(--r) 100%,
        0 calc(100% - var(--r)),
        0 var(--r)
    );
}

.badge-crystal::before {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* ===================================
   GLASSMORPHIC PANELS
   =================================== */

.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
}

.glass-panel-dark {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
}

/* ===================================
   INPUT STYLES
   =================================== */

.input-crystal {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.input-crystal::placeholder {
    color: var(--text-dim);
}

.input-crystal:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

/* ===================================
   SCROLL INDICATOR
   =================================== */

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: bounce 2s ease-in-out infinite;
}

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

.scroll-arrow {
    width: 28px;
    height: 48px;
    border: 2px solid var(--primary);
    border-radius: 24px;
    position: relative;
    opacity: 0.6;
}

.scroll-arrow::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--primary);
    border-radius: 4px;
    animation: scroll-dot 2s ease-in-out infinite;
}

@keyframes scroll-dot {
    0%, 100% { 
        top: 8px;
        opacity: 1;
    }
    50% { 
        top: 20px;
        opacity: 0.3;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

.text-gradient-gold {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-mono {
    font-family: var(--font-mono);
}

.glow-gold {
    filter: drop-shadow(0 0 20px var(--primary-glow));
}

/* ===================================
   SELECTION STYLING
   =================================== */

::selection {
    background: var(--primary);
    color: var(--bg-primary);
}

::-moz-selection {
    background: var(--primary);
    color: var(--bg-primary);
}

/* ===================================
   SCROLLBAR STYLING
   =================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
