/* =============================================
   SORTEO TWITCH — Dark Glassmorphism Theme
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ---- Variables ---- */
:root {
    --bg-deep: #0a0712;
    --bg-dark: #110e1e;
    --accent: #9147ff;
    --accent-light: #b44fff;
    --accent-glow: rgba(145, 71, 255, 0.35);
    --cyan: #00d4ff;
    --gold: #ffd54f;
    --silver: #cfd8dc;
    --bronze: #e09430;
    --green: #40cf7c;
    --red: #ef5350;

    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.09);

    --text-1: #efeff1;
    --text-2: #adadb8;
    --text-3: #6b6b8a;

    --radius: 16px;
    --radius-sm: 8px;
    --ease: all 0.2s ease;

    --sidebar: 310px;
    --header: 64px;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-deep);
    color: var(--text-1);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---- Animated Background ---- */
.bg-animated {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 15% 10%, rgba(145, 71, 255, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 85% 85%, rgba(0, 212, 255, 0.09) 0%, transparent 55%),
        radial-gradient(ellipse 100% 100% at 50% 50%, var(--bg-dark) 0%, var(--bg-deep) 100%);
    animation: bgPulse 14s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(12deg);
    }
}

/* ---- Glass ---- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    position: relative;
    z-index: 1;
}

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 430px;
    padding: 20px;
}

.login-card {
    border-radius: 24px;
    padding: 48px 40px;
    text-align: center;
    border-color: rgba(145, 71, 255, 0.22);
    box-shadow: 0 0 80px rgba(145, 71, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: fadeUp 0.6s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-section {
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 60px;
    display: block;
    margin-bottom: 14px;
    filter: drop-shadow(0 0 18px rgba(145, 71, 255, 0.55));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.logo-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #9147ff, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    color: var(--text-2);
    font-size: 0.9rem;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: rgba(145, 71, 255, 0.06);
    border: 1px solid rgba(145, 71, 255, 0.12);
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    color: var(--text-2);
}

.feature-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.btn-twitch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #9147ff, #6d28d9);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--ease);
    box-shadow: 0 4px 24px rgba(145, 71, 255, 0.45);
    margin-bottom: 14px;
}

.btn-twitch:hover {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(145, 71, 255, 0.6);
}

.login-note {
    font-size: 0.76rem;
    color: var(--text-3);
    line-height: 1.6;
}

.alert {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    margin-bottom: 18px;
}

.alert-error {
    background: rgba(239, 83, 80, 0.12);
    border: 1px solid rgba(239, 83, 80, 0.3);
    color: #ff8a80;
}

/* Floating particles */
.floating-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    bottom: -20px;
    background: var(--accent);
    border-radius: 50%;
    animation: rise linear infinite;
}

@keyframes rise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(-110vh) scale(0.4);
        opacity: 0;
    }
}

/* =============================================
   DASHBOARD
   ============================================= */
.dashboard-page {
    min-height: 100vh;
    padding-top: var(--header);
}

/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0;
    border-bottom: 1px solid var(--glass-border);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo {
    font-size: 1.4rem;
}

.header-title {
    font-size: 1.05rem;
    font-weight: 800;
    background: linear-gradient(135deg, #9147ff, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.user-display-name {
    font-size: 0.88rem;
    font-weight: 600;
}

.user-login {
    font-size: 0.73rem;
    color: var(--text-2);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    background: rgba(239, 83, 80, 0.1);
    border: 1px solid rgba(239, 83, 80, 0.2);
    border-radius: var(--radius-sm);
    color: #ff8a80;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--ease);
}

.btn-logout:hover {
    background: rgba(239, 83, 80, 0.2);
    transform: translateY(-1px);
}

/* Layout */
.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar) 1fr;
    gap: 18px;
    padding: 18px;
    min-height: calc(100vh - var(--header));
    position: relative;
    z-index: 1;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: calc(100vh - var(--header) - 36px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 2px;
}

/* Cards */
.card {
    border-radius: var(--radius);
    padding: 18px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-2);
    margin-bottom: 14px;
}

/* Multipliers */
.multiplier-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.tier-badge {
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    min-width: 50px;
    text-align: center;
    flex-shrink: 0;
}

.tier-1 {
    background: rgba(194, 124, 14, 0.18);
    color: var(--bronze);
    border: 1px solid rgba(194, 124, 14, 0.35);
}

.tier-2 {
    background: rgba(168, 178, 195, 0.15);
    color: var(--silver);
    border: 1px solid rgba(168, 178, 195, 0.35);
}

.tier-3 {
    background: rgba(240, 179, 50, 0.18);
    color: var(--gold);
    border: 1px solid rgba(240, 179, 50, 0.35);
}

.multiplier-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.mult-btn {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background: rgba(145, 71, 255, 0.13);
    border: 1px solid rgba(145, 71, 255, 0.22);
    color: var(--accent);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    transition: var(--ease);
}

.mult-btn:hover {
    background: rgba(145, 71, 255, 0.28);
}

.mult-input {
    flex: 1;
    text-align: center;
    min-width: 0;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--glass-border);
    color: var(--text-1);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 4px 6px;
    border-radius: 6px;
    -moz-appearance: textfield;
    appearance: textfield;
}

.mult-input::-webkit-outer-spin-button,
.mult-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.mult-input:focus {
    outline: none;
    border-color: var(--accent);
}

.mult-label {
    font-size: 0.72rem;
    color: var(--text-3);
    flex-shrink: 0;
}

/* Toggle */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.83rem;
    color: var(--text-2);
    cursor: pointer;
    padding: 6px 0;
    margin-top: 4px;
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    transition: var(--ease);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: var(--text-2);
    border-radius: 50%;
    transition: var(--ease);
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--accent);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(18px);
    background: #fff;
}

/* Subscribers card */
.subscribers-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.subscribers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.subscribers-header .card-title {
    margin-bottom: 0;
}

.sub-counts {
    display: flex;
    gap: 5px;
}

.sub-count-badge {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
}

.s-t1 {
    background: rgba(194, 124, 14, 0.18);
    color: var(--bronze);
}

.s-t2 {
    background: rgba(168, 178, 195, 0.15);
    color: var(--silver);
}

.s-t3 {
    background: rgba(240, 179, 50, 0.18);
    color: var(--gold);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    margin-bottom: 10px;
    color: var(--text-3);
}

.search-input {
    background: none;
    border: none;
    color: var(--text-1);
    font-family: 'Inter', sans-serif;
    font-size: 0.83rem;
    width: 100%;
}

.search-input::placeholder {
    color: var(--text-3);
}

.search-input:focus {
    outline: none;
}

.sub-list-container {
    flex: 1;
    overflow-y: auto;
    min-height: 120px;
    max-height: 280px;
    margin-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.sub-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sub-list-empty {
    text-align: center;
    padding: 24px 12px;
    color: var(--text-3);
}

.empty-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.sub-list-empty p {
    font-size: 0.82rem;
}

.sub-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: var(--ease);
    font-size: 0.83rem;
}

.sub-item:hover {
    background: rgba(145, 71, 255, 0.08);
    border-color: rgba(145, 71, 255, 0.15);
}

.sub-item .tier-badge {
    font-size: 0.62rem;
    padding: 2px 6px;
    min-width: 38px;
}

.sub-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sub-item-gift {
    font-size: 0.7rem;
    color: var(--text-3);
}

.sub-total {
    font-size: 0.78rem;
    color: var(--text-3);
    text-align: center;
    margin-bottom: 10px;
}

.sub-total strong {
    color: var(--accent);
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ease);
}

.btn-load {
    background: linear-gradient(135deg, rgba(145, 71, 255, 0.25), rgba(145, 71, 255, 0.12));
    border: 1px solid rgba(145, 71, 255, 0.3);
    color: var(--accent);
}

.btn-load:hover {
    background: linear-gradient(135deg, rgba(145, 71, 255, 0.4), rgba(145, 71, 255, 0.2));
    transform: translateY(-1px);
}

.btn-load:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-demo {
    width: 100%;
    padding: 8px;
    margin-top: 6px;
    background: none;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-3);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    cursor: pointer;
    transition: var(--ease);
}

.btn-demo:hover {
    border-color: rgba(145, 71, 255, 0.35);
    color: var(--accent);
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Raffle Stage */
.raffle-stage {
    border-radius: var(--radius);
    padding: 28px;
    border-color: rgba(145, 71, 255, 0.2);
    box-shadow: 0 0 60px rgba(145, 71, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.stage-header {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.stage-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-2);
}

.stage-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(145, 71, 255, 0.12);
    border: 1px solid rgba(145, 71, 255, 0.25);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
}

/* Raffle display */
.raffle-display-wrap {
    position: relative;
    width: 100%;
    max-width: 680px;
    height: 180px;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
}

.raffle-blur-top,
.raffle-blur-bottom {
    position: absolute;
    left: 0;
    right: 0;
    height: 44px;
    z-index: 2;
    pointer-events: none;
}

.raffle-blur-top {
    top: 0;
    background: linear-gradient(to bottom, rgba(10, 7, 18, 0.9), transparent);
}

.raffle-blur-bottom {
    bottom: 0;
    background: linear-gradient(to top, rgba(10, 7, 18, 0.9), transparent);
}

.raffle-display {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--text-1);
    padding: 0;
    text-align: center;
    overflow: hidden;
}

/* New Reel Styles */
.raffle-reel {
    display: flex;
    flex-direction: column;
    width: 100%;
    will-change: transform;
    position: absolute;
    top: 0;
    left: 0;
}

.raffle-name {
    height: 180px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 40px;
    font-size: 2.6rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Selector indicator */
.raffle-display-wrap::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    top: 50%;
    height: 2px;
    background: var(--accent);
    opacity: 0.3;
    transform: translateY(-50%);
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 0 15px var(--accent);
}

.raffle-display-wrap::before {
    content: '▶';
    position: absolute;
    left: -5px;
    top: 50%;
    font-size: 1.2rem;
    color: var(--accent);
    transform: translateY(-50%);
    z-index: 6;
    text-shadow: 0 0 10px var(--accent);
}

.raffle-placeholder {
    text-align: center;
    z-index: 10;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

.placeholder-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-2);
    margin-bottom: 4px;
}

.placeholder-sub {
    font-size: 0.82rem;
    color: var(--text-3);
}

/* Winner state */
.raffle-display.spinning {
    font-size: 2.2rem;
    animation: textBlur 0.08s ease infinite;
}

@keyframes textBlur {

    0%,
    100% {
        filter: blur(0px);
    }

    50% {
        filter: blur(1px);
    }
}

.raffle-display.winner-reveal {
    font-size: 3rem;
    color: var(--gold);
    text-shadow: 0 0 40px rgba(255, 213, 79, 0.6), 0 0 80px rgba(145, 71, 255, 0.4);
    animation: winnerPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes winnerPop {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.winner-info {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.winner-info.visible {
    display: flex;
    animation: fadeUp 0.4s ease;
}

.winner-tier-badge {
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 700;
}

.winner-crown {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 0.05em;
}

/* Stage controls */
.stage-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-raffle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #6d28d9);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--ease);
    box-shadow: 0 4px 24px rgba(145, 71, 255, 0.45);
}

.btn-raffle:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(145, 71, 255, 0.6);
}

.btn-raffle:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-raffle.spinning {
    animation: pulse 0.8s ease infinite;
    cursor: not-allowed;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 24px rgba(145, 71, 255, 0.45);
    }

    50% {
        box-shadow: 0 4px 40px rgba(145, 71, 255, 0.8);
    }
}

.btn-reset {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-2);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ease);
}

.btn-reset:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* History */
.history-card {
    padding: 18px;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.history-header .card-title {
    margin-bottom: 0;
}

.btn-clear {
    font-size: 0.75rem;
    color: var(--text-3);
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--ease);
    font-family: 'Inter', sans-serif;
}

.btn-clear:hover {
    color: var(--red);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-empty {
    font-size: 0.83rem;
    color: var(--text-3);
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(145, 71, 255, 0.06);
    border: 1px solid rgba(145, 71, 255, 0.12);
    animation: fadeUp 0.3s ease;
}

.history-num {
    font-size: 0.72rem;
    color: var(--text-3);
    font-weight: 600;
    min-width: 20px;
}

.history-name {
    flex: 1;
    font-weight: 700;
    font-size: 0.95rem;
}

.history-time {
    font-size: 0.72rem;
    color: var(--text-3);
}

/* Loading overlay */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(10, 7, 18, 0.7);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-card {
    border-radius: 20px;
    padding: 40px 50px;
    text-align: center;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin: 0 auto 16px;
    border: 3px solid rgba(145, 71, 255, 0.2);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 0.9rem;
    color: var(--text-2);
}

/* Confetti canvas */
#confetti-canvas {
    position: fixed;
    inset: 0;
    z-index: 150;
    pointer-events: none;
    display: none;
}

/* Responsive */
@media (max-width: 900px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        max-height: none;
    }

    :root {
        --sidebar: 100%;
    }
}