:root {
    /* Light Theme (Pink Serenity) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --text-primary: #2c2e33;
    --text-secondary: #5c5f66;
    --text-tertiary: #868e96;

    --border: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);

    /* Brand Colors */
    --primary: #FC80A4;
    --primary-hover: #fa6b94;
    --primary-light: rgba(252, 128, 164, 0.1);

    --accent: #FC80A4;
    /* Kept for backward compatibility */
    --accent-hover: #fa6b94;

    /* Semantic Colors */
    --success: #4ad991;
    --success-hover: #3db87b;
    --warning: #ffbf47;
    --warning-hover: #e5a42b;
    --danger: #ff6b6b;
    --danger-hover: #e04f4f;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
}

[data-theme="dark"] {
    --bg-primary: #1a1b1e;
    --bg-secondary: #25262b;
    --bg-tertiary: #2c2e33;
    --text-primary: #f1f3f5;
    --text-secondary: #c1c2c5;
    --text-tertiary: #909296;

    --border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);

    --primary: #FC80A4;
    --primary-hover: #fa6b94;
    --primary-light: rgba(252, 128, 164, 0.2);

    --accent: #FC80A4;
    --accent-hover: #fa6b94;

    --success: #2b8a3e;
    --success-hover: #2f9e44;
    --warning: #e67700;
    --warning-hover: #f08c00;
    --danger: #c92a2a;
    --danger-hover: #e03131;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(20px);
    background: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .navbar {
    background: rgba(26, 27, 30, 0.8);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-title::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 6px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logout-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--text-tertiary);
}

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

.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    transition: opacity 0.2s ease;
}

.theme-icon.sun {
    display: block;
}

.theme-icon.moon {
    display: none;
}

[data-theme="dark"] .theme-icon.sun {
    display: none;
}

[data-theme="dark"] .theme-icon.moon {
    display: block;
}

/* Main Content */
.main {
    padding: 32px 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .main {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Cards */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 0, 0, 0);
    transform: translateY(-2px);
}

.card-header {
    padding: 24px 24px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.card-body {
    padding: 0 24px 24px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

/* Status */
.status-row {
    margin-bottom: 24px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

.status-badge.running .status-dot {
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(74, 217, 145, 0.15);
}

.status-badge.error .status-dot {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.15);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.info-label {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
}

/* Control Buttons */
.control-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.control-btn {
    height: 80px;
    border-radius: 20px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: white;
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.control-btn:hover::before {
    opacity: 1;
}

.control-btn svg {
    width: 28px;
    height: 28px;
    margin-bottom: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.control-btn:active {
    transform: scale(0.96);
}

.control-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(0.5);
}

.control-btn.success {
    background: linear-gradient(135deg, #4ad991 0%, #3cc781 100%);
    box-shadow: 0 4px 12px rgba(60, 199, 129, 0.3);
}

.control-btn.success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(60, 199, 129, 0.4);
}

.control-btn.warning {
    background: linear-gradient(135deg, #ffbf47 0%, #f5a623 100%);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3);
}

.control-btn.warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 166, 35, 0.4);
}

.control-btn.primary {
    background: linear-gradient(135deg, #FC80A4 0%, #f06c9b 100%);
    box-shadow: 0 4px 12px rgba(252, 128, 164, 0.3);
}

.control-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(252, 128, 164, 0.4);
}

.control-btn.danger {
    background: var(--bg-secondary);
    color: var(--danger);
    border: 1px solid transparent;
}

.control-btn.danger:hover:not(:disabled) {
    background: #fff5f5;
    border-color: rgba(255, 107, 107, 0.2);
}

.control-btn.full {
    width: 100%;
    flex-direction: row;
    gap: 10px;
}

.control-btn.full svg {
    margin-bottom: 0;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-card {
    text-align: left;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 16px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    background: var(--primary-light);
}

.stat-card:hover .stat-value {
    color: var(--primary);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.table th {
    padding: 16px 24px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background: var(--bg-tertiary);
}

.empty-row {
    text-align: center;
    color: var(--text-tertiary);
    padding: 60px !important;
    font-style: normal;
}

/* Alert */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #fff9db;
    border: 1px solid #fcc419;
    border-radius: 12px;
    color: #e67700;
    font-size: 14px;
    margin-bottom: 24px;
}

.alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Error Banner */
.error-banner {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fff5f5;
    border: 1px solid #ffc9c9;
    border-radius: 12px;
    color: #e03131;
    font-size: 14px;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 360px;
    pointer-events: none;
}

.toast {
    padding: 16px 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.success span:first-child {
    color: var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.error span:first-child {
    color: var(--danger);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

@keyframes slideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Full Width Cards */
.full-width {
    grid-column: 1 / -1;
}

/* Dialog Modal */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.dialog-overlay.show {
    display: flex;
}

.dialog-modal {
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    max-width: 420px;
    width: 90%;
    overflow: hidden;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.dialog-header {
    padding: 24px;
    padding-bottom: 0;
    text-align: center;
}

.dialog-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.dialog-body {
    padding: 16px 24px 24px;
    text-align: center;
}

.dialog-message {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.dialog-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
}

.dialog-btn {
    flex: 1;
    height: 44px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dialog-btn-cancel {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.dialog-btn-cancel:hover {
    background: var(--bg-tertiary);
}

.dialog-btn-confirm {
    background: var(--primary);
    color: white;
}

.dialog-btn-confirm:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(252, 128, 164, 0.3);
}

.dialog-btn-confirm.danger {
    background: var(--danger);
}

.dialog-btn-confirm.danger:hover {
    background: var(--danger-hover);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--primary-light) 100%);
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 48px;
    max-width: 400px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .login-card {
    background: rgba(30, 30, 35, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

.login-card.shake {
    animation: shake 0.5s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-6px);
    }

    40%,
    80% {
        transform: translateX(6px);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 96px;
    height: 96px;
    background: var(--primary);
    border-radius: 24px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    box-shadow: 0 12px 24px rgba(252, 128, 164, 0.3);
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 4px;
}

.form-input {
    height: 48px;
    padding: 0 16px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 14px;
    font-size: 16px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.error-message {
    color: var(--danger);
    font-size: 13px;
    min-height: 20px;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 107, 107, 0.1);
    opacity: 0;
    transition: opacity 0.2s;
}

.error-message:not(:empty) {
    opacity: 1;
}

.login-btn {
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
}

.login-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(252, 128, 164, 0.4);
}

.login-btn:active:not(:disabled) {
    transform: translateY(0);
}

/* Sidebar Layout (New) */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    /* Fixed sidebar */
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    padding: 24px;
}

.sidebar-header {
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.nav-item.danger {
    color: var(--danger);
}

.nav-item.danger:hover {
    background: rgba(255, 107, 107, 0.1);
    color: var(--danger);
}

.sidebar-footer {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: var(--bg-secondary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    /* Offset for fixed sidebar */
    padding: 32px 40px;
    background: var(--bg-secondary);
    min-height: 100vh;
}

.content-header {
    margin-bottom: 32px;
}

.content-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Module Visibility */
.module-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.module-section.active {
    display: block;
}

/* Draw Modal Styles */
.draw-modal {
    background: var(--bg-primary);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    width: 600px;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.draw-header {
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.draw-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.draw-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.draw-info {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.info-row .value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Participants & Winners Grid */
.participants-grid,
.winners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.participant-card,
.winner-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: transform 0.2s;
}

.participant-card:hover {
    transform: translateY(-2px);
    background: var(--bg-tertiary);
}

.participant-avatar,
.winner-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.participant-name,
.winner-name {
    font-size: 12px;
    color: var(--text-primary);
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empty-text {
    width: 100%;
    text-align: center;
    color: var(--text-tertiary);
    padding: 32px;
    grid-column: 1 / -1;
    background: var(--bg-secondary);
    border-radius: 12px;
    font-size: 14px;
}

/* Winner specific styles */
.winner-card {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe3e3 100%);
    border: 1px solid #ffccca;
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.winner-avatar {
    border-color: #ff6b6b;
    width: 56px;
    height: 56px;
}

.winner-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.draw-footer {
    padding: 24px 32px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 16px;
    background: var(--bg-primary);
    flex-shrink: 0;
}

.draw-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    gap: 16px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Tag Input Styles */
.tag-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 14px;
    min-height: 48px;
    cursor: text;
    transition: all 0.2s ease;
}

.tag-input-container:focus-within {
    border-color: var(--primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
    animation: scaleIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(252, 128, 164, 0.1);
    transition: all 0.2s;
    color: var(--primary);
}

.tag-remove:hover {
    background: var(--danger);
    color: white;
}

.tag-remove svg {
    width: 10px;
    height: 10px;
}

.tag-input {
    flex: 1;
    min-width: 120px;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--text-primary);
    padding: 4px;
    outline: none;
    height: 32px;
}