* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #2F2F2F 0%, #3A3A3A 100%);
    min-height: 100vh;
    color: #E0E0E0;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Mars Header */
.mars-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.header-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.mars-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #66C2D7, #B8A082, #66C2D7);
    background-size: 200% 200%;
    animation: shimmer 3s ease-in-out infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.mars-subtitle {
    font-size: 1.2rem;
    color: rgba(224, 224, 224, 0.9);
    font-weight: 500;
    line-height: 1.5;
}

.header-actions {
    position: absolute;
    top: 20px;
    right: 20px;
}

/* Auth Section */
.auth-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px 0;
}

.auth-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.auth-form {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
}

.auth-form.active {
    display: block;
}

.form-container {
    text-align: center;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: rgba(224, 224, 224, 0.95);
    margin-bottom: 10px;
}

.form-subtitle {
    font-size: 1rem;
    color: rgba(224, 224, 224, 0.8);
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: rgba(224, 224, 224, 0.9);
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #E0E0E0;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #66C2D7;
    box-shadow: 0 0 0 3px rgba(102, 194, 215, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.input-group input::placeholder {
    color: rgba(224, 224, 224, 0.5);
}

.input-help {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: rgba(224, 224, 224, 0.6);
}

.btn-mars-primary {
    background: linear-gradient(135deg, #66C2D7 0%, #4A9FBF 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 194, 215, 0.3);
    width: 100%;
    margin: 20px 0;
}

.btn-mars-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 194, 215, 0.4);
}

.btn-mars-secondary {
    background: rgba(184, 160, 130, 0.1);
    backdrop-filter: blur(10px);
    color: rgba(224, 224, 224, 0.9);
    border: 1px solid rgba(184, 160, 130, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-mars-secondary:hover {
    background: rgba(184, 160, 130, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.form-switch {
    margin-top: 20px;
}

.form-switch p {
    color: rgba(224, 224, 224, 0.8);
}

.form-switch a {
    color: #66C2D7;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-switch a:hover {
    color: #4A9FBF;
}

/* Dashboard Section */
.dashboard-section {
    min-height: 100vh;
    padding: 20px 0;
}

.dashboard-header {
    margin-bottom: 20px;
}

.dashboard-header .header-content {
    padding: 15px 30px;
}

.dashboard-content {
    display: grid;
    gap: 30px;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 30px;
}

.welcome-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.welcome-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: rgba(224, 224, 224, 0.95);
    margin-bottom: 10px;
}

.welcome-card p {
    font-size: 1.1rem;
    color: rgba(224, 224, 224, 0.8);
    margin-bottom: 30px;
    line-height: 1.6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #66C2D7;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(224, 224, 224, 0.8);
    font-weight: 500;
}

/* Section Headers */
.section-header {
    margin-bottom: 20px;
    text-align: center;
}

.section-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: rgba(224, 224, 224, 0.95);
    margin-bottom: 8px;
}

.section-header p {
    font-size: 1rem;
    color: rgba(224, 224, 224, 0.8);
}

/* Roster Section */
.roster-section, .kols-section {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.kols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.soldier-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.soldier-card:hover {
    transform: translateY(-3px);
    border-color: rgba(102, 194, 215, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.soldier-rank {
    font-size: 0.8rem;
    color: #66C2D7;
    font-weight: 600;
    margin-bottom: 5px;
}

.soldier-handle {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(224, 224, 224, 0.95);
    margin-bottom: 3px;
}

.soldier-joined {
    font-size: 0.8rem;
    color: rgba(224, 224, 224, 0.6);
}

/* KOL Cards */
.kol-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.kol-card:hover {
    transform: translateY(-3px);
    border-color: rgba(102, 194, 215, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.kol-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.kol-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(102, 194, 215, 0.2);
    border: 2px solid rgba(102, 194, 215, 0.3);
    object-fit: cover;
    flex-shrink: 0;
}

.kol-avatar.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #66C2D7;
}

.kol-info {
    flex: 1;
    min-width: 0;
}

.kol-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(224, 224, 224, 0.95);
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kol-handle {
    font-size: 0.9rem;
    color: #66C2D7;
    font-weight: 500;
}

.verified-badge {
    color: #4CAF50;
    font-size: 0.9rem;
}

.kol-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: rgba(224, 224, 224, 0.7);
}

.kol-followers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.kol-bio {
    font-size: 0.85rem;
    color: rgba(224, 224, 224, 0.8);
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kol-description {
    font-size: 0.8rem;
    color: rgba(224, 224, 224, 0.6);
    font-style: italic;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Actions Section */
.actions-section {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.action-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.action-card:hover {
    transform: translateY(-5px);
    border-color: rgba(102, 194, 215, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.action-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.action-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(224, 224, 224, 0.95);
    margin-bottom: 8px;
}

.action-card p {
    font-size: 0.9rem;
    color: rgba(224, 224, 224, 0.7);
    line-height: 1.4;
}

/* Loading and States */
.loading {
    text-align: center;
    padding: 40px;
    color: rgba(224, 224, 224, 0.7);
    font-style: italic;
    font-size: 1.1rem;
}

.error {
    color: #e57373;
    text-align: center;
    padding: 20px;
    background: rgba(211, 47, 47, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(211, 47, 47, 0.3);
    margin: 20px 0;
}

.success {
    color: #81c784;
    text-align: center;
    padding: 20px;
    background: rgba(76, 175, 80, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(76, 175, 80, 0.3);
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .mars-title {
        font-size: 2.2rem;
    }

    .mars-subtitle {
        font-size: 1rem;
    }

    .auth-form {
        padding: 30px 20px;
    }

    .form-title {
        font-size: 1.6rem;
    }

    .header-actions {
        position: static;
        margin-top: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .roster-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .kols-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .actions-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nav-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .nav-item {
        padding: 15px 10px;
    }
    
    .nav-icon {
        font-size: 1.5rem;
        margin-bottom: 6px;
    }
    
    .nav-label {
        font-size: 0.85rem;
    }
    
    .nav-desc {
        font-size: 0.7rem;
    }
    
    .user-rank {
        font-size: 0.8rem;
        padding: 6px 12px;
        margin-right: 10px;
    }

    .soldier-card,
    .action-card,
    .kol-card {
        padding: 20px 15px;
    }

    .welcome-card {
        padding: 25px 20px;
    }

    .roster-section,
    .actions-section,
    .kols-section {
        padding: 25px 20px;
    }
}

/* Command Navigation */
.command-navigation {
    margin: 30px 0;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.nav-item {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    padding: 20px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    border-color: #66C2D7;
}

.nav-item.active {
    background: rgba(102, 194, 215, 0.2);
    border-color: #66C2D7;
    box-shadow: 0 4px 15px rgba(102, 194, 215, 0.3);
}

.nav-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.nav-label {
    font-weight: 600;
    font-size: 1rem;
    color: #66C2D7;
    margin-bottom: 5px;
}

.nav-desc {
    font-size: 0.75rem;
    color: #AAAAAA;
    opacity: 0.8;
}

.nav-item.active .nav-label {
    color: #FFFFFF;
}

.nav-item.active .nav-desc {
    color: #CCCCCC;
}

/* User Rank Display */
.user-rank {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(102, 194, 215, 0.2);
    border: 1px solid #66C2D7;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 15px;
    color: #66C2D7;
}

/* Admin-only elements visibility */
.admin-only {
    display: none !important;
}

.admin-only.show {
    display: block !important;
}
