/* =========================================
   MASAVI GLOBAL DESIGN SYSTEM
   Centralized stylesheet for all subdomains
   Built by Taagc
   ========================================= */

/* ===== CSS VARIABLES ===== */
:root {
    /* Primary Colors */
    --deep-indigo: #0A0B1A;
    --electric-violet: #6C4EFF;
    --neon-coral: #FF5E7D;
    --warm-amber: #FFB347;
    --slate-gray: #8A9BB5;
    --off-white: #F8FAFC;
    --deep-teal: #0F2A33;
    --soft-lavender: #E2D9F3;
    
    /* Status Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--electric-violet), var(--neon-coral));
    --gradient-subtle: linear-gradient(135deg, rgba(108, 78, 255, 0.1), rgba(255, 94, 125, 0.1));
    --gradient-dark: linear-gradient(135deg, var(--deep-indigo), var(--deep-teal));
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    
    /* Shadows */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(108, 78, 255, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
}

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

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

body {
    font-family: var(--font-primary);
    background-color: var(--deep-indigo);
    color: var(--off-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    background: linear-gradient(135deg, var(--off-white) 0%, var(--soft-lavender) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-md);
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: var(--space-md);
    position: relative;
    display: inline-block;
}

h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

h3 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    margin-bottom: var(--space-sm);
}

p {
    color: var(--slate-gray);
    font-size: 1rem;
    line-height: 1.7;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ===== LAYOUT ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-xl) 0;
}

.section-sm {
    padding: var(--space-lg) 0;
}

.section-lg {
    padding: var(--space-xl) 0;
}

/* ===== NAVIGATION ===== */
.navbar {
    padding: var(--space-sm) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    background: rgba(10, 11, 26, 0.8);
    border-bottom: 1px solid rgba(108, 78, 255, 0.2);
    transition: var(--transition-normal);
}

.navbar.scrolled {
    padding: 0.75rem var(--space-md);
    background: rgba(10, 11, 26, 0.95);
    box-shadow: var(--shadow-md);
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--off-white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-fast);
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--electric-violet);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--off-white);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--off-white);
    box-shadow: 0 8px 20px rgba(108, 78, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(108, 78, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--off-white);
    border: 2px solid rgba(255, 94, 125, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--neon-coral);
    background: rgba(255, 94, 125, 0.1);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--off-white);
    border: 1px solid rgba(108, 78, 255, 0.3);
}

.btn-outline:hover {
    border-color: var(--electric-violet);
    background: rgba(108, 78, 255, 0.1);
}

.btn-small {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

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

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

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

/* ===== CARDS ===== */
.card {
    background: var(--deep-teal);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    border: 1px solid rgba(108, 78, 255, 0.2);
    transition: var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--electric-violet);
    box-shadow: var(--shadow-glow);
}

.card-header {
    margin-bottom: var(--space-sm);
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: var(--space-xs);
}

.card-subtitle {
    color: var(--slate-gray);
    font-size: 0.9rem;
}

.card-body {
    margin-bottom: var(--space-sm);
}

.card-footer {
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== GRIDS ===== */
.grid {
    display: grid;
    gap: var(--space-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);
}

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

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

/* ===== FORMS ===== */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--off-white);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(108, 78, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--off-white);
    font-size: 0.95rem;
    font-family: var(--font-primary);
    transition: var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--electric-violet);
    box-shadow: 0 0 0 3px rgba(108, 78, 255, 0.1);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--error);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-help {
    font-size: 0.85rem;
    color: var(--slate-gray);
    margin-top: var(--space-xs);
}

.form-error {
    font-size: 0.85rem;
    color: var(--error);
    margin-top: var(--space-xs);
}

/* ===== ALERTS ===== */
.alert {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--info);
    color: var(--info);
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: rgba(108, 78, 255, 0.2);
    color: var(--electric-violet);
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* ===== TABLES ===== */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: var(--space-sm);
    background: rgba(108, 78, 255, 0.1);
    color: var(--off-white);
    font-weight: 600;
    font-size: 0.9rem;
}

.table td {
    padding: var(--space-sm);
    border-bottom: 1px solid rgba(108, 78, 255, 0.1);
    color: var(--slate-gray);
}

.table tr:hover td {
    background: rgba(108, 78, 255, 0.05);
}

/* ===== LOADING ===== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--deep-indigo);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(108, 78, 255, 0.1);
    border-top-color: var(--electric-violet);
    border-right-color: var(--neon-coral);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--deep-teal);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(108, 78, 255, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.modal-close {
    background: none;
    border: none;
    color: var(--slate-gray);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--neon-coral);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--deep-teal);
    padding: var(--space-lg) var(--space-md) var(--space-md);
    border-top: 1px solid rgba(108, 78, 255, 0.2);
    margin-top: var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: inline-block;
    text-decoration: none;
}

.footer-description {
    color: var(--slate-gray);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-gray);
    transition: var(--transition-fast);
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px);
}

.footer-title {
    color: var(--off-white);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--slate-gray);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--electric-violet);
    padding-left: 5px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--slate-gray);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.footer-contact-item i {
    color: var(--neon-coral);
    width: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    margin-top: var(--space-lg);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--slate-gray);
    font-size: 0.9rem;
}

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

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

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

.pulse {
    animation: pulse 3s ease-in-out infinite;
}

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

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

/* ===== UTILITIES ===== */
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.ml-1 { margin-left: var(--space-xs); }
.ml-2 { margin-left: var(--space-sm); }
.ml-3 { margin-left: var(--space-md); }
.mr-1 { margin-right: var(--space-xs); }
.mr-2 { margin-right: var(--space-sm); }
.mr-3 { margin-right: var(--space-md); }

.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.p-5 { padding: var(--space-xl); }

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

.text-small { font-size: 0.85rem; }
.text-large { font-size: 1.2rem; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.color-primary { color: var(--electric-violet); }
.color-success { color: var(--success); }
.color-warning { color: var(--warning); }
.color-error { color: var(--error); }
.color-amber { color: var(--warm-amber); }

.bg-deep-teal { background: var(--deep-teal); }
.bg-gradient { background: var(--gradient-primary); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.hidden {
    display: none;
}

.flex {
    display: flex;
}

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

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

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

.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }

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

@media (max-width: 992px) {
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: var(--space-sm);
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--deep-indigo);
        padding: var(--space-md);
        flex-direction: column;
        gap: var(--space-sm);
        border-bottom: 1px solid rgba(108, 78, 255, 0.2);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .section {
        padding: var(--space-lg) 0;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--deep-indigo);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--electric-violet), var(--neon-coral));
    border-radius: var(--radius-full);
}

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

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        color: black !important;
        text-decoration: underline;
    }
}
