/* ============================================
   YALLATICKET - COMMON STYLES
   Mobile-First | App Experience
   ============================================ */

/* ===== CUSTOM FONTS ===== */
@font-face {
    font-family: 'Gilroy';
    src: url('../fonts/Gilroy-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: url('../fonts/Gilroy-Semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: url('../fonts/Gilroy-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: url('../fonts/Gilroy-Extrabold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rubik';
    src: url('../fonts/Rubik-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rubik';
    src: url('../fonts/Rubik-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===== CSS VARIABLES ===== */
:root {
    /* Brand Colors - Cyan/Turquoise System (App-like) */
    --primary: #00D9FF;
    --primary-dark: #00B8D4;
    --primary-light: #4DFFFF;
    --secondary: #00BFA5;
    --accent: #00D9FF;
    --accent-light: #4DFFFF;

    /* Status Colors */
    --success: #00C853;
    --danger: #FF5252;
    --warning: #FFD600;
    --info: #00D9FF;

    /* Backgrounds - Ultra Dark Theme (Pure Black) */
    --bg-app: #000000;
    --bg-surface: #0D0D0D;
    --bg-card: #1A1A1A;
    --bg-elevated: #242424;
    --bg-hover: #2E2E2E;
    --bg-input: #151515;

    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3B3;
    --text-muted: #737373;
    --text-disabled: #404040;

    /* Borders */
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.04);
    --border-hover: rgba(0, 217, 255, 0.3);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00D9FF 0%, #00BFA5 100%);
    --gradient-accent: linear-gradient(135deg, #00D9FF 0%, #4DFFFF 100%);
    --gradient-success: linear-gradient(135deg, #00C853 0%, #64DD17 100%);
    --gradient-warm: linear-gradient(135deg, #FF6F00 0%, #FFD600 100%);
    --gradient-overlay: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.95) 100%);
    --gradient-overlay-top: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 100%);

    /* Radius - More rounded for modern app feel */
    --radius-xs: 10px;
    --radius-sm: 14px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-2xl: 40px;
    --radius-full: 9999px;

    /* Shadows - Enhanced with Cyan Glow */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.8);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.9);
    --shadow-primary: 0 8px 24px rgba(0, 217, 255, 0.3);
    --shadow-accent: 0 8px 24px rgba(0, 191, 165, 0.3);

    /* Glass */
    --glass-bg: rgba(0, 217, 255, 0.05);
    --glass-border: rgba(0, 217, 255, 0.12);

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    /* Fonts */
    --font-body: 'Gilroy', -apple-system, sans-serif;
    --font-display: 'Rubik', sans-serif;

    /* Z-Index */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-modal: 1040;
    --z-toast: 1080;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(0, 217, 255, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 191, 165, 0.03) 0%, transparent 50%);
    animation: bgMove 25s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes bgMove {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-3%, -3%) rotate(2deg); }
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

::selection {
    background: var(--primary);
    color: white;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(32px, 6vw, 64px); }
h2 { font-size: clamp(28px, 5vw, 48px); }
h3 { font-size: clamp(24px, 4vw, 36px); }
h4 { font-size: clamp(20px, 3vw, 28px); }
h5 { font-size: clamp(18px, 2vw, 24px); }
h6 { font-size: clamp(16px, 1.5vw, 20px); }

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

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-4);
    position: relative;
    z-index: var(--z-base);
}

/* ===== MAIN CONTENT ===== */
.yt-main {
    position: relative;
    z-index: var(--z-base);
    min-height: 60vh;
}

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

.form-label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: var(--space-2);
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 15px;
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px rgba(44, 199, 203, 0.1);
}

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

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

/* Password Field */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    font-size: 16px;
    transition: var(--transition);
    border-radius: 6px;
}

.password-toggle:hover {
    color: var(--primary);
    background: rgba(44, 199, 203, 0.1);
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: var(--space-4) 0;
}

.form-check-input {
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: var(--transition);
    position: relative;
}

.form-check-input:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.form-check-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.form-check-label {
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

/* Input Group */
.input-group {
    display: flex;
    gap: var(--space-2);
}

.input-group .form-control {
    flex: 1;
}

/* Validation States */
.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-valid {
    border-color: var(--success);
}

.invalid-feedback,
.valid-feedback {
    font-size: 13px;
    margin-top: var(--space-1);
}

.invalid-feedback {
    color: var(--danger);
}

.valid-feedback {
    color: var(--success);
}

/* ===== BUTTONS ===== */
.btn,
.yt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn:disabled,
.yt-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Primary Button */
.btn-primary,
.yt-btn--primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover,
.yt-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 199, 203, 0.4);
    color: white;
}

.btn-primary:active,
.yt-btn--primary:active {
    transform: translateY(0);
}

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

.btn-secondary:hover,
.yt-btn--secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(44, 199, 203, 0.05);
}

/* Ghost Button */
.btn-ghost,
.yt-btn--ghost {
    background: transparent;
    color: var(--primary);
    border: none;
}

.btn-ghost:hover,
.yt-btn--ghost:hover {
    background: rgba(44, 199, 203, 0.1);
}

/* Button Sizes */
.btn-sm,
.yt-btn--sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg,
.yt-btn--lg {
    padding: 16px 32px;
    font-size: 16px;
}

.yt-btn--icon {
    width: 44px;
    height: 44px;
    padding: 0;
}

/* Button Block */
.btn-block {
    width: 100%;
}

/* Loading State */
.btn.loading,
.yt-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Social Buttons */
.btn-google {
    background: #ea4335;
    color: white;
    border: none;
}

.btn-google:hover {
    background: #d33426;
    color: white;
}

.btn-facebook {
    background: #3b5998;
    color: white;
    border: none;
}

.btn-facebook:hover {
    background: #2d4373;
    color: white;
}

/* ===== BADGES ===== */
.badge,
.yt-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge--primary,
.yt-badge--primary {
    background: var(--primary);
    color: white;
}

.badge--success {
    background: var(--success);
    color: white;
}

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

.badge--warning {
    background: var(--warning);
    color: var(--bg-app);
}

.yt-badge--notification {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    background: var(--danger);
    font-size: 10px;
    border: 2px solid var(--bg-app);
    padding: 0 6px;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== ALERTS ===== */
.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    margin-bottom: var(--space-4);
    font-size: 14px;
    animation: alertSlide 0.3s ease;
}

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

.alert i {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert--success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.3);
}

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

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

.alert--info {
    background: rgba(44, 199, 203, 0.1);
    color: var(--primary);
    border-color: rgba(44, 199, 203, 0.3);
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card__header {
    padding: var(--space-4);
    border-bottom: 1px solid var(--border);
}

.card__body {
    padding: var(--space-4);
}

.card__footer {
    padding: var(--space-4);
    border-top: 1px solid var(--border);
}

/* ===== UTILITIES ===== */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-3);
    }
}

/* ===== RTL SUPPORT ===== */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .password-toggle {
    right: auto;
    left: 14px;
}

[dir="rtl"] .yt-badge--notification {
    right: auto;
    left: 4px;
}

[dir="rtl"] .form-check {
    flex-direction: row-reverse;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

.btn:focus-visible,
.form-control:focus-visible,
a:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}
