/* Main Stylesheet - Global Styles */

:root {
    /* Space Theme Colors */
    --color-space-dark: #0a0e27;
    --color-space-blue: #1a237e;
    --color-space-purple: #4a148c;
    --color-nebula-pink: #ff6b9d;
    --color-nebula-cyan: #4ecdc4;
    --color-star-yellow: #ffd93d;
    --color-star-white: #ffffff;

    /* Semantic Colors */
    --color-primary: #6366f1;
    --color-secondary: #8b5cf6;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;

    /* Gradients */
    --gradient-space: linear-gradient(135deg, #0a0e27 0%, #1a237e 50%, #4a148c 100%);
    --gradient-nebula: linear-gradient(135deg, #ff6b9d 0%, #4ecdc4 100%);
    --gradient-stars: radial-gradient(circle, #ffd93d 0%, #ff6b9d 100%);

    /* Typography */
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Fredoka One', cursive;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-round: 50%;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(255, 215, 61, 0.6);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-primary);
    background: var(--gradient-space);
    background-attachment: fixed;
    color: var(--color-star-white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Stars Background Animation */
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% 84%, white, transparent),
        radial-gradient(1px 1px at 75% 40%, white, transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: twinkle 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.container-fluid {
    width: 100%;
    padding: var(--spacing-md);
    position: relative;
    z-index: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: var(--font-primary);
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    background: var(--gradient-nebula);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn:active {
    transform: translateY(-1px) scale(1.02);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1.5rem;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 61, 0.5);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(255, 215, 61, 0.3);
}

.card-header {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.card-body {
    margin-bottom: var(--spacing-md);
}

.card-footer {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-sm);
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

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

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-center {
    align-items: center;
    justify-content: center;
}

.flex-between {
    align-items: center;
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* Spacing Utilities */
.m-0 { margin: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mb-2 { margin-bottom: var(--spacing-md); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }

/* Hide/Show */
.hidden { display: none !important; }
.visible { display: block !important; }

/* Loading Spinner */
.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-round);
    border-top-color: var(--color-star-yellow);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    html { font-size: 14px; }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .container, .container-fluid {
        padding: var(--spacing-sm);
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
*:focus {
    outline: 3px solid var(--color-star-yellow);
    outline-offset: 2px;
}

.btn:focus {
    outline-color: var(--color-star-yellow);
}
