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

:root {
    --bg-primary: #0A0A0A;
    --bg-secondary: #131313;
    --bg-tertiary: #1a1a1a;
    --bg-quaternary: #222222;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #606060;
    --accent: #4a9eff;
    --accent-hover: #5aaeff;
    --accent-dark: #3a8eef;
    --success: #4ade80;
    --error: #f87171;
    --warning: #fbbf24;
    --border: #1e1e1e;
    --border-light: #2a2a2a;
    --border-dark: #111111;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0d0d0d;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 2rem;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: breathe 2s ease-in-out infinite;
    box-shadow: 0 0 8px currentColor;
    filter: brightness(1.2);
}

@keyframes breathe {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.user-avatar:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
    transform: scale(1.05);
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.username {
    font-weight: 500;
    color: var(--text-primary);
}

.user-plan {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
    box-shadow: 0 6px 16px rgba(74, 158, 255, 0.4);
    transform: translateY(-1px);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--bg-quaternary);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.btn-refresh {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    transform: rotate(180deg);
}

.btn-refresh:active {
    transform: rotate(360deg);
}

.btn-logout {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
}

.btn-logout:hover {
    color: var(--text-primary);
}

/* Login Screen */
.login-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
    background: #0d0d0d;
}

.login-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), #ffffff, rgba(255, 255, 255, 0.6), transparent);
    opacity: 0.6;
    border-radius: var(--radius) var(--radius) 0 0;
}


@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

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

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.card-content {
    color: var(--text-secondary);
}

#active-plans-list {
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--bg-secondary);
}

#active-plans-list::-webkit-scrollbar {
    width: 6px;
}

#active-plans-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

#active-plans-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

#active-plans-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

#active-plans-list > div {
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--bg-secondary);
}

#active-plans-list > div::-webkit-scrollbar {
    width: 6px;
}

#active-plans-list > div::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

#active-plans-list > div::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

#active-plans-list > div::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Expiry timer animations */
.expiry-timer {
    animation: breathe 2s ease-in-out infinite;
}

.expiry-red {
    animation: breathe-red 1.5s ease-in-out infinite;
}

.expiry-yellow {
    animation: breathe-yellow 2s ease-in-out infinite;
}

.expiry-green {
    animation: breathe-green 2.5s ease-in-out infinite;
}

@keyframes breathe-red {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 8px rgba(248, 113, 113, 0.4), 0 0 16px rgba(248, 113, 113, 0.2);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.05);
        text-shadow: 0 0 12px rgba(248, 113, 113, 0.6), 0 0 24px rgba(248, 113, 113, 0.3);
    }
}

@keyframes breathe-yellow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 8px rgba(251, 191, 36, 0.4), 0 0 16px rgba(251, 191, 36, 0.2);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.03);
        text-shadow: 0 0 10px rgba(251, 191, 36, 0.5), 0 0 20px rgba(251, 191, 36, 0.25);
    }
}

@keyframes breathe-green {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 6px rgba(74, 222, 128, 0.3), 0 0 12px rgba(74, 222, 128, 0.15);
    }
    50% {
        opacity: 0.95;
        transform: scale(1.02);
        text-shadow: 0 0 8px rgba(74, 222, 128, 0.4), 0 0 16px rgba(74, 222, 128, 0.2);
    }
}

/* Active plan item hover effect */
.active-plan-item {
    transition: all 0.2s ease;
}

.active-plan-item:hover {
    background: var(--bg-quaternary) !important;
    transform: translateX(4px);
    border-color: var(--border-light) !important;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0.5rem 0;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Plan Cards */
.plan-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.plan-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.plan-card:hover:not(.out-of-stock) {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.plan-card:hover:not(.out-of-stock)::before {
    opacity: 1;
}

.plan-card.out-of-stock {
    opacity: 0.5;
    filter: grayscale(100%);
    cursor: not-allowed;
    pointer-events: none;
}

.plan-card.out-of-stock .plan-name,
.plan-card.out-of-stock .plan-range,
.plan-card.out-of-stock .plan-pricing {
    color: var(--text-tertiary);
}

.plan-card.out-of-stock .btn {
    opacity: 0.6;
    cursor: not-allowed;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.plan-range {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.plan-pricing {
    margin: 1rem 0;
}

.price {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
}

.price-unit {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.slot-status {
    font-size: 0.875rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.slot-available {
    color: var(--success);
}

.slot-full {
    color: var(--error);
}

.priority-toggle {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.priority-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.priority-toggle:hover {
    background: var(--bg-quaternary);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.priority-toggle:hover::before {
    left: 100%;
}

.priority-toggle.active {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    color: #0A0A0A;
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.qr-code {
    margin: 1.5rem auto;
    padding: 1rem;
    background: #ffffff;
    border-radius: var(--radius);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s ease-in;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.qr-code img {
    display: block;
    width: 200px;
    height: 200px;
    animation: scaleIn 0.5s ease-out;
}

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

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.payment-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.payment-status.waiting {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.payment-status.unconfirmed {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    animation: pulse 2s ease-in-out infinite;
}

.payment-status.confirmed {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: var(--success);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input:hover {
    border-color: var(--border-light);
    background: var(--bg-quaternary);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-quaternary);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

/* Remove spinner arrows from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.qr-code {
    text-align: center;
    margin: 1.5rem 0;
}

.qr-code img {
    max-width: 100%;
    border-radius: var(--radius);
}

.payment-details {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin: 1rem 0;
}

.payment-address {
    word-break: break-all;
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin: 0.5rem 0;
}

.payment-amount {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

/* Order History */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.order-item:hover {
    background: var(--bg-quaternary);
    border-color: var(--border-light);
    transform: translateX(4px);
}

.order-info {
    flex: 1;
}

.order-id {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.order-details {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.order-status.waiting {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.order-status.confirmed {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: var(--success);
}

/* Script Display */
.script-display {
    background: #111111;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    color: #d4d4d4;
    word-break: break-all;
    margin: 1rem 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.copy-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    padding: 1rem;
    border-radius: var(--radius);
    margin: 1rem 0;
}

.success-msg {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 1rem;
    border-radius: var(--radius);
    margin: 1rem 0;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.3s ease;
    position: relative;
}

.tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab.active {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.tab.active::after {
    transform: scaleX(1);
    background: rgba(255, 255, 255, 0.6);
}

.tab:hover {
    color: var(--text-primary);
    background: rgba(74, 158, 255, 0.05);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 1.5rem;
    }

    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

.pause-active-grid {
    grid-template-columns: 1fr !important;
}

.pause-active-grid .card {
    width: 100%;
    max-width: 100%;
}

/* Pause token option selection states */
.pause-option-hours,
.pause-option-days {
    transition: opacity 0.3s ease;
}

.pause-option-hours.faded,
.pause-option-days.faded {
    opacity: 0.5;
}

.pause-option-hours.active,
.pause-option-days.active {
    opacity: 1;
}

    .active-plan-item {
        gap: 0.25rem !important;
        padding: 0.4rem 0.5rem !important;
    }

    .active-plan-item > div {
        gap: 0.25rem !important;
    }

    .active-plan-username {
        max-width: 50px !important;
        font-size: 0.75rem !important;
    }

    .active-plan-item [class*="expiry"] {
        font-size: 0.75rem !important;
    }

    .active-plan-item > div > div {
        font-size: 0.75rem !important;
    }
}

/* ===============================
   AutoJoiner Configuration
   =============================== */
.aj-config-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.aj-section-header {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.aj-section-icon {
    color: var(--accent);
    font-size: 1rem;
}

.aj-label-upper {
    text-transform: uppercase;
    font-size: 0.75rem !important;
    letter-spacing: 0.05em;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
}

.aj-gen-input-wrap {
    position: relative;
    max-width: 320px;
}

.aj-gen-prefix {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9375rem;
    pointer-events: none;
}

.aj-gen-input {
    padding-left: 1.75rem !important;
}

.aj-hint {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.aj-hint::before {
    content: 'ⓘ';
    font-size: 0.75rem;
}

/* Searchable brainrot dropdown */
.aj-search-wrap {
    position: relative;
}

.aj-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-top: 4px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.aj-dropdown.aj-dropdown-visible {
    display: block;
}

.aj-dropdown::-webkit-scrollbar {
    width: 6px;
}

.aj-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.aj-dropdown::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.aj-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

.aj-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: background 0.15s ease;
}

.aj-dropdown-item:hover {
    background: var(--bg-quaternary);
}

.aj-dropdown-item-img-wrap {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg-secondary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aj-dropdown-item-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.aj-dropdown-empty {
    padding: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    text-align: center;
}

/* Include list items */
.aj-include-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    background: var(--bg-quaternary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.aj-include-item:hover {
    border-color: var(--border-light);
    background: #262626;
}

.aj-include-img-wrap {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-tertiary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aj-include-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.aj-include-name {
    flex: 1;
    min-width: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aj-include-gen-input {
    width: 80px !important;
    flex-shrink: 0;
    text-align: center;
    font-size: 0.875rem !important;
    padding: 0.4rem 0.5rem !important;
}

.aj-include-remove {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.aj-include-remove:hover {
    color: var(--error);
    background: rgba(248, 113, 113, 0.1);
}

/* Import / Export icon buttons */
.aj-icon-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.aj-icon-btn:hover {
    background: var(--bg-quaternary);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.aj-icon-img {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    filter: brightness(0) invert(1);
}

.aj-icon-btn:hover .aj-icon-img {
    opacity: 1;
}

/* Save / Cancel buttons */
.aj-save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.aj-cancel-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: default;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.aj-cancel-btn.aj-cancel-active {
    color: var(--text-primary);
    cursor: pointer;
}

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

/* Floating save bar (Discord-style) */
.aj-float-save-bar {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-width: 420px;
    max-width: 560px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 999;
    transition: bottom 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.aj-float-save-bar.aj-float-visible {
    bottom: 2rem;
}

@media (max-width: 768px) {
    .aj-float-save-bar {
        min-width: auto;
        left: 1rem;
        right: 1rem;
        transform: none;
        gap: 1rem;
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }

    .aj-include-name {
        font-size: 0.8125rem;
    }

    .aj-include-gen-input {
        width: 65px !important;
    }
}

/* ===============================
   Auction System
   =============================== */
/* ── Auction Card ── */
.auction-card {
    border: 1px solid rgba(74, 158, 255, 0.2) !important;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #0d1526 100%) !important;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
    padding: 1.25rem !important;
}
.auction-card:hover {
    border-color: rgba(74, 158, 255, 0.45) !important;
    box-shadow: 0 0 24px rgba(74, 158, 255, 0.1);
    transform: translateY(-2px);
}
.auction-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.03) 0%, transparent 60%);
    animation: auction-glow 6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes auction-glow {
    0%, 100% { opacity: 0.5; transform: translate(0, 0); }
    50% { opacity: 1; transform: translate(5%, 5%); }
}

/* 0/0 or X/0 = off sale / paused */
.auction-card.auction-card-off {
    filter: grayscale(0.85);
    opacity: 0.75;
    pointer-events: auto;
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.auction-card.auction-card-off:hover {
    filter: grayscale(0.7);
    opacity: 0.85;
}

.auction-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.auction-card-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.auction-card-slots {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.2rem 0.55rem;
    font-variant-numeric: tabular-nums;
}
.auction-help-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.auction-help-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.auction-card-body {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.auction-card-bid-col {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.auction-card-bid-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}
.auction-card-bid-val {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}
.auction-card-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
    flex-shrink: 0;
}
.auction-card-status-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}
.auction-card-timer {
    font-size: 1.1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
    line-height: 1;
}
.auction-card-timer.open { color: var(--success); }
.auction-card-timer.warn { color: var(--warning); }
.auction-card-timer.urgent { color: var(--error); animation: auction-pulse 0.8s ease-in-out infinite; }
.auction-card-timer.waiting { color: var(--text-tertiary); font-size: 0.9375rem; }
.auction-card-tag {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    line-height: 1;
}
.auction-card-tag.active { color: var(--accent); background: rgba(74, 158, 255, 0.12); }
.auction-card-tag.winning { color: var(--success); background: rgba(74, 222, 128, 0.12); }
.auction-card-tag.outbid { color: var(--error); background: rgba(248, 113, 113, 0.12); }
.auction-card-tag.won { color: var(--success); background: rgba(74, 222, 128, 0.15); }

@keyframes auction-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ── Auction Bid Modal ── */
.abm-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 380px;
    padding: 1.75rem 1.5rem;
    position: relative;
    animation: abm-in 0.2s ease;
}
@keyframes abm-in {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.abm-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.25rem;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}
.abm-close:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.abm-header { text-align: center; margin-bottom: 1.25rem; }
.abm-title { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); }
.abm-subtitle { font-size: 0.8125rem; color: var(--text-tertiary); margin-top: 0.2rem; }

.abm-timer { text-align: center; margin-bottom: 0.75rem; }
.abm-timer-val {
    font-size: 1.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}
.abm-timer-val.open { color: var(--success); text-shadow: 0 0 10px rgba(74,222,128,0.3); }
.abm-timer-val.warn { color: var(--warning); }
.abm-timer-val.urgent { color: var(--error); animation: auction-pulse 0.8s ease-in-out infinite; }
.abm-timer-val.waiting { color: var(--text-tertiary); font-size: 1.25rem; }

.abm-bid-display { text-align: center; margin-bottom: 1rem; }
.abm-bid-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 0.2rem;
}
.abm-bid-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    transition: all 0.3s ease;
}
.abm-bid-count {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.abm-hold { text-align: center; margin-bottom: 0.75rem; min-height: 0; }
.abm-hold-bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}
.abm-hold-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--warning), var(--error));
    border-radius: 2px;
    transition: width 1s linear;
}
.abm-hold-fill.finalizing {
    background: linear-gradient(90deg, var(--success), #22c55e);
}
.abm-hold-text {
    font-size: 0.8125rem;
    color: var(--warning);
    font-weight: 500;
}
.abm-hold-text.done { color: var(--success); }

.abm-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 60px;
}
.abm-quick-bid {
    width: 100%;
    padding: 0.8rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
    letter-spacing: 0.02em;
}
.abm-quick-bid:hover:not(:disabled) { background: #3182e6; transform: translateY(-1px); }
.abm-quick-bid:active:not(:disabled) { transform: translateY(0); }
.abm-quick-bid:disabled { opacity: 0.5; cursor: not-allowed; }

.abm-custom-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.abm-custom-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.abm-custom-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.abm-custom-wrap:focus-within { border-color: var(--accent); }
.abm-dollar {
    padding: 0 0.6rem;
    color: var(--text-tertiary);
    font-weight: 600;
    font-size: 0.9375rem;
    user-select: none;
}
.abm-custom-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.6rem 0;
    outline: none;
    min-width: 0;
    -moz-appearance: textfield;
}
.abm-custom-input::-webkit-outer-spin-button,
.abm-custom-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.abm-custom-go {
    padding: 0.6rem 1rem;
    background: transparent;
    border: none;
    border-left: 1px solid var(--border);
    color: var(--accent);
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.abm-custom-go:hover:not(:disabled) { background: rgba(74, 158, 255, 0.1); color: #fff; }
.abm-custom-go:disabled { opacity: 0.4; cursor: not-allowed; }

.abm-status {
    text-align: center;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.abm-status.winning {
    color: var(--success);
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.2);
}
.abm-status.won {
    color: var(--success);
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.3);
    font-size: 1rem;
}
.abm-status.lost {
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
}
.abm-status.waiting-status {
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    font-weight: 500;
}
.abm-winning-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.abm-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
}

/* Help modal list */
.abm-help-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0 0.25rem;
}
.abm-help-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.abm-help-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

@media (max-width: 768px) {
    .abm-modal { max-width: 95vw; padding: 1.25rem 1rem; }
    .abm-bid-amount { font-size: 1.5rem; }
    .abm-timer-val { font-size: 1.5rem; }
}

