/* Agalon - Sci-Fi RPG Styles */

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

:root {
    /* Dark sci-fi theme */
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2234;
    --bg-panel: #1e293b;
    --bg-hover: #2d3a4f;

    /* Accent colors */
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-avax: #e84142;

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Borders */
    --border-color: #334155;
    --border-glow: rgba(59, 130, 246, 0.5);

    /* Effects */
    --glow-primary: 0 0 20px rgba(59, 130, 246, 0.3);
    --glow-success: 0 0 20px rgba(16, 185, 129, 0.3);
    --glow-avax: 0 0 20px rgba(232, 65, 66, 0.3);

    /* Sizing */
    --radius: 8px;
    --radius-lg: 12px;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
}

#app {
    height: 100%;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: #2563eb;
    box-shadow: var(--glow-primary);
}

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

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

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-combat {
    background: var(--accent-danger);
    color: white;
}

.btn-combat:hover {
    background: #dc2626;
}

/* Screens */
.screen {
    height: 100%;
}

/* Login Screen */
#loginScreen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.login-container {
    text-align: center;
    padding: 40px;
}

.game-title {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 12px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    text-shadow: 0 0 40px rgba(59, 130, 246, 0.5);
}

.game-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 48px;
}

.login-box {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 400px;
    margin: 0 auto;
}

.wallet-section, .guest-section {
    padding: 16px 0;
}

.wallet-icon {
    font-size: 20px;
}

.wallet-info, .guest-info {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-muted);
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 16px;
    font-size: 12px;
}

.network-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    font-size: 12px;
    color: var(--text-muted);
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.indicator.online {
    background: var(--accent-success);
    box-shadow: 0 0 8px var(--accent-success);
}

.indicator.offline {
    background: var(--text-muted);
}

/* Game Screen */
#gameScreen {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Top Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-name {
    font-weight: 600;
    font-size: 16px;
}

.player-level {
    background: var(--accent-primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.resource-bar {
    display: flex;
    gap: 24px;
}

.resource {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
}

.resource-icon {
    font-size: 16px;
}

.top-actions {
    display: flex;
    gap: 8px;
}

/* Main Layout */
.game-main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Left Sidebar */
.sidebar-left {
    width: 80px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 12px 8px;
    gap: 4px;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

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

.nav-btn.active {
    background: var(--accent-primary);
    color: white;
}

.nav-icon {
    font-size: 20px;
}

.nav-text {
    font-size: 10px;
    font-weight: 500;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--bg-primary);
}

.tab-content {
    height: 100%;
}

/* Panels */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.panel h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

.stat-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
}

.stat-name {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-bonus {
    font-size: 11px;
    color: var(--accent-success);
}

/* Equipment Grid */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.equipment-slot {
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.equipment-slot:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

.equipment-slot.filled {
    border-style: solid;
    border-color: var(--accent-secondary);
}

.slot-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Skills Grid */
.skills-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.skills-header h2 {
    margin: 0;
}

.category-filters {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.skill-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.skill-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
}

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

.skill-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.skill-level {
    font-size: 12px;
    color: var(--text-muted);
}

.skill-progress {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.skill-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.3s;
}

.skill-stats {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.skill-stat {
    font-size: 11px;
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    color: var(--accent-success);
}

/* Combat */
.combat-zones {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.combat-zone {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.combat-zone:hover {
    border-color: var(--accent-danger);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.zone-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.zone-name {
    font-weight: 600;
}

.zone-level {
    font-size: 12px;
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    color: var(--text-secondary);
}

.zone-enemies {
    font-size: 12px;
    color: var(--text-muted);
}

/* Combat Arena */
.combat-arena {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.combat-ui {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.combatant {
    width: 200px;
}

.combatant-name {
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.health-bar {
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: var(--accent-success);
    transition: width 0.3s;
}

.health-fill.enemy {
    background: var(--accent-danger);
}

.health-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.combat-center {
    flex: 1;
    margin: 0 20px;
}

.combat-log {
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    padding: 12px;
    height: 120px;
    overflow-y: auto;
    font-size: 12px;
    color: var(--text-secondary);
}

.combat-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.consumables-bar {
    display: flex;
    gap: 8px;
}

.consumable-slot {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.consumable-slot:hover {
    border-color: var(--accent-primary);
}

.combat-buttons {
    display: flex;
    gap: 8px;
}

/* Inventory */
.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.inventory-count {
    font-size: 14px;
    color: var(--text-muted);
}

.inventory-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;
}

.inventory-slot {
    aspect-ratio: 1;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    font-size: 24px;
}

.inventory-slot:hover {
    border-color: var(--accent-primary);
}

.inventory-slot.rarity-common { border-color: var(--text-muted); }
.inventory-slot.rarity-uncommon { border-color: var(--accent-success); }
.inventory-slot.rarity-rare { border-color: var(--accent-primary); }
.inventory-slot.rarity-epic { border-color: var(--accent-secondary); }
.inventory-slot.rarity-legendary { border-color: var(--accent-warning); }

.item-count {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 10px;
    font-weight: 600;
}

/* Right Sidebar */
.sidebar-right {
    width: 260px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    padding: 16px;
}

.sidebar-right h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.current-activity {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
}

.no-activity {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.no-activity .hint {
    font-size: 11px;
    margin-top: 4px;
}

.activity-active {
    text-align: center;
}

.activity-name {
    font-weight: 600;
    margin-bottom: 8px;
}

.activity-progress {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.activity-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.1s;
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
}

.rewards-summary {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.reward-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-color);
}

.reward-item:last-child {
    border-bottom: none;
}

.reward-item.avax span:last-child {
    color: var(--accent-avax);
    font-weight: 600;
}

/* Marketplace */
.market-header {
    margin-bottom: 20px;
}

.market-tabs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.market-tab {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.market-tab:hover, .market-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.market-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.market-filters select {
    padding: 8px 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    cursor: pointer;
}

.market-listings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.market-listing {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.market-listing:hover {
    border-color: var(--accent-primary);
}

.listing-item {
    font-size: 32px;
    text-align: center;
    margin-bottom: 8px;
}

.listing-name {
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}

.listing-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--accent-avax);
    font-weight: 600;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

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

/* Skill Modal */
.skill-modal {
    max-width: 600px;
}

.skill-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.skill-detail-icon {
    font-size: 48px;
    width: 80px;
    height: 80px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-detail-info h2 {
    font-size: 20px;
    margin-bottom: 4px;
}

.skill-detail-info p {
    color: var(--text-secondary);
    font-size: 13px;
}

.skill-activities {
    margin-top: 20px;
}

.skill-activities h3 {
    font-size: 14px;
    margin-bottom: 12px;
}

.activity-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.activity-item:hover {
    border-color: var(--accent-primary);
}

.activity-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.activity-info h4 {
    font-size: 13px;
    margin-bottom: 2px;
}

.activity-info p {
    font-size: 11px;
    color: var(--text-muted);
}

.activity-rewards {
    text-align: right;
}

.activity-rewards span {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar-left {
        width: 60px;
    }

    .nav-text {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Combat Zone Enhancements */
.combat-zone {
    position: relative;
}

.zone-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.zone-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent-success);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.zone-recommended {
    border-color: var(--accent-success);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.zone-hard {
    opacity: 0.6;
}

.zone-hard:hover {
    opacity: 1;
}

/* Combat Log Entries */
.combat-log-entry {
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
}

.combat-log-entry:last-child {
    border-bottom: none;
}

.combat-log-entry.player-attack {
    color: var(--accent-primary);
}

.combat-log-entry.enemy-attack {
    color: var(--accent-danger);
}

.combat-log-entry.victory {
    color: var(--accent-success);
    font-weight: 600;
}

.combat-log-entry.defeat {
    color: var(--accent-danger);
    font-weight: 600;
}

.combat-log-entry.reward {
    color: var(--accent-warning);
}

.combat-log-entry.drop {
    color: var(--accent-secondary);
}

.combat-log-entry.heal {
    color: var(--accent-success);
}

.combat-log-entry.buff {
    color: var(--accent-secondary);
}

.combat-log-entry.penalty {
    color: var(--accent-danger);
}

.combat-log-entry.level-up {
    color: var(--accent-warning);
    font-weight: 600;
    animation: levelUp 0.5s ease;
}

@keyframes levelUp {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Consumables Bar */
.consumable-slot {
    position: relative;
    transition: all 0.2s;
}

.consumable-slot:hover {
    transform: scale(1.1);
    box-shadow: var(--glow-primary);
}

.consumable-icon {
    font-size: 20px;
}

.consumable-count {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 10px;
    font-weight: 600;
    background: var(--bg-primary);
    padding: 0 4px;
    border-radius: 4px;
}

.no-consumables {
    color: var(--text-muted);
    font-size: 12px;
    padding: 12px;
}

/* Combat Button States */
.btn-combat {
    background: var(--accent-success);
    color: white;
}

.btn-combat:hover {
    background: #0f9b6f;
    box-shadow: var(--glow-success);
}

.btn-combat.active {
    background: var(--accent-danger);
}

.btn-combat.active:hover {
    background: #d62c2c;
}

/* Item Rarity Colors */
.rarity-common { border-color: #9ca3af; }
.rarity-uncommon { border-color: #22c55e; }
.rarity-rare { border-color: #3b82f6; }
.rarity-epic { border-color: #a855f7; }
.rarity-legendary { border-color: #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, 0.3); }

.rarity-text-common { color: #9ca3af; }
.rarity-text-uncommon { color: #22c55e; }
.rarity-text-rare { color: #3b82f6; }
.rarity-text-epic { color: #a855f7; }
.rarity-text-legendary { color: #f59e0b; }

/* Tradeable Item Badge */
.inventory-slot.tradeable {
    position: relative;
}

.avax-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    color: var(--accent-avax);
    text-shadow: 0 0 4px var(--accent-avax);
}

/* Item Detail Modal */
.item-modal {
    max-width: 450px;
}

.item-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.item-detail-icon {
    font-size: 48px;
    width: 80px;
    height: 80px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
}

.item-detail-info h2 {
    font-size: 18px;
    margin-bottom: 4px;
}

.item-type {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: capitalize;
}

.item-rarity {
    font-size: 12px;
    font-weight: 600;
}

.item-description {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.item-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.item-stats .stat-bonus {
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--accent-success);
}

.avax-tradeable {
    color: var(--accent-avax);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
}

.item-quantity {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 16px;
}

.item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.item-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* Equipment with items */
.equipment-slot .item-icon {
    font-size: 24px;
}

.equipment-slot.rarity-uncommon { border-color: #22c55e; border-style: solid; }
.equipment-slot.rarity-rare { border-color: #3b82f6; border-style: solid; }
.equipment-slot.rarity-epic { border-color: #a855f7; border-style: solid; }
.equipment-slot.rarity-legendary {
    border-color: #f59e0b;
    border-style: solid;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* Marketplace Styles */
.market-listing {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.market-listing:hover {
    border-color: var(--accent-avax);
    box-shadow: var(--glow-avax);
}

.listing-item-icon {
    font-size: 36px;
    text-align: center;
    margin-bottom: 8px;
}

.listing-item-name {
    font-weight: 600;
    text-align: center;
    margin-bottom: 4px;
}

.listing-item-rarity {
    font-size: 11px;
    text-align: center;
    margin-bottom: 8px;
}

.listing-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--accent-avax);
    font-weight: 600;
    font-size: 14px;
}

.listing-seller {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
}

/* Automation Settings */
.automation-panel {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
}

.automation-setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.automation-setting:last-child {
    border-bottom: none;
}

.automation-setting label {
    font-size: 13px;
}

.automation-setting select {
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 12px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-tertiary);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .toggle-slider {
    background: var(--accent-primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background: white;
}

.automation-note {
    font-size: 10px;
    color: var(--accent-avax);
    margin-top: 12px;
    text-align: center;
}

/* Guest Mode Styling */
.guest-mode-banner {
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-warning);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 11px;
    color: var(--accent-warning);
    text-align: center;
}

.guest-mode-banner a {
    color: var(--accent-primary);
    cursor: pointer;
    text-decoration: underline;
}

/* Wallet Modal */
.wallet-modal {
    max-width: 400px;
}

.wallet-panel h2 {
    color: var(--accent-avax);
    margin-bottom: 20px;
    font-size: 18px;
}

.wallet-address-display,
.wallet-balance-display {
    margin-bottom: 16px;
}

.wallet-address-display label,
.wallet-balance-display label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.address-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    padding: 10px 12px;
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
}

.btn-icon-small {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    opacity: 0.7;
}

.btn-icon-small:hover {
    opacity: 1;
}

.balance-amount {
    font-size: 24px;
    font-weight: 600;
    color: var(--accent-avax);
}

.wallet-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

.wallet-not-connected {
    text-align: center;
    padding: 20px 0;
}

.wallet-not-connected p {
    margin-bottom: 8px;
}

.wallet-hint {
    color: var(--text-muted);
    font-size: 13px;
}

.wallet-not-connected .btn {
    margin-top: 16px;
}

/* Settings Modal */
.settings-modal {
    max-width: 400px;
}

.settings-panel h2 {
    margin-bottom: 20px;
    font-size: 18px;
}

.setting-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-group:last-child {
    border-bottom: none;
}

.setting-group label {
    font-size: 14px;
}

.setting-group.danger-zone {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--accent-danger);
    border-bottom: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.setting-group.danger-zone label {
    color: var(--accent-danger);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .toggle-slider {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
    background: white;
}

/* Buttons */
.btn-danger {
    background: transparent;
    border: 1px solid var(--accent-danger);
    color: var(--accent-danger);
}

.btn-danger:hover {
    background: var(--accent-danger);
    color: white;
}

/* Pet System Styles */
.pets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pets-header h2 {
    margin: 0;
}

.active-pet-section {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 20px;
}

.active-pet-section h3 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.active-pet-slot {
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.active-pet-slot.has-pet {
    border-style: solid;
    border-color: var(--accent-secondary);
}

.active-pet-slot .pet-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.active-pet-slot .pet-name {
    font-weight: 600;
    font-size: 16px;
}

.active-pet-slot .pet-level {
    font-size: 12px;
    color: var(--text-muted);
}

.active-pet-slot .pet-bonuses {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.active-pet-slot .pet-bonus {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--bg-panel);
    border-radius: 4px;
    color: var(--accent-success);
}

.no-pet {
    color: var(--text-muted);
    font-size: 13px;
}

.pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.pet-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.pet-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.pet-card.active {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.pet-card .pet-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.pet-card .pet-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.pet-card .pet-level {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.pet-card .pet-xp-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.pet-card .pet-xp-fill {
    height: 100%;
    background: var(--accent-secondary);
    transition: width 0.3s;
}

.pet-active-badge {
    display: block;
    margin-top: 8px;
    font-size: 10px;
    font-weight: 600;
    color: var(--accent-secondary);
    text-transform: uppercase;
}

/* Pet Rarity Colors */
.pet-card.rarity-common { border-color: var(--text-muted); }
.pet-card.rarity-uncommon { border-color: var(--accent-success); }
.pet-card.rarity-rare { border-color: var(--accent-primary); }
.pet-card.rarity-epic { border-color: var(--accent-secondary); }
.pet-card.rarity-legendary {
    border-color: var(--accent-warning);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

/* Pet Shop Modal */
.pet-shop-modal {
    max-width: 700px;
}

.pet-shop-panel h2 {
    margin-bottom: 8px;
}

.shop-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
}

.pet-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    max-height: 60vh;
    overflow-y: auto;
}

.shop-pet-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
}

.shop-pet-card:hover {
    border-color: var(--accent-primary);
}

.shop-pet-card .pet-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.shop-pet-card .pet-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.shop-pet-card .pet-rarity {
    font-size: 11px;
    margin-bottom: 8px;
}

.shop-pet-card .pet-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.shop-pet-card .pet-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin-bottom: 12px;
}

.shop-pet-card .pet-stat {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--bg-panel);
    border-radius: 4px;
    color: var(--accent-success);
}

.shop-pet-card .pet-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-warning);
    margin-bottom: 8px;
}

.shop-pet-card .pet-source {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.shop-pet-card.owned {
    opacity: 0.6;
}

.shop-pet-card.owned::after {
    content: 'OWNED';
    display: block;
    font-size: 10px;
    color: var(--accent-success);
    margin-top: 8px;
    font-weight: 600;
}

/* Pet Detail Modal */
.pet-detail-modal {
    max-width: 450px;
}

.pet-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.pet-detail-icon {
    font-size: 64px;
    width: 100px;
    height: 100px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pet-detail-info h2 {
    font-size: 20px;
    margin-bottom: 4px;
}

.pet-detail-info .pet-level {
    font-size: 14px;
    color: var(--text-secondary);
}

.pet-detail-info .pet-rarity {
    font-size: 12px;
}

.pet-detail-desc {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.pet-detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.pet-detail-stats .stat-bonus {
    background: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--accent-success);
}

.pet-xp-section {
    margin-bottom: 16px;
}

.pet-xp-section label {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.pet-xp-bar-large {
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 4px;
}

.pet-xp-bar-large .pet-xp-fill {
    height: 100%;
    background: var(--accent-secondary);
}

.pet-xp-text {
    font-size: 11px;
    color: var(--text-muted);
}

.pet-detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.pet-detail-actions .btn {
    flex: 1;
}

/* Crafting System Styles */
.crafting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.crafting-header h2 {
    margin: 0;
}

.crafting-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.crafting-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

@media (max-width: 900px) {
    .crafting-content {
        grid-template-columns: 1fr;
    }
}

.crafting-station {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
}

.crafting-station h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.crafting-station .hint {
    color: var(--text-muted);
    font-size: 13px;
}

.crafting-station.active {
    border-color: var(--accent-primary);
}

.recipe-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.recipe-preview .recipe-icon {
    font-size: 48px;
    width: 80px;
    height: 80px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-preview .recipe-name {
    font-weight: 600;
    font-size: 18px;
}

.recipe-preview .recipe-skill {
    font-size: 12px;
    color: var(--text-muted);
}

.recipe-ingredients {
    width: 100%;
    margin-top: 12px;
}

.recipe-ingredients h4 {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.ingredient-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ingredient-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 13px;
}

.ingredient-item .ingredient-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ingredient-item .ingredient-qty {
    font-weight: 600;
}

.ingredient-item .ingredient-qty.has-enough {
    color: var(--accent-success);
}

.ingredient-item .ingredient-qty.not-enough {
    color: var(--accent-danger);
}

.recipe-rewards {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.recipe-rewards span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.recipes-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 500px;
    overflow-y: auto;
}

.recipe-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.recipe-card:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
}

.recipe-card.selected {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.recipe-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.recipe-card .recipe-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-card .recipe-info {
    flex: 1;
}

.recipe-card .recipe-name {
    font-weight: 600;
    font-size: 13px;
}

.recipe-card .recipe-skill {
    font-size: 11px;
    color: var(--text-muted);
}

.recipe-card .recipe-level {
    font-size: 10px;
    color: var(--text-secondary);
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

/* Crafting Progress */
.crafting-progress {
    background: var(--bg-panel);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.crafting-item-preview {
    font-size: 32px;
    margin-bottom: 12px;
}

.crafting-progress .progress-bar {
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.crafting-progress .progress-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.1s;
}

.crafting-time {
    font-size: 14px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 12px;
}

/* Crafting Skill Requirements */
.skill-req {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    margin-bottom: 16px;
}

.skill-req.met {
    color: var(--accent-success);
}

.skill-req.not-met {
    color: var(--accent-danger);
}

/* Quests & Achievements Styles */
.quests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.quests-header h2 {
    margin: 0;
}

.quests-tabs {
    display: flex;
    gap: 8px;
}

.quest-tab {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.quest-tab:hover, .quest-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.quest-section {
    margin-bottom: 20px;
}

.quest-reset-timer {
    background: var(--bg-tertiary);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: inline-block;
}

.quest-reset-timer span:last-child {
    color: var(--accent-warning);
    font-weight: 600;
    font-family: monospace;
}

.quests-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quest-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.quest-card:hover {
    border-color: var(--accent-primary);
}

.quest-card.completed {
    border-color: var(--accent-success);
    background: rgba(16, 185, 129, 0.1);
}

.quest-card.claimed {
    opacity: 0.6;
}

.quest-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quest-info {
    flex: 1;
}

.quest-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.quest-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.quest-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quest-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    max-width: 200px;
}

.quest-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.3s;
}

.quest-card.completed .quest-progress-fill {
    background: var(--accent-success);
}

.quest-progress-text {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 60px;
}

.quest-rewards {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.quest-reward {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.quest-reward.gold {
    color: var(--accent-warning);
}

.quest-reward.xp {
    color: var(--accent-primary);
}

.quest-claim-btn {
    padding: 6px 12px;
    font-size: 12px;
    margin-top: 4px;
}

/* Achievements */
.achievements-summary {
    background: var(--bg-tertiary);
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

.achievements-summary span {
    color: var(--accent-warning);
    font-weight: 600;
}

.achievements-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.achievement-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.achievement-card:hover {
    border-color: var(--accent-primary);
}

.achievement-card.unlocked {
    border-color: var(--accent-success);
}

.achievement-card.locked {
    opacity: 0.5;
}

.achievement-icon {
    font-size: 28px;
    width: 50px;
    height: 50px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid;
}

.achievement-card.tier-bronze .achievement-icon {
    border-color: #cd7f32;
}

.achievement-card.tier-silver .achievement-icon {
    border-color: #c0c0c0;
}

.achievement-card.tier-gold .achievement-icon {
    border-color: #ffd700;
}

.achievement-card.tier-legendary .achievement-icon {
    border-color: #ff6b00;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}

.achievement-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.achievement-progress {
    font-size: 10px;
    color: var(--text-muted);
}

.achievement-card.unlocked .achievement-progress {
    color: var(--accent-success);
}

.achievement-tier {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.achievement-tier.bronze {
    background: rgba(205, 127, 50, 0.2);
    color: #cd7f32;
}

.achievement-tier.silver {
    background: rgba(192, 192, 192, 0.2);
    color: #c0c0c0;
}

.achievement-tier.gold {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.achievement-tier.legendary {
    background: rgba(255, 107, 0, 0.2);
    color: #ff6b00;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 16px;
    min-width: 280px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.toast.success {
    border-color: var(--accent-success);
}

.toast.warning {
    border-color: var(--accent-warning);
}

.toast.error {
    border-color: var(--accent-danger);
}

.toast.achievement {
    border-color: var(--accent-warning);
    background: linear-gradient(135deg, var(--bg-panel) 0%, rgba(255, 215, 0, 0.1) 100%);
}

.toast-icon {
    font-size: 24px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}

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

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
}

.toast-close:hover {
    color: var(--text-primary);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.removing {
    animation: slideOutRight 0.3s ease forwards;
}

/* ==========================================
   LEADERBOARD STYLES
   ========================================== */

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.leaderboard-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.leaderboard-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lb-tab {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.lb-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.lb-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.leaderboard-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.your-rank-card {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-panel) 100%);
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--glow-primary);
}

.rank-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rank-position {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-primary);
}

.rank-score {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lb-entry {
    display: grid;
    grid-template-columns: 50px 1fr 120px;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.lb-entry:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.lb-entry.top-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, var(--bg-tertiary) 100%);
    border-color: #ffd700;
}

.lb-entry.top-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15) 0%, var(--bg-tertiary) 100%);
    border-color: #c0c0c0;
}

.lb-entry.top-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15) 0%, var(--bg-tertiary) 100%);
    border-color: #cd7f32;
}

.lb-entry.is-you {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, var(--bg-tertiary) 100%);
    border-color: var(--accent-primary);
    box-shadow: var(--glow-primary);
}

.lb-rank {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
}

.lb-entry.top-1 .lb-rank { color: #ffd700; }
.lb-entry.top-2 .lb-rank { color: #c0c0c0; }
.lb-entry.top-3 .lb-rank { color: #cd7f32; }

.lb-player {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lb-avatar {
    width: 36px;
    height: 36px;
    background: var(--bg-panel);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.lb-player-info {
    display: flex;
    flex-direction: column;
}

.lb-player-name {
    font-weight: 500;
    color: var(--text-primary);
}

.lb-player-level {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.lb-score {
    text-align: right;
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 1.1rem;
}

.lb-score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

.leaderboard-info {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.lb-note {
    margin-top: 8px;
    color: var(--accent-primary);
}

/* Medal icons for top 3 */
.lb-medal {
    font-size: 1.4rem;
}

.lb-entry.top-1 .lb-rank::before { content: "🥇 "; }
.lb-entry.top-2 .lb-rank::before { content: "🥈 "; }
.lb-entry.top-3 .lb-rank::before { content: "🥉 "; }
