/* ============================================
   MY42 - SHARED STYLES
   Universal design system for all pages
   ============================================ */

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Core Colors */
    --color-core-start: #667eea;
    --color-core-mid: #764ba2;
    --color-core-end: #f093fb;
    
    /* Sphere Colors */
    --color-health: #10B981;
    --color-finance: #F59E0B;
    --color-goals: #8B5CF6;
    --color-social: #EC4899;
    --color-business: #3B82F6;
    --color-development: #14B8A6;
    
    /* Grays */
    --color-white: #ffffff;
    --color-light-gray: #a0a0a0;
    --color-mid-gray: #808080;
    --color-dark-gray: #606060;
    --color-black: #000000;
    
    /* Backgrounds */
    --bg-space: radial-gradient(ellipse at center, #1a0033 0%, #000000 70%);
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    
    /* Borders */
    --border-card: rgba(255, 255, 255, 0.1);
    --border-card-hover: rgba(102, 126, 234, 0.5);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    
    /* Typography */
    --font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'Courier New', monospace;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: var(--font-base);
    background: var(--color-black);
    color: var(--color-white);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ============================================
   COSMIC BACKGROUND
   ============================================ */
.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-space);
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-card);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--color-core-start) 0%, var(--color-core-mid) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--color-light-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--color-white);
}

.nav-link.active {
    color: var(--color-core-start);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-core-start), var(--color-core-mid));
}

.nav-cta {
    background: linear-gradient(135deg, var(--color-core-start) 0%, var(--color-core-mid) 100%);
    border: none;
    padding: 0.75rem 1.5rem;
    color: white;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform var(--transition-fast);
    text-decoration: none;
    display: inline-block;
}

.nav-cta:hover {
    transform: scale(1.05);
}

/* Mobile Menu */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.2;
}

h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-core-start) 0%, var(--color-core-mid) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-light {
    color: var(--color-light-gray);
}

.text-muted {
    color: var(--color-mid-gray);
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--space-xl) var(--space-md);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--color-light-gray);
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--border-card-hover);
    background: var(--bg-card-hover);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-text {
    color: var(--color-light-gray);
    line-height: 1.6;
}

/* Sphere Cards with Colors */
.card-health { border-left: 3px solid var(--color-health); }
.card-finance { border-left: 3px solid var(--color-finance); }
.card-goals { border-left: 3px solid var(--color-goals); }
.card-social { border-left: 3px solid var(--color-social); }
.card-business { border-left: 3px solid var(--color-business); }
.card-development { border-left: 3px solid var(--color-development); }

/* ============================================
   GRIDS
   ============================================ */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    font-family: var(--font-base);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-core-start) 0%, var(--color-core-mid) 100%);
    color: white;
}

.btn-primary:hover {
    transform: scale(1.05);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-core-start);
    color: var(--color-core-start);
}

.btn-secondary:hover {
    background: var(--color-core-start);
    color: white;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* ============================================
   BADGES & LABELS
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-health { background: var(--color-health); color: white; }
.badge-finance { background: var(--color-finance); color: white; }
.badge-goals { background: var(--color-goals); color: white; }
.badge-social { background: var(--color-social); color: white; }
.badge-business { background: var(--color-business); color: white; }
.badge-development { background: var(--color-development); color: white; }

/* ============================================
   FOOTER
   ============================================ */
footer {
    padding: var(--space-lg) var(--space-md);
    border-top: 1px solid var(--border-card);
    margin-top: var(--space-xl);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-tagline {
    font-size: 1.2rem;
    color: var(--color-core-start);
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--color-mid-gray);
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.footer-link {
    color: var(--color-core-start);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--color-core-mid);
}

.copyright {
    font-size: 0.9rem;
    color: var(--color-dark-gray);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.flex { display: flex; }
.flex-center { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

.float {
    animation: float 6s ease-in-out infinite;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .section-title { font-size: 2rem; }
    
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .section {
        padding: var(--space-lg) var(--space-sm);
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    
    .nav-container {
        padding: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-black);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-core-start), var(--color-core-mid));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--color-core-mid), var(--color-core-end));
}
