:root {
    --primary-orange: #ff6b35;
    --primary-gold: #f7b32a;
    --primary-blue: #2e5a88;
    --deep-blue: #1a3a5c;
    --dark-bg: #0a0a0f;
    --darker-bg: #050508;
    --card-bg: rgba(15, 15, 25, 0.85);
    --glass-bg: rgba(255, 107, 53, 0.08);
    --glass-border: rgba(255, 107, 53, 0.25);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-muted: rgba(255, 255, 255, 0.55);
    --text-accent: rgba(255, 200, 100, 0.9);
    --gradient-fire: linear-gradient(135deg, #ff6b35 0%, #f7b32a 50%, #ff8c42 100%);
    --gradient-premium: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --shadow-glow: 0 0 40px rgba(255, 107, 53, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-standard: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-elevated: 0 16px 48px rgba(0, 0, 0, 0.5);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    line-height: 1.2;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--darker-bg);
    overflow: hidden;
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(46, 90, 136, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(245, 166, 35, 0.05) 0%, transparent 60%);
    animation: bgPulse 15s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.1) rotate(5deg); opacity: 0.8; }
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-orange);
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle 8s infinite;
}

@keyframes floatParticle {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(-100vh) scale(1); }
}

/* Header */
header {
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.98) 0%, rgba(10, 10, 15, 0.9) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: var(--shadow-glow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 60px rgba(255, 107, 53, 0.5);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Navigation */
nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-fire);
    opacity: 0.2;
    transition: left 0.3s ease;
}

.nav-btn:hover::before,
.nav-btn.active::before {
    left: 0;
}

.nav-btn:hover,
.nav-btn.active {
    border-color: var(--primary-orange);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

.nav-btn.active {
    background: rgba(255, 107, 53, 0.15);
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 600;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: var(--gradient-fire);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
}

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

.stat-card {
    background: var(--card-bg);
    background-image: linear-gradient(135deg, rgba(255, 107, 53, 0.03) 0%, transparent 100%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-fire);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-orange);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.5rem;
}

/* Cards Container */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    background-image: linear-gradient(135deg, rgba(255, 107, 53, 0.03) 0%, transparent 100%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-fire);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-orange);
}

.glass-card:hover::before {
    opacity: 1;
}

/* Member Card */
.member-card {
    text-align: center;
}

.member-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-fire);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-bg);
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.4);
    position: relative;
}

.member-avatar.has-image {
    background: none;
    overflow: hidden;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-status {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid var(--dark-bg);
}

.member-status.active {
    background: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.member-status.inactive {
    background: #ef4444;
}

.member-name {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.member-handle {
    color: var(--primary-orange);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.member-role {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.member-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.member-stat {
    text-align: center;
}

.member-stat-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

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

.member-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-fire);
    color: var(--dark-bg);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.5);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--primary-orange);
    color: var(--text-primary);
    background: rgba(255, 107, 53, 0.1);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    flex: 1;
    max-width: 400px;
    min-width: 200px;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* Battle Card */
.battle-card {
    position: relative;
}

.battle-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.battle-date {
    background: var(--gradient-fire);
    color: var(--dark-bg);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
}

.battle-status {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.battle-status.scheduled {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.battle-status.live {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulse 2s infinite;
}

.battle-status.completed {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

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

.battle-title {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.battle-time {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.battle-participants {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.battle-participant {
    text-align: center;
}

.participant-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-fire);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--dark-bg);
}

.participant-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.battle-vs {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.battle-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-select {
    cursor: pointer;
}

.form-select option {
    background: var(--dark-bg);
    color: var(--text-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

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

/* Calendar View */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calendar-month {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    min-width: 180px;
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
}

.calendar-day-header {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    background: rgba(255, 107, 53, 0.1);
}

.calendar-day {
    padding: 0.75rem;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.calendar-day:hover {
    background: rgba(255, 107, 53, 0.05);
    border-color: var(--glass-border);
}

.calendar-day.today {
    background: rgba(255, 107, 53, 0.1);
    border-color: var(--primary-orange);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day-number {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.calendar-event {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    background: var(--gradient-fire);
    color: var(--dark-bg);
    border-radius: 4px;
    margin-top: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Upcoming Battles */
.upcoming-battles {
    margin-top: 2rem;
}

.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.upcoming-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.upcoming-item:hover {
    border-color: var(--primary-orange);
    transform: translateX(5px);
}

.upcoming-date {
    text-align: center;
    min-width: 60px;
}

.upcoming-date-day {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upcoming-date-month {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.upcoming-info {
    flex: 1;
}

.upcoming-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.upcoming-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-title {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.empty-text {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    padding: 1rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toastIn 0.3s ease;
    box-shadow: var(--shadow-card);
    position: relative;
}

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

.toast.success {
    border-color: rgba(74, 222, 128, 0.5);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.5);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast.success .toast-icon {
    color: #4ade80;
}

.toast.error .toast-icon {
    color: #ef4444;
}

/* Responsive Styles */
@media (max-width: 900px) {
    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

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

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .logo-section {
        flex-direction: column;
    }

    .brand-name {
        font-size: 1.2rem;
    }

    nav {
        width: 100%;
        justify-content: center;
    }

    .nav-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

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

    .stat-value {
        font-size: 2rem;
    }

    .action-bar {
        flex-direction: column;
    }

    .search-box {
        max-width: 100%;
    }

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

    .battle-participants {
        flex-direction: column;
    }

    .battle-vs {
        transform: rotate(90deg);
    }

    .calendar-day {
        min-height: 60px;
        padding: 0.5rem;
    }

    .calendar-day-number {
        font-size: 0.75rem;
    }

    .calendar-event {
        font-size: 0.55rem;
        padding: 0.15rem 0.3rem;
    }

    .nav-buttons {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

@media (max-width: 500px) {
    html {
        font-size: 14px;
    }

    main {
        padding: 1rem 0.5rem;
    }

    .logo {
        width: 50px;
        height: 50px;
    }

    .brand-name {
        font-size: 1rem;
    }

    .nav-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.7rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        font-size: 1.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }

    .member-avatar {
        width: 80px;
        height: 80px;
        font-size: 1.5rem;
    }

    .calendar-day-header {
        padding: 0.5rem 0.25rem;
        font-size: 0.6rem;
    }

    .calendar-day {
        min-height: 50px;
        padding: 0.25rem;
    }

    .calendar-event {
        display: none;
    }

    .calendar-day.has-event::after {
        content: '';
        display: block;
        width: 6px;
        height: 6px;
        background: var(--primary-orange);
        border-radius: 50%;
        margin: 0.25rem auto 0;
    }

    .btn, .nav-btn, .filter-tag, .view-btn {
        min-height: 44px;
    }
}

@media (max-width: 375px) {
    .nav-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.65rem;
        letter-spacing: 0;
    }

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-orange);
}

/* Auth Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(10px);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: var(--shadow-glow);
}

.auth-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.auth-toggle {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-toggle a {
    color: var(--primary-orange);
    text-decoration: none;
    cursor: pointer;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

.auth-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    display: none;
}

.auth-error.show {
    display: block;
}

/* User Menu */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-fire);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--dark-bg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--primary-orange);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 180px;
    display: none;
    z-index: 1001;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.user-dropdown-item:hover {
    background: rgba(255, 107, 53, 0.1);
    color: var(--text-primary);
}

.user-dropdown-item.danger {
    color: #ef4444;
}

.user-dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Admin Panel Styles */
.admin-table-container {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.admin-table th {
    background: rgba(255, 107, 53, 0.1);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.active {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.status-badge.inactive {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.status-badge.suspended {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.role-badge.admin {
    background: rgba(245, 166, 35, 0.15);
    color: var(--primary-gold);
    border: 1px solid rgba(245, 166, 35, 0.3);
}

.role-badge.user {
    background: rgba(46, 90, 136, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(46, 90, 136, 0.3);
}

@media (max-width: 768px) {
    .admin-table-container {
        overflow-x: auto;
    }

    .admin-table {
        min-width: 600px;
    }

    .user-info {
        display: none;
    }
}

/* Chat Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 300px);
    min-height: 400px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    transition: background 0.3s ease;
}

.chat-message:hover {
    background: rgba(255, 255, 255, 0.05);
}

.chat-message.deleted {
    opacity: 0.5;
    background: rgba(239, 68, 68, 0.1);
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-fire);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--dark-bg);
    flex-shrink: 0;
}

.chat-avatar.admin {
    background: linear-gradient(135deg, #f5a623 0%, #ff6b35 100%);
    box-shadow: 0 0 10px rgba(245, 166, 35, 0.4);
}

.chat-content {
    flex: 1;
    min-width: 0;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.chat-username {
    font-weight: 600;
    font-size: 0.9rem;
}

.chat-username.admin {
    color: var(--primary-gold);
}

.chat-badge {
    font-size: 0.75rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: rgba(245, 166, 35, 0.2);
    color: var(--primary-gold);
    text-transform: uppercase;
}

.chat-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.chat-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    word-wrap: break-word;
}

.chat-actions {
    display: none;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.chat-message:hover .chat-actions {
    display: flex;
}

.chat-translate-btn {
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.chat-message:hover .chat-translate-btn {
    opacity: 0.7;
}

.chat-translate-btn:hover {
    opacity: 1 !important;
}

.chat-translated {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.25rem 0;
    font-style: italic;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    margin-top: 0.25rem;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 0.75rem;
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    border-color: var(--primary-orange);
}

.chat-send-btn {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-fire);
    border: none;
    border-radius: 24px;
    color: var(--dark-bg);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
}

/* Ticket Styles */
.ticket-card {
    background: var(--card-bg);
    background-image: linear-gradient(135deg, rgba(255, 107, 53, 0.03) 0%, transparent 100%);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.ticket-card:hover {
    border-color: var(--primary-orange);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.ticket-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.ticket-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ticket-badges {
    display: flex;
    gap: 0.5rem;
}

.priority-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

.priority-badge.low { background: rgba(156, 163, 175, 0.2); color: #9ca3af; }
.priority-badge.normal { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.priority-badge.high { background: rgba(245, 166, 35, 0.2); color: #f5a623; }
.priority-badge.urgent { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.ticket-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-replies {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Ticket Detail */
.ticket-detail {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
}

.ticket-detail-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.ticket-detail-body {
    padding: 1.5rem;
}

.ticket-replies-list {
    margin-top: 1.5rem;
}

.ticket-reply {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.ticket-reply.admin {
    background: rgba(245, 166, 35, 0.1);
    border-left: 3px solid var(--primary-gold);
}

.ticket-reply.internal {
    background: rgba(139, 92, 246, 0.1);
    border-left: 3px solid #8b5cf6;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.reply-author {
    font-weight: 600;
    font-size: 0.85rem;
}

.reply-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.reply-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.ticket-reply-form {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

/* Admin Ticket Stats */
.ticket-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ticket-stat {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.ticket-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ticket-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Floating Chat Bubble */
.edu-section {
    margin-bottom: 2rem;
}

.edu-section h3 {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.edu-section ul, .edu-section ol {
    margin-bottom: 0.5rem;
}

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

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

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    .edu-section div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

.chat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-fire);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(255, 107, 53, 0.6);
}

.chat-bubble.has-unread::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--dark-bg);
}

/* Chat Popup */
.chat-popup {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 500px;
    max-height: calc(100vh - 150px);
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
}

.chat-popup.active {
    display: flex;
    animation: chatPopIn 0.3s ease;
}

.chat-popup.fullscreen {
    bottom: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    z-index: 2000;
}

@keyframes chatPopIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-popup-header {
    padding: 1rem;
    background: rgba(255, 107, 53, 0.1);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-popup-title {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.chat-popup-actions {
    display: flex;
    gap: 0.5rem;
}

.chat-popup-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.chat-popup-btn:hover {
    color: var(--primary-orange);
}

.chat-popup-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-popup-input {
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 0.5rem;
}

.chat-popup-input input {
    flex: 1;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    outline: none;
}

.chat-popup-input input:focus {
    border-color: var(--primary-orange);
}

.chat-popup-input button {
    padding: 0.6rem 1rem;
    background: var(--gradient-fire);
    border: none;
    border-radius: 20px;
    color: var(--dark-bg);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}

@media (max-width: 500px) {
    .chat-popup {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 70vh;
        border-radius: 16px 16px 0 0;
    }

    .chat-bubble {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
    }
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active,
.view-btn:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
    background: rgba(255, 107, 53, 0.1);
}

/* Filter Tags */
.filter-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag.active,
.filter-tag:hover {
    border-color: var(--primary-orange);
    background: rgba(255, 107, 53, 0.15);
    color: var(--primary-orange);
}

/* ============================================
   Focus States
   ============================================ */
.btn:focus-visible,
.nav-btn:focus-visible,
.filter-tag:focus-visible,
.view-btn:focus-visible,
.chat-send-btn:focus-visible,
.chat-popup-btn:focus-visible,
.modal-close:focus-visible {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible,
.search-box:focus-visible,
.search-box input:focus-visible,
.chat-input:focus-visible,
.chat-popup-input input:focus-visible,
.global-search-input:focus-visible,
.comment-input:focus-visible {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

/* ============================================
   Skeleton Shimmer Animation
   ============================================ */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
}

/* ============================================
   Staggered Card Entrance Animation
   ============================================ */
@keyframes cardEnter {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-animate {
    animation: cardEnter 0.4s ease forwards;
    opacity: 0;
}

.card-animate:nth-child(1) { animation-delay: 0.05s; }
.card-animate:nth-child(2) { animation-delay: 0.1s; }
.card-animate:nth-child(3) { animation-delay: 0.15s; }
.card-animate:nth-child(4) { animation-delay: 0.2s; }
.card-animate:nth-child(5) { animation-delay: 0.25s; }
.card-animate:nth-child(6) { animation-delay: 0.3s; }
.card-animate:nth-child(7) { animation-delay: 0.35s; }
.card-animate:nth-child(8) { animation-delay: 0.4s; }
.card-animate:nth-child(9) { animation-delay: 0.45s; }
.card-animate:nth-child(10) { animation-delay: 0.5s; }
.card-animate:nth-child(11) { animation-delay: 0.55s; }
.card-animate:nth-child(12) { animation-delay: 0.6s; }

/* ============================================
   Modal Exit Animation
   ============================================ */
@keyframes modalOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.95); }
}

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

.modal-overlay.closing .modal {
    animation: modalOut 0.2s ease forwards;
}

.modal-overlay.closing {
    animation: fadeOut 0.2s ease forwards;
}

/* ============================================
   Toast Slide-out Animation
   ============================================ */
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

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

/* ============================================
   Button Ripple Effect
   ============================================ */
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

/* ============================================
   Enhanced Live Pulse with Glow
   ============================================ */
@keyframes liveGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 107, 53, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 107, 53, 0.8); }
}

.battle-status.live {
    animation: pulse 2s infinite, liveGlow 2s infinite;
}

/* ============================================
   Mobile Navigation
   ============================================ */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

.nav-drawer {
    position: fixed;
    left: 0;
    top: 60px;
    width: 280px;
    height: calc(100vh - 60px);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    z-index: 1500;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 1rem 0;
}

.nav-drawer.open {
    transform: translateX(0);
}

.nav-drawer .nav-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================
   Loading Spinner
   ============================================ */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-orange);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: inherit;
    z-index: 5;
}

.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* ============================================
   Global Search Bar
   ============================================ */
.global-search {
    position: relative;
}

.global-search-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    color: var(--text-primary);
    width: 200px;
    transition: width 0.3s;
}

.global-search-input:focus {
    width: 300px;
    border-color: var(--primary-orange);
}

.global-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results-dropdown.active {
    display: block;
}

.search-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   Activity Feed
   ============================================ */
.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: flex-start;
}

.activity-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-fire);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.activity-text strong {
    color: var(--text-primary);
}

.activity-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ============================================
   Reactions
   ============================================ */
.reactions-bar {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-orange);
}

.reaction-btn.active {
    background: rgba(255, 107, 53, 0.15);
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

.reaction-btn .count {
    font-size: 0.7rem;
}

.add-reaction-btn {
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.card:hover .add-reaction-btn {
    opacity: 0.5;
}

.add-reaction-btn:hover {
    opacity: 1 !important;
}

/* ============================================
   Comments Section
   ============================================ */
.comments-section {
    margin-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
}

.comment {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient-fire);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.comment-author {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-orange);
}

.comment-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.comment-time {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.comment-input-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.comment-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.4rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.8rem;
}

.comment-input:focus {
    border-color: var(--primary-orange);
    outline: none;
}

.comment-submit {
    background: var(--primary-orange);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 0.8rem;
}

/* ============================================
   Leaderboard
   ============================================ */
.leaderboard {
    list-style: none;
    padding: 0;
    margin: 0;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.leaderboard-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.leaderboard-rank.gold {
    background: linear-gradient(135deg, #f5a623, #d4941e);
    color: #000;
}

.leaderboard-rank.silver {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #000;
}

.leaderboard-rank.bronze {
    background: linear-gradient(135deg, #cd7f32, #a0622a);
    color: #000;
}

.leaderboard-rank.default {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.leaderboard-name {
    flex: 1;
    font-weight: 500;
}

.leaderboard-value {
    font-weight: 700;
    color: var(--primary-gold);
    font-family: 'Cinzel', serif;
}

.leaderboard-you {
    background: rgba(255, 107, 53, 0.1);
    border-radius: 8px;
}

/* ============================================
   Badges / Achievements
   ============================================ */
.badge-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.achievement-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    position: relative;
    cursor: pointer;
}

.achievement-badge.bronze {
    background: linear-gradient(135deg, #cd7f32, #a0622a);
    box-shadow: 0 0 8px rgba(205, 127, 50, 0.3);
}

.achievement-badge.silver {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    box-shadow: 0 0 8px rgba(192, 192, 192, 0.3);
}

.achievement-badge.gold {
    background: linear-gradient(135deg, #f5a623, #d4941e);
    box-shadow: 0 0 8px rgba(245, 166, 35, 0.3);
}

.badge-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.7rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 100;
}

.achievement-badge:hover .badge-tooltip {
    opacity: 1;
}

/* ============================================
   Leaderboard Avatar (Social expanded view)
   ============================================ */
.leaderboard-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-fire);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* ============================================
   Achievements Grid (Social tab)
   ============================================ */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.achievement-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
    align-items: center;
}

.achievement-card.earned {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.achievement-card.locked {
    opacity: 0.45;
    filter: grayscale(0.7);
}

.achievement-card.locked:hover {
    opacity: 0.65;
}

.achievement-card.earned.bronze {
    border-color: rgba(205, 127, 50, 0.3);
}

.achievement-card.earned.silver {
    border-color: rgba(192, 192, 192, 0.3);
}

.achievement-card.earned.gold {
    border-color: rgba(245, 166, 35, 0.3);
}

.achievement-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.achievement-card.earned.bronze .achievement-icon {
    background: linear-gradient(135deg, #cd7f32, #a0622a);
    box-shadow: 0 0 12px rgba(205, 127, 50, 0.3);
}

.achievement-card.earned.silver .achievement-icon {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    box-shadow: 0 0 12px rgba(192, 192, 192, 0.3);
}

.achievement-card.earned.gold .achievement-icon {
    background: linear-gradient(135deg, #f5a623, #d4941e);
    box-shadow: 0 0 12px rgba(245, 166, 35, 0.3);
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.achievement-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.achievement-tier {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.achievement-earned {
    font-size: 0.7rem;
    color: var(--primary-gold);
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Onboarding Checklist
   ============================================ */
.onboarding-checklist {
    padding: 1rem;
}

.onboarding-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.onboarding-step:hover {
    background: rgba(255, 255, 255, 0.05);
}

.onboarding-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.onboarding-step.completed .onboarding-check {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
}

.onboarding-step-text {
    font-size: 0.85rem;
}

.onboarding-step.completed .onboarding-step-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.onboarding-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 1rem;
}

.onboarding-progress-fill {
    height: 100%;
    background: var(--gradient-fire);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ============================================
   Toast Enhancements
   ============================================ */
.toast-undo {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.toast-undo:hover {
    background: rgba(255, 255, 255, 0.3);
}

.toast-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.5;
    font-size: 1rem;
    padding: 0.25rem;
}

.toast-close:hover {
    opacity: 1;
}

.toast-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.toast-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* ============================================
   Sort / Filter Controls
   ============================================ */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.sort-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.8rem;
}

.results-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination-btn {
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pagination-btn.active {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.load-more-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    margin-top: 1rem;
}

.load-more-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

/* ============================================
   Bulk Actions
   ============================================ */
.bulk-action-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.bulk-count {
    font-weight: 600;
    color: var(--primary-orange);
}

/* ============================================
   Member Profile Modal Additions
   ============================================ */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

.profile-stat {
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.profile-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-gold);
    font-family: 'Cinzel', serif;
}

.profile-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ============================================
   Confetti Celebration
   ============================================ */
@keyframes confetti-fall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 10000;
    animation: confetti-fall 3s ease-in forwards;
}

/* ============================================
   Inline Form Validation
   ============================================ */
.form-input.valid {
    border-color: #22c55e;
}

.form-input.invalid {
    border-color: #ef4444;
}

.field-error {
    font-size: 0.7rem;
    color: #ef4444;
    margin-top: 0.25rem;
    display: none;
}

.form-input.invalid + .field-error {
    display: block;
}

.field-success {
    color: #22c55e;
    font-size: 0.8rem;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
}

.char-counter {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 0.25rem;
}

.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 0.25rem;
    transition: all 0.3s;
}

.password-strength.weak {
    background: #ef4444;
    width: 33%;
}

.password-strength.medium {
    background: #f59e0b;
    width: 66%;
}

.password-strength.strong {
    background: #22c55e;
    width: 100%;
}

/* ============================================
   Mentions Autocomplete
   ============================================ */
.mentions-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.mentions-dropdown.active {
    display: block;
}

.mention-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mention-item:hover,
.mention-item.selected {
    background: rgba(255, 255, 255, 0.1);
}

/* Language Switcher */
.lang-switcher {
    position: relative;
    margin-left: 0.5rem;
}
.lang-switcher select {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255,152,0,0.3);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    appearance: auto;
}
.lang-switcher select:hover {
    border-color: var(--primary);
}
.lang-switcher select option {
    background: #1a1a2e;
    color: var(--text-primary);
}

/* Navigation badges */
.nav-btn { position: relative; }
.nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.nav-badge:empty, .nav-badge[data-count="0"] { display: none; }

/* Chat notification badge */
.chat-toggle .nav-badge {
    top: -4px;
    right: -4px;
}

/* Enhanced notification panel */
.notif-type-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.notif-type-icon.chat { background: rgba(59, 130, 246, 0.2); }
.notif-type-icon.battle { background: rgba(255, 107, 53, 0.2); }
.notif-type-icon.event { background: rgba(245, 166, 35, 0.2); }
.notif-type-icon.recruit { background: rgba(34, 197, 94, 0.2); }
.notif-type-icon.design { background: rgba(168, 85, 247, 0.2); }
.notif-type-icon.ticket { background: rgba(96, 165, 250, 0.2); }
.notif-type-icon.job { background: rgba(251, 191, 36, 0.2); }
.notif-type-icon.system { background: rgba(255, 255, 255, 0.1); }
.notif-type-icon.achievement { background: rgba(245, 166, 35, 0.3); }

.notif-item {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: background 0.2s;
}
.notif-item:hover { background: rgba(255,255,255,0.03); }
.notif-item.unread { background: rgba(255,107,53,0.05); }
.notif-item.unread .notif-title { font-weight: 600; }
.notif-title { font-size: 0.85rem; }
.notif-message { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.notif-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }

/* ===== Teams Section ===== */

.team-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
.team-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}
.team-card-name {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
}
.team-card-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.team-card-meta {
    display: flex;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    align-items: center;
}

.team-role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.team-role-badge.team-admin {
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-orange));
    color: #000;
}
.team-role-badge.member {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* Board messages */
.team-board-message {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.team-board-message:last-child {
    border-bottom: none;
}
.team-board-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-gold);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}
.team-board-content {
    flex: 1;
    min-width: 0;
}
.team-board-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}
.team-board-username {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}
.team-board-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.team-board-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
}

/* DM layout */
.team-dm-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1rem;
    min-height: 450px;
}
.team-dm-sidebar {
    padding: 1rem;
}
.team-dm-main {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}
.team-dm-main #teamDmMessages {
    flex: 1;
}

/* DM conversation list */
.dm-conversation-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.dm-conversation-item:hover,
.dm-conversation-item.active {
    background: rgba(255, 255, 255, 0.08);
}
.dm-conversation-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary-gold);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}
.dm-conversation-info {
    flex: 1;
    min-width: 0;
}
.dm-conversation-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dm-conversation-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.dm-unread-badge {
    background: var(--primary-orange);
    color: #fff;
    font-size: 0.65rem;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* DM message bubbles */
.dm-message {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.75rem;
}
.dm-message.sent {
    align-items: flex-end;
}
.dm-message.received {
    align-items: flex-start;
}
.dm-message-bubble {
    max-width: 70%;
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
}
.dm-message.sent .dm-message-bubble {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-gold));
    color: #000;
    border-bottom-right-radius: 4px;
}
.dm-message.received .dm-message-bubble {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}
.dm-message-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
    padding: 0 0.25rem;
}

/* Team member list items */
.team-member-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.team-member-item:last-child {
    border-bottom: none;
}
.team-member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary-gold);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}
.team-member-info {
    flex: 1;
    min-width: 0;
}
.team-member-name {
    font-weight: 600;
    color: var(--text-primary);
}
.team-member-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.team-member-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Responsive: stack DM layout on mobile */
@media (max-width: 768px) {
    .team-dm-layout {
        grid-template-columns: 1fr;
    }
    .team-dm-sidebar {
        max-height: 200px;
        overflow-y: auto;
    }
}
