/* ============================================
   Bugy Studios — Core Design System
   Dark Luxe Theme
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ============================================
   CSS Custom Properties (Design Tokens)
   These defaults are overridden by theme-dynamic.php
   ============================================ */
:root {
    /* Background Colors (Light Mode) */
    --color-bg: #f8f9fa;
    --color-bg-secondary: #ffffff;
    
    /* Card Colors */
    --color-card: #ffffff;
    --color-card-hover: #f1f5f9;
    --color-card-border: #e2e8f0;

    /* Brand Colors */
    --color-primary: #6366f1; /* Professional Indigo */
    --color-primary-dark: #4f46e5;
    --color-secondary: #10b981;
    --color-tertiary: #3b82f6;

    /* Text Colors */
    --color-text: #1e293b;
    --color-text-secondary: #475569;
    --color-text-muted: #94a3b8;

    /* Status Colors */
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;

    /* Border */
    --color-border: #e2e8f0;

    /* Typography */
    --font-primary: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows (Flat/Enterprise) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-glow: none;

    /* Transition */
    --transition: all 0.2s ease-in-out;
}

[data-theme="dark"] {
    /* Background Colors (Dark Mode) */
    --color-bg: #0f1115;
    --color-bg-secondary: #16191f;
    
    /* Card Colors */
    --color-card: #1c1f26;
    --color-card-hover: #232730;
    --color-card-border: #2d3340;

    /* Text Colors */
    --color-text: #f8fafc;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #64748b;

    /* Border */
    --color-border: #2d3340;

    /* Shadows */
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Modern CSS Reset
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background-color: var(--color-bg);
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 16px;
    font-weight: 400;
    position: relative;
    background: transparent;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: var(--bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15; /* Biraz daha belirgin */
    z-index: -1;
    pointer-events: none;
}

img,
video,
svg {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    outline: none;
}

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

/* ============================================
   Custom Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.3) var(--color-bg-secondary);
}

/* ============================================
   Text Selection
   ============================================ */
::selection {
    background: rgba(139, 92, 246, 0.4);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(139, 92, 246, 0.4);
    color: #ffffff;
}

/* ============================================
   Typography System
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--color-text);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

h5 {
    font-size: 1rem;
    font-weight: 600;
}

h6 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gold {
    color: var(--color-secondary);
}

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

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

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

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

small {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

strong {
    font-weight: 600;
    color: var(--color-text);
}

/* ============================================
   Layout Utilities
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.section {
    padding: 80px 0;
}

.section-sm {
    padding: 40px 0;
}

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

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

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

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

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

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

.gap-sm {
    gap: 8px;
}

.gap-md {
    gap: 16px;
}

.gap-lg {
    gap: 24px;
}

.gap-xl {
    gap: 32px;
}

/* ============================================
   Button System
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn:hover {
    transform: scale(1.02);
}

.btn:active {
    transform: scale(0.98);
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #7c3aed);
    color: #ffffff;
    box-shadow: none;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
}

/* Secondary Button */
.btn-secondary {
    background: transparent;
    border: 1px solid var(--color-secondary);
    color: var(--color-secondary);
}

.btn-secondary:hover {
    background: rgba(245, 158, 11, 0.1);
}

/* Discord Button */
.btn-discord {
    background: #5865F2;
    color: #ffffff;
}

.btn-discord:hover {
    background: #4752C4;
}

/* Danger Button */
.btn-danger {
    background: var(--color-danger);
    color: #ffffff;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    padding: 8px 16px;
}

.btn-ghost:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.05);
}

/* Success Button */
.btn-success {
    background: var(--color-success);
    color: #ffffff;
}

.btn-success:hover {
    background: #059669;
}

/* Button Sizes */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* ============================================
   Glassmorphism System
   ============================================ */
.glass {
    background: rgba(15, 15, 25, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
}

.glass-card {
    background: rgba(15, 15, 25, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.glass-card:hover {
    background: var(--color-card-hover);
    border-color: var(--color-card-border);
}

/* ============================================
   Utility Classes
   ============================================ */
.hidden {
    display: none !important;
}

.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;
}

.relative {
    position: relative;
}

.overflow-hidden {
    overflow: hidden;
}

/* Margin Bottom */
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

/* Margin Top */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

/* Padding */
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

/* Width */
.w-full { width: 100%; }

/* Opacity */
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
