/**
 * Gaming Platform - Global Stylesheet
 * ====================================
 * Common styles used across all pages
 */

/* CSS Variables */
:root {
    /* Colors - Strict Palette (Only 4 colors) */
    --color-primary: #0C951E;
    --color-primary-dark: #006D00;
    --color-primary-light: #0C951E;
    
    --color-secondary: #FEFFFF;
    --color-success: #0C951E;
    --color-danger: #000000;
    --color-warning: #000000;
    --color-info: #006D00;
    
    /* Grays - Using Black and White only */
    --color-gray-50: #FEFFFF;
    --color-gray-100: #FEFFFF;
    --color-gray-200: rgba(0, 0, 0, 0.1);
    --color-gray-300: rgba(0, 0, 0, 0.2);
    --color-gray-400: rgba(0, 0, 0, 0.4);
    --color-gray-500: rgba(0, 0, 0, 0.5);
    --color-gray-600: rgba(0, 0, 0, 0.6);
    --color-gray-700: rgba(0, 0, 0, 0.7);
    --color-gray-800: rgba(0, 0, 0, 0.85);
    --color-gray-900: #000000;
    --color-black: #000000;
    --color-white: #FEFFFF;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--color-gray-800);
    background: rgba(12, 149, 30, 0.03);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-gray-900);
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-primary-dark);
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

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

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

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }

/* Common Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.35);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(4, 120, 87, 0.45);
}

.btn-secondary {
    background: white;
    color: var(--color-gray-700);
    border: 2px solid var(--color-gray-200);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-gray-50);
    border-color: var(--color-gray-300);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.813rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Card */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: rgba(12, 149, 30, 0.1);
    color: var(--color-primary);
}

.badge-success {
    background: rgba(12, 149, 30, 0.1);
    color: #006D00;
}

.badge-danger {
    background: rgba(0, 0, 0, 0.05);
    color: #000000;
}

.badge-warning {
    background: rgba(0, 0, 0, 0.08);
    color: #000000;
}

/* Input */
.input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    font-size: 0.938rem;
    font-family: var(--font-sans);
    transition: all var(--transition-base);
    background: var(--color-gray-50);
}

.input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(4, 120, 87, 0.12);
}

.input.error {
    border-color: var(--color-danger);
}

/* Static Field */
.static-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    font-size: 0.938rem;
    font-family: var(--font-sans);
    background: var(--color-gray-100);
    color: var(--color-gray-600);
    display: flex;
    align-items: center;
    min-height: 46px;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

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

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

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

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

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

.slide-down {
    animation: slideDown 0.3s ease-out;
}

/* Responsive helpers */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(12, 149, 30, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #0C951E;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #006D00;
}

/* Selection */
::selection {
    background: rgba(16, 159, 44, 0.25);
    color: var(--color-gray-900);
}

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
