/* ========================================
   BloxMaker - Global Styles
   Dark/Light Modern Theme with Glassmorphism
   ======================================== */

/* ===== CSS Variables ===== */
:root[data-theme="dark"] {
    /* Colors */
    --color-primary: #00ff88;
    --color-secondary: #ff0088;
    --color-accent: #00d4ff;
    --color-warning: #ffaa00;
    --color-danger: #ff4444;
    --color-success: #00ff88;
    
    /* Background */
    --bg-primary: #0a0e1a;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #2a2f3e;
    --bg-glass: rgba(26, 31, 46, 0.7);
    --bg-glass-hover: rgba(42, 47, 62, 0.8);
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #b4b9c8;
    --text-muted: #6b7280;
    
    /* Borders */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-color-hover: rgba(255, 255, 255, 0.2);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-neon: 0 0 20px var(--color-primary);
    --shadow-neon-secondary: 0 0 20px var(--color-secondary);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--color-secondary) 0%, #ff00ff 100%);
    --gradient-bg: linear-gradient(180deg, #0a0e1a 0%, #1a1f2e 100%);
}

:root[data-theme="light"] {
    --color-primary: #00cc6a;
    --color-secondary: #cc0066;
    --color-accent: #0099cc;
    --color-warning: #ff9900;
    --color-danger: #dd3333;
    --color-success: #00cc6a;
    
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e5e7eb;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-glass-hover: rgba(255, 255, 255, 0.9);
    
    --text-primary: #1a1f2e;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    
    --border-color: rgba(0, 0, 0, 0.1);
    --border-color-hover: rgba(0, 0, 0, 0.2);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-neon: 0 0 20px rgba(0, 204, 106, 0.5);
    --shadow-neon-secondary: 0 0 20px rgba(204, 0, 102, 0.5);
    
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--color-secondary) 0%, #ff00ff 100%);
    --gradient-bg: linear-gradient(180deg, #f5f7fa 0%, #ffffff 100%);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--color-accent);
    text-shadow: var(--shadow-neon);
}

/* ===== Neon Effects ===== */
.neon-text {
    color: var(--color-primary);
    text-shadow: 
        0 0 10px var(--color-primary),
        0 0 20px var(--color-primary),
        0 0 30px var(--color-primary);
    animation: neon-flicker 3s infinite alternate;
}

.neon-icon {
    color: var(--color-primary);
    filter: drop-shadow(0 0 10px var(--color-primary));
    animation: neon-pulse 2s infinite;
}

@keyframes neon-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 
            0 0 10px var(--color-primary),
            0 0 20px var(--color-primary),
            0 0 30px var(--color-primary);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

@keyframes neon-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px var(--color-primary));
    }
    50% {
        filter: drop-shadow(0 0 20px var(--color-primary));
    }
}

/* ===== Glassmorphism Effect ===== */
.glass-effect {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-effect:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ===== Container & Layout ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Navigation ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.brand-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
    background: rgba(0, 255, 136, 0.1);
}

.nav-link.premium-link {
    color: var(--color-warning);
}

.nav-link.premium-link:hover {
    color: var(--color-warning);
    background: rgba(255, 170, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.3);
}

.nav-link.admin-link {
    color: var(--color-secondary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-menu:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-neon);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
}

.username {
    font-weight: 500;
}

.premium-badge {
    color: var(--color-warning);
    filter: drop-shadow(0 0 5px var(--color-warning));
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    outline: none;
}

.btn:active {
    transform: scale(0.95);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(0, 255, 136, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    border-color: var(--color-primary);
}

.btn-success {
    background: var(--color-success);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.4);
}

.btn-success:hover {
    box-shadow: 0 6px 25px rgba(0, 255, 136, 0.6);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-icon {
    padding: 0.5rem;
    aspect-ratio: 1;
    border-radius: 50%;
}

/* ===== Form Elements ===== */
.select-input,
.color-input,
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.select-input:focus,
input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.slider {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-neon);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-neon);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.checkbox-label:hover {
    background: var(--bg-glass);
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    max-width: 600px;
    width: 90%;
    padding: 2rem;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--color-danger);
}

.modal-title {
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
