/* ===== Reset & Basis ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0e27;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
}

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

/* ===== Landing Page ===== */
.landing-page {
    background: #0a0e27;
}

.hero {
    text-align: center;
    color: white;
    padding: 60px 20px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tagline {
    font-size: 1.3em;
    opacity: 0.9;
}

/* ===== Features Grid ===== */
.game-features {
    background: #1a1f3a;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.game-features h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #8b9dff;
    font-size: 2em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature-card {
    background: #252b4a;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #e0e0e0;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(139, 157, 255, 0.5);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: #8b9dff;
    margin-bottom: 10px;
}

/* ===== Auth Section ===== */
.auth-section {
    background: #1a1f3a;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.auth-container {
    max-width: 500px;
    margin: 0 auto;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: #252b4a;
    color: #b0b0b0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #5568d3;
    color: white;
}

.tab-content {
    display: none;
}

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

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #c0c0c0;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: #252b4a;
    color: #e0e0e0;
    border: 2px solid #3a4165;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #8b9dff;
}

/* ===== Buttons ===== */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.9em;
    width: 100%;
}

/* ===== Alerts ===== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ===== News Section ===== */
.news-section {
    background: #1a1f3a;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.news-section h2 {
    color: #8b9dff;
    margin-bottom: 25px;
}

.news-container {
    display: grid;
    gap: 20px;
}

.news-item {
    background: #252b4a;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #8b9dff;
    color: #e0e0e0;
}

.news-item h3 {
    color: #8b9dff;
    margin-bottom: 10px;
}

.news-item small {
    color: #9ca3af;
    font-style: italic;
}

/* ===== Class Selection ===== */
.class-selection-page {
    background: #0a0e27;
    min-height: 100vh;
}

.page-header {
    text-align: center;
    color: white;
    padding: 40px 20px;
}

.page-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.class-card {
    background: #1a1f3a;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 2px solid #2a3052;
}

.class-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(139, 157, 255, 0.3);
    border-color: #8b9dff;
}

.class-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.class-weapon {
    color: #8b9dff;
    font-weight: 600;
    margin-bottom: 10px;
}

.class-description {
    color: #b0b0b0;
    margin-bottom: 20px;
    min-height: 60px;
}

.class-stats {
    background: #252b4a;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.stat-bonuses {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.stat-bonus {
    background: #5568d3;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
}

.back-link {
    text-align: center;
    margin-top: 30px;
}

.back-link a {
    color: white;
    text-decoration: none;
    font-size: 1.1em;
}

.back-link a:hover {
    text-decoration: underline;
}

/* ===== Game Layout ===== */
.game-page {
    background: #0a0e27;
    margin: 0;
    padding: 0;
}

.game-layout {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 280px;
    background: #131729;
    color: white;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
}

.sidebar-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #252b4a;
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.character-class {
    color: #8b9dff;
    font-size: 0.9em;
}

.sidebar-nav {
    flex: 1;
}

.nav-section {
    margin-bottom: 25px;
}

.nav-section h3 {
    color: #7a8396;
    font-size: 0.85em;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.nav-section ul {
    list-style: none;
}

.nav-section ul li {
    margin-bottom: 5px;
}

.nav-section ul li a {
    display: block;
    color: #ecf0f1;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-section ul li a:hover {
    background: #1f2537;
    padding-left: 20px;
}

.nav-section ul li a.active {
    background: #5568d3;
    color: white;
}

.nav-section ul li a.disabled {
    color: #4a5568;
    cursor: not-allowed;
}

.skill-level {
    float: right;
    background: #252b4a;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
}

.stats-list {
    list-style: none;
}

.stats-list li {
    padding: 8px 15px;
    color: #ecf0f1;
    font-size: 0.95em;
}

.stats-list strong {
    color: #8b9dff;
}

.sidebar-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #252b4a;
}

/* ===== Main Content ===== */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 30px;
    min-height: 100vh;
}

.content-header {
    margin-bottom: 30px;
}

.content-header h1 {
    color: #e0e0e0;
    font-size: 2em;
}

/* ===== Dashboard Sections ===== */
.dashboard-section {
    background: #1a1f3a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.section-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2a3052;
}

.section-header h2 {
    color: #e0e0e0;
    font-size: 1.5em;
}

/* ===== Character Overview ===== */
.character-overview {
    display: flex;
    align-items: center;
}

.character-display {
    display: flex;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.character-icon {
    font-size: 5em;
}

.character-info {
    flex: 1;
}

.character-info h3 {
    color: #8b9dff;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.level-display {
    font-size: 1.3em;
    color: #e0e0e0;
    font-weight: 600;
    margin-bottom: 10px;
}

/* ===== EXP Bar ===== */
.exp-bar {
    background: #252b4a;
    border-radius: 20px;
    height: 30px;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.exp-bar-fill {
    background: linear-gradient(90deg, #5568d3, #8b9dff);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 20px;
}

.exp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #252b4a;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.stat-info h4 {
    color: #8b9dff;
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 1.5em;
    font-weight: 700;
    color: #e0e0e0;
}

/* ===== Active Activity ===== */
.active-activity {
    background: #1a3a2a;
    border-left: 4px solid #4caf50;
}

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

.timer-display {
    font-size: 2em;
    font-weight: 700;
    color: #8b9dff;
    margin: 20px 0;
}

.progress-bar {
    background: #252b4a;
    border-radius: 20px;
    height: 30px;
    position: relative;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar-fill {
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    height: 100%;
    transition: width 1s linear;
    border-radius: 20px;
}

/* ===== Skill Level Display ===== */
.skill-level-display {
    background: #1a1f3a;
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ===== Resources Section ===== */
.resources-section {
    background: #1a1f3a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.resources-section h2 {
    color: #e0e0e0;
    margin-bottom: 20px;
}

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

.resource-card {
    background: #252b4a;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid #2a3052;
    position: relative;
}

.resource-card:hover {
    transform: translateY(-5px);
    border-color: #8b9dff;
    box-shadow: 0 8px 20px rgba(139, 157, 255, 0.3);
}

.resource-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.resource-card.locked:hover {
    transform: none;
    border-color: transparent;
}

.resource-icon {
    font-size: 3em;
    text-align: center;
    margin-bottom: 15px;
}

.resource-card h3 {
    color: #8b9dff;
    text-align: center;
    margin-bottom: 15px;
}

.resource-details {
    font-size: 0.95em;
    color: #b0b0b0;
}

.resource-details p {
    margin-bottom: 8px;
}

.reward-list {
    list-style: none;
    margin-top: 8px;
    padding-left: 10px;
}

.reward-list li {
    margin-bottom: 5px;
}

.locked-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1em;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #1a1f3a;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    position: relative;
    color: #e0e0e0;
}

.modal-content h2 {
    color: #8b9dff;
    margin-bottom: 20px;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2em;
    font-weight: bold;
    color: #7a8396;
    cursor: pointer;
}

.close:hover {
    color: #e0e0e0;
}

.modal-content ul {
    list-style: none;
    margin: 15px 0;
}

.modal-content ul li {
    padding: 5px 0;
}

.modal-content form {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.modal-content .btn {
    flex: 1;
}

/* ===== Active Session ===== */
.active-session {
    background: linear-gradient(135deg, #2a3562, #3a4575);
    color: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    border: 1px solid #4a5580;
}

.active-session h2 {
    color: white;
    margin-bottom: 20px;
}

/* ===== Footer ===== */
footer {
    text-align: center;
    color: white;
    padding: 20px;
    margin-top: 40px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .game-layout {
        flex-direction: column;
    }
    
    .hero h1 {
        font-size: 2em;
    }
    
    .features-grid,
    .classes-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }
}
