/* ====================================
   GAMABLE DESIGN SYSTEM
   Reusable utility classes built on design tokens
   ==================================== */

/* ====================================
   TYPOGRAPHY — Sizes
   ==================================== */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }
.text-6xl { font-size: var(--text-6xl); }
.text-7xl { font-size: var(--text-7xl); }

/* ====================================
   TYPOGRAPHY — Weights
   ==================================== */
.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; }
.font-extrabold { font-weight: 800; }

/* ====================================
   TYPOGRAPHY — Families & Styles
   ==================================== */
.font-display {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.font-body { font-family: var(--font-family); }
.tracking-tight { letter-spacing: -0.02em; }
.tracking-tighter { letter-spacing: -0.03em; }
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.2; }
.leading-snug { line-height: 1.4; }
.leading-normal { line-height: 1.6; }

/* ====================================
   TYPOGRAPHY — Colors
   ==================================== */
.text-white { color: var(--color-text); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.text-warning { color: var(--color-warning); }

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

/* ====================================
   BUTTONS
   ==================================== */

/* Base button reset */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font-family);
    font-weight: 600;
    transition: all var(--transition-base);
    border-radius: var(--radius-full);
    white-space: nowrap;
}

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

/* Primary — Rose gradient + glow (main CTA) */
.btn-primary {
    padding: 14px 36px;
    background: linear-gradient(135deg, #ff5ba0 0%, var(--color-accent) 50%, #d91678 100%);
    color: var(--color-text);
    font-size: var(--text-base);
    box-shadow: 0 8px 32px rgba(253, 40, 141, 0.35), 0 0 60px rgba(253, 40, 141, 0.15);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff6aac 0%, var(--color-accent-hover) 50%, #c41470 100%);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 16px 48px rgba(253, 40, 141, 0.45), 0 0 80px rgba(253, 40, 141, 0.2);
}

/* Secondary — Ghost/outline */
.btn-secondary {
    padding: 14px 36px;
    background: transparent;
    color: var(--color-text);
    font-size: var(--text-base);
    border: 1px solid var(--color-border-hover);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-text-muted);
    transform: translateY(-1px);
}

/* Ghost — No border, subtle background on hover */
.btn-ghost {
    padding: 14px 36px;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: var(--text-base);
}

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

/* Accent flat — Solid rose, no gradient */
.btn-accent {
    padding: 14px 36px;
    background: var(--color-accent);
    color: var(--color-text);
    font-size: var(--text-base);
}

.btn-accent:hover {
    background: var(--color-accent-hover);
    transform: scale(1.03);
}

/* Size modifiers */
.btn-xs {
    padding: 6px 14px;
    font-size: var(--text-xs);
    gap: 4px;
}

.btn-sm {
    padding: 10px 24px;
    font-size: var(--text-sm);
    gap: 6px;
}

.btn-lg {
    padding: 18px 48px;
    font-size: var(--text-lg);
    font-family: var(--font-display);
    font-weight: 700;
}

.btn-xl {
    padding: 22px 56px;
    font-size: var(--text-xl);
    font-family: var(--font-display);
    font-weight: 700;
}

/* Shape modifiers */
.btn-rounded { border-radius: var(--radius-md); }
.btn-square { border-radius: var(--radius-sm); }

/* Effect modifiers */
.btn-glow {
    animation: btn-glow-pulse 3s ease-in-out infinite;
}

/* ====================================
   BACKGROUNDS
   ==================================== */
.bg-base { background-color: var(--color-bg); }
.bg-deep { background-color: var(--color-bg-deep); }
.bg-elevated { background-color: var(--color-bg-elevated); }
.bg-surface-1 { background-color: var(--color-surface-1); }
.bg-surface-2 { background-color: var(--color-surface-2); }
.bg-surface-3 { background-color: var(--color-surface-3); }
.bg-surface-4 { background-color: var(--color-surface-4); }
.bg-glass {
    background: var(--color-bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.bg-card { background: var(--color-bg-card); }
.bg-accent-soft { background: var(--color-accent-soft); }

/* ====================================
   BORDERS
   ==================================== */
.border { border: 1px solid var(--color-border); }
.border-hover { border: 1px solid var(--color-border-hover); }
.border-accent { border: 1px solid var(--color-border-accent); }
.border-none { border: none; }

/* ====================================
   BORDER RADIUS
   ==================================== */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* ====================================
   SHADOWS
   ==================================== */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-accent { box-shadow: var(--shadow-accent); }
.shadow-glow { box-shadow: var(--shadow-glow-accent); }

/* ====================================
   SPACING — Padding
   ==================================== */
.p-xs { padding: var(--space-xs); }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.p-2xl { padding: var(--space-2xl); }
.p-3xl { padding: var(--space-3xl); }

.px-xs { padding-left: var(--space-xs); padding-right: var(--space-xs); }
.px-sm { padding-left: var(--space-sm); padding-right: var(--space-sm); }
.px-md { padding-left: var(--space-md); padding-right: var(--space-md); }
.px-lg { padding-left: var(--space-lg); padding-right: var(--space-lg); }
.px-xl { padding-left: var(--space-xl); padding-right: var(--space-xl); }
.px-2xl { padding-left: var(--space-2xl); padding-right: var(--space-2xl); }

.py-xs { padding-top: var(--space-xs); padding-bottom: var(--space-xs); }
.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.py-2xl { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.py-3xl { padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }
.py-4xl { padding-top: var(--space-4xl); padding-bottom: var(--space-4xl); }

/* ====================================
   SPACING — Margin
   ==================================== */
.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }
.mt-4xl { margin-top: var(--space-4xl); }

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

/* ====================================
   SPACING — Gap (for flex/grid)
   ==================================== */
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }
.gap-3xl { gap: var(--space-3xl); }

/* ====================================
   LAYOUT — Flexbox
   ==================================== */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.self-center { align-self: center; }

/* ====================================
   LAYOUT — Grid
   ==================================== */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }

/* ====================================
   LAYOUT — Width & Sizing
   ==================================== */
.w-full { width: 100%; }
.max-w-sm { max-width: 400px; }
.max-w-md { max-width: 600px; }
.max-w-lg { max-width: 800px; }
.max-w-xl { max-width: 1000px; }
.max-w-2xl { max-width: 1200px; }
.max-w-3xl { max-width: 1400px; }
.max-w-full { max-width: 100%; }

/* ====================================
   LAYOUT — Position & Display
   ==================================== */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }
.overflow-hidden { overflow: hidden; }

/* ====================================
   TEXT ALIGNMENT
   ==================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ====================================
   TRANSITIONS & EFFECTS
   ==================================== */
.transition-fast { transition: all var(--transition-fast); }
.transition-base { transition: all var(--transition-base); }
.transition-slow { transition: all var(--transition-slow); }

.hover-lift:hover { transform: translateY(-4px); }
.hover-scale:hover { transform: scale(1.03); }
.hover-glow:hover { box-shadow: var(--shadow-glow-accent); }

.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }

/* ====================================
   CARDS — Composable card system
   ==================================== */
.card {
    background: linear-gradient(145deg, var(--color-surface-2), var(--color-surface-1));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

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

.card-glass {
    background: var(--color-bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

/* ====================================
   INPUTS
   ==================================== */
.input {
    width: 100%;
    padding: 14px 18px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: var(--text-base);
    font-family: var(--font-family);
    transition: border-color var(--transition-fast);
    outline: none;
}

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

.input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.input-lg {
    padding: 18px 22px;
    font-size: var(--text-lg);
}

.input-sm {
    padding: 10px 14px;
    font-size: var(--text-sm);
}

/* ====================================
   BADGES & TAGS
   ==================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-accent {
    background: var(--color-accent-soft);
    color: var(--color-accent-light);
}

.badge-surface {
    background: var(--color-surface-3);
    color: var(--color-text-secondary);
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

/* ====================================
   DIVIDERS
   ==================================== */
.divider {
    width: 100%;
    height: 1px;
    background: var(--color-border);
    border: none;
}

.divider-accent {
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

/* ====================================
   RESPONSIVE UTILITIES
   ==================================== */
@media (max-width: 768px) {
    .text-5xl { font-size: var(--text-4xl); }
    .text-6xl { font-size: var(--text-4xl); }
    .text-7xl { font-size: var(--text-5xl); }

    .hidden-mobile { display: none; }
    .flex-col-mobile { flex-direction: column; }

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

    .btn-lg {
        padding: 16px 36px;
        font-size: var(--text-base);
    }

    .btn-xl {
        padding: 18px 40px;
        font-size: var(--text-lg);
    }

    .px-lg { padding-left: var(--space-md); padding-right: var(--space-md); }
    .px-xl { padding-left: var(--space-lg); padding-right: var(--space-lg); }
    .px-2xl { padding-left: var(--space-lg); padding-right: var(--space-lg); }
}

@media (max-width: 480px) {
    .text-4xl { font-size: var(--text-3xl); }
    .text-5xl { font-size: var(--text-3xl); }

    .hidden-sm { display: none; }

    .grid-cols-2 { grid-template-columns: 1fr; }
    .grid-cols-3 { grid-template-columns: 1fr; }
}
