/* ================================================
   UCHU ADDON - UNIFIED DESIGN SYSTEM
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Brand Colors - Deep Space Theme */
    --uchu-primary: #4A90E2;        /* Nebula Blue */
    --uchu-secondary: #7B68EE;       /* Cosmic Purple */
    --uchu-accent: #00D9FF;          /* Stellar Cyan */
    --uchu-danger: #FF0044;          /* Supernova Red */
    --uchu-success: #2ECC71;         /* Alien Green */
    --uchu-warning: #FFA502;         /* Solar Orange */
    
    /* Neutral Colors */
    --uchu-bg-dark: #0A0E27;         /* Deep Space */
    --uchu-bg-mid: #141B3C;          /* Space Station */
    --uchu-bg-light: #1E2749;        /* Nebula Mist */
    --uchu-surface: #252D52;         /* Panel Surface */
    --uchu-border: #3A4470;          /* Panel Border */
    
    /* Text Colors */
    --uchu-text-primary: #FFFFFF;
    --uchu-text-secondary: #B8C5E0;
    --uchu-text-muted: #7A8AAC;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--uchu-primary) 0%, var(--uchu-secondary) 100%);
    --gradient-accent: linear-gradient(45deg, var(--uchu-accent) 0%, var(--uchu-primary) 100%);
    --gradient-danger: linear-gradient(135deg, #FF0044 0%, #FF6B81 100%);
    --gradient-cosmic: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    
    /* Typography */
    --font-display: 'Inter', sans-serif;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(74, 144, 226, 0.4);
    
    --blur-glass: blur(12px);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}

/* ================================================
   RESET & BASE STYLES
   ================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: radial-gradient(ellipse at top, var(--uchu-bg-mid) 0%, var(--uchu-bg-dark) 100%);
    color: var(--uchu-text-primary);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Starfield Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 85%, white, transparent),
        radial-gradient(1px 1px at 75% 45%, white, transparent);
    background-size: 200% 200%;
    background-position: 0 0, 40% 60%, 130% 270%, 70% 100%, 50% 80%, 25% 60%, 85% 100%;
    opacity: 0.4;
    animation: twinkle 200s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.6; }
}

/* ================================================
   TYPOGRAPHY
   ================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    text-transform: uppercase;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.text-gradient {
    background: var(--gradient-cosmic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-glow {
    text-shadow: 0 0 20px rgba(74, 144, 226, 0.6),
                 0 0 40px rgba(74, 144, 226, 0.4);
}

/* ================================================
   HEADER COMPONENT
   ================================================ */

.uchu-header {
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: var(--blur-glass);
    border-bottom: 2px solid var(--uchu-border);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.uchu-nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-xl);
}

.uchu-logo {
    height: 50px;
    filter: drop-shadow(var(--shadow-glow));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.uchu-logo:hover {
    transform: scale(1.05) rotate(-2deg);
}

.uchu-nav-links {
    display: flex;
    gap: var(--space-md);
    list-style: none;
    align-items: center;
}

.uchu-nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-heading);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
}

.uchu-nav-link:hover {
    color: #ffffff;
    opacity: 0.7;
}

.uchu-nav-link.active {
    background: var(--gradient-accent);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

/* Dropdown */
.uchu-dropdown {
    position: relative;
}

.uchu-dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + var(--space-sm));
    left: 0;
    background: rgba(30, 39, 73, 0.95);
    backdrop-filter: var(--blur-glass);
    min-width: 220px;
    border-radius: var(--radius-md);
    border: 1px solid var(--uchu-border);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: dropdownSlide 0.3s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.uchu-dropdown:hover .uchu-dropdown-content {
    display: block;
}

.uchu-dropdown-content a {
    display: block;
    padding: var(--space-md) var(--space-lg);
    color: var(--uchu-text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.uchu-dropdown-content a:hover {
    background: rgba(74, 144, 226, 0.2);
    color: var(--uchu-text-primary);
    padding-left: calc(var(--space-lg) + 8px);
}

/* Mobile Menu Toggle */
.uchu-menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--uchu-border);
    color: var(--uchu-text-primary);
    font-size: 1.5rem;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.uchu-menu-toggle:hover {
    background: var(--uchu-surface);
    border-color: var(--uchu-accent);
}

/* ================================================
   FOOTER COMPONENT
   ================================================ */

.uchu-footer {
    background: rgba(10, 14, 39, 0.9);
    border-top: 2px solid var(--uchu-border);
    padding: var(--space-2xl) var(--space-xl);
    margin-top: var(--space-2xl);
    position: relative;
}

.uchu-footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
}

.uchu-footer-section h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: var(--space-md);
    color: var(--uchu-accent);
}

.uchu-footer-links {
    list-style: none;
}

.uchu-footer-links li {
    margin-bottom: var(--space-sm);
}

.uchu-footer-links a {
    color: var(--uchu-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.uchu-footer-links a:hover {
    color: var(--uchu-accent);
}

.uchu-footer-bottom {
    text-align: center;
    margin-top: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--uchu-border);
    color: var(--uchu-text-muted);
    font-size: 0.9rem;
}

/* ================================================
   BUTTON COMPONENTS
   ================================================ */

.uchu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.uchu-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.uchu-btn:hover::before {
    width: 300px;
    height: 300px;
}

.uchu-btn-primary {
    background: var(--gradient-primary);
    color: var(--uchu-text-primary);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.uchu-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(74, 144, 226, 0.6);
}

.uchu-btn-secondary {
    background: transparent;
    border: 2px solid var(--uchu-accent);
    color: var(--uchu-accent);
}

.uchu-btn-secondary:hover {
    background: var(--uchu-accent);
    color: var(--uchu-bg-dark);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

/* ================================================
   CARD COMPONENTS
   ================================================ */

.uchu-card {
    background: rgba(30, 39, 73, 0.4);
    backdrop-filter: var(--blur-glass);
    border: 1px solid var(--uchu-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.uchu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.uchu-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--uchu-accent);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 217, 255, 0.3);
}

.uchu-card:hover::before {
    opacity: 0.05;
}

/* ================================================
   SECTION COMPONENTS
   ================================================ */

.uchu-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-xl);
    position: relative;
    z-index: 1;
}

.uchu-section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.uchu-section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-md);
    background: var(--gradient-cosmic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.uchu-section-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--uchu-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 1024px) {
    .uchu-nav {
        padding: 0 var(--space-lg);
    }
    
    .uchu-section {
        padding: var(--space-xl) var(--space-lg);
    }
}

@media (max-width: 768px) {
    .uchu-nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: var(--space-md);
        padding: var(--space-md);
    }

    .uchu-logo {
        height: 40px;
    }

    .uchu-nav-links {
        flex-direction: column;
        align-items: flex-end;
        gap: var(--space-xs);
        width: auto;
    }
    
    .uchu-nav-link {
        text-align: right;
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
        width: auto;
    }
    
    .uchu-dropdown-content {
        position: static;
        display: none;
        margin-top: var(--space-sm);
        border-left: 3px solid var(--uchu-accent);
        padding-left: var(--space-md);
        background: rgba(30, 39, 73, 0.5);
        text-align: right;
    }
    
    .uchu-dropdown.active .uchu-dropdown-content {
        display: block;
    }
    
    .uchu-footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ================================================
   UTILITY CLASSES
   ================================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}