/* --- 1. Surface System (Cards) --- */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-notification {
    background-color: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--primary-color);
}
.card-compact { padding: 16px; }
.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 16px;
    font-weight: var(--fw-bold);
    font-size: 1.1rem;
}

.hero-stats-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
}

.hero-left-panel, .hero-middle-panel, .hero-right-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.hero-middle-panel {
    flex: 2;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-header h5 { margin: 0; font-weight: 500; }
.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 24px;
    border: 1px solid var(--border-color);
    width: 80%;
    max-width: 500px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
}
.modal-body { padding: 16px; }

/* Toasts */
.toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}
.toast {
    background-color: var(--card-bg);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-lg);
    border: none;
    overflow: hidden;
    position: relative;
    max-width: 350px;
    width: fit-content;
    min-width: 280px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background-color: var(--primary-color);
    z-index: 1;
}

/* Category-specific indicators */
.toast.alert-success::before { background-color: var(--success-color); }
.toast.alert-danger::before { background-color: var(--danger-color); }
.toast.alert-warning::before { background-color: var(--warning-color); }
.toast.alert-info::before { background-color: var(--primary-color); }

.toast-header {
    background: transparent;
    border-bottom: none;
    padding: 0 16px 4px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.toast-header .close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--text-secondary);
    opacity: 0.5;
    transition: opacity 0.2s;
}
.toast-header .close:hover { opacity: 1; }

.toast-body {
    padding: 8px 20px;
    text-align: center;
    font-weight: var(--fw-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Unified Share Card */
.share-card-container {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: 20px;
    padding: 30px;
    color: white;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.share-card-header {
    font-size: 0.75rem;
    text-transform: none;
    letter-spacing: 0.1em;
    opacity: 0.8;
    margin-bottom: 20px;
}

.share-card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50% !important;
    border: 3px solid rgba(255, 255, 255, 0.3);
    margin: 0 auto 15px;
    display: block;
    object-fit: cover;
}

.share-card-title {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 1.0);
    color: white;
}

.share-card-stat {
    font-size: 1.25rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 8px 20px;
    border-radius: 50px;
    margin-top: 10px;
    color: white;
}

.share-card-visual {
    width: 100%;
    max-width: 300px;
    height: 100px;
    margin: 20px auto;
    overflow: hidden;
}

.share-card-visual canvas {
    width: 100% !important;
    height: 100% !important;
}

.share-card-footer {
    margin-top: 30px;
    font-size: 0.85rem;
    opacity: 0.7;
    color: white;
}

/* --- 2. Tournament Cards & Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: var(--text-on-accent);
}

.badge-volt {
    background-color: var(--color-volt);
    color: var(--text-on-accent);
}

.badge-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: var(--fw-bold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(var(--bg-secondary-rgb, 255, 255, 255), 0.5);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-Active {
    background-color: var(--success-color);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}
.status-Completed {
    background-color: var(--text-secondary);
}
.status-PUBLISHED {
    background-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(132, 204, 22, 0.4);
}

/* Kebab Menu Overrides */
.kebab-menu .dropbtn {
    transition: all 0.2s ease;
}
.kebab-menu .dropbtn:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    transform: scale(1.1);
}

.tournament-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.tournament-card.clickable-row {
    cursor: pointer;
}

.tournament-card .card-badges {
    white-space: nowrap;
}

/* Sidebar Specifics */
.sidebar-header {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.25rem;
    font-weight: var(--fw-bold);
    color: var(--text-primary);
}

.tournament-invite-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    border-left: 5px solid var(--accent-color) !important;
}

.invite-content { flex: 2; }
.invite-label {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--accent-color);
}
.invite-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 4px;
}
.invite-actions {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
}

.quest-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vanity-stats-loading {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
