/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Modern sans-serif for readability */
    background-color: #050505;
    color: #e0e0e0;
    background-image: url('../images/main1.png'); /* Updated to user's image */
    background-size: 100% auto; /* Fit width, auto height to keep aspect ratio at top */
    background-position: center top;
    background-attachment: fixed; /* Parallax-like effect */
    background-repeat: no-repeat;
    line-height: 1.8; /* Increased line height for better readability */
    overflow-x: hidden;
}

/* Overlay for better text readability on busy backgrounds */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient: Clearer at top to see art, darker at bottom for content */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.9) 40%, #050505 100%);
    z-index: -1;
}

h1, h2, h3, h4, h5, h6, .widget-title, nav a, .logo p {
    font-family: 'Cinzel', serif; /* Keep RPG feel for headers */
}

a {
    text-decoration: none;
    color: #d4af37; /* Gold */
    transition: all 0.3s ease;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

/* Layout Container */
.container {
    width: 1400px; /* Wider for 3 columns */
    max-width: 98%;
    margin: 40px auto;
    /* Removed container background/border to let widgets float */
    background-color: transparent; 
    border: none; 
    box-shadow: none;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: none;
    border-radius: 0;
}

/* Decorative Borders - Removed */
.container::after {
    display: none;
}

/* Header */
header {
    background: transparent;
    padding: 20px 0;
    text-align: center;
    position: relative;
}

/* ... (Logo styles remain) ... */

/* Navigation */
nav {
    background: linear-gradient(to bottom, #2b0a0a, #1a0505); /* Darker, richer red/black */
    border-top: 1px solid #5c1e1e;
    border-bottom: 1px solid #5c1e1e;
    box-shadow: 0 0 20px rgba(0,0,0,0.9);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    height: 60px; /* Fixed height for consistency */
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    height: 100%;
}

nav ul li {
    margin: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

nav ul li a {
    display: flex;
    align-items: center;
    padding: 0 30px;
    height: 100%;
    color: #bfbfbf;
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

nav ul li:first-child a {
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

nav ul li a:hover {
    background-color: rgba(180, 0, 0, 0.15);
    color: #ffcccc;
    text-shadow: 0 0 10px rgba(255, 50, 50, 0.6);
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #a00000;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

nav ul li a:hover::before {
    transform: scaleX(1);
}

/* Main Content Area */
main {
    flex: 1;
    padding: 40px 0;
    display: flex;
    gap: 30px; /* Balanced gap */
    justify-content: center;
    align-items: flex-start; /* Align to top */
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.content {
    flex: 1;
    max-width: 740px; /* Optimal reading width */
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Sidebar Widgets */
.widget {
    background: rgba(15, 5, 5, 0.9); /* Very dark red/black */
    border: 1px solid #4a1010; /* Subtle dark red border */
    padding: 35px 20px 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
    position: relative;
    border-radius: 2px;
    margin-top: 20px; /* Space for the floating title */
}

/* Corner Accents - Refined */
.widget::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px;
    width: 10px; height: 10px;
    border-top: 2px solid #c0392b;
    border-left: 2px solid #c0392b;
}
.widget::after {
    content: '';
    position: absolute;
    bottom: -1px; right: -1px;
    width: 10px; height: 10px;
    border-bottom: 2px solid #c0392b;
    border-right: 2px solid #c0392b;
}

.widget-title {
    background: linear-gradient(180deg, #800000 0%, #400000 100%);
    color: #fff;
    text-align: center;
    padding: 10px 0;
    margin: -55px auto 20px; /* Pull up significantly to sit on border */
    width: 70%;
    border: 1px solid #a00000;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    border-radius: 2px;
    position: relative;
    z-index: 2;
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-form input, .register-form input, select {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #3d1010;
    color: #ddd;
    font-size: 0.9rem;
    border-radius: 2px;
    transition: border-color 0.3s;
}

.login-form input:focus, .register-form input:focus, select:focus {
    border-color: #c0392b;
    outline: none;
    background-color: rgba(0, 0, 0, 0.7);
}

.btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(180deg, #8b0000, #500000);
    border: 1px solid #600000;
    color: #fff;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    border-radius: 2px;
}

.btn:hover {
    background: linear-gradient(180deg, #a00000, #600000);
    border-color: #c0392b;
    box-shadow: 0 0 10px rgba(192, 57, 43, 0.3);
}

/* News Section */
.news-item {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border: 1px solid #3d1010;
    margin-bottom: 20px;
    position: relative;
}

.news-item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #800000;
}

.news-title {
    color: #e0e0e0;
    font-size: 1.3rem;
    border-bottom: 1px solid #3d1010;
    padding-bottom: 10px;
    margin-bottom: 10px;
    font-family: 'Cinzel', serif;
}

.news-item:hover .news-title {
    color: #c0392b;
}

.news-meta {
    color: #777;
    font-size: 0.85rem;
}

.news-meta::before {
    background: #c0392b;
}

/* Tables (Rankings) */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    color: #c0392b;
    border-bottom: 1px solid #4a1010;
    padding: 10px 5px;
    font-size: 0.85rem;
}

td {
    padding: 10px 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.9rem;
}

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

tr:hover {
    background-color: rgba(192, 57, 43, 0.05);
}

/* Video Container */
iframe {
    width: 100%;
    aspect-ratio: 16/9;
    height: auto; /* Override fixed height */
    border: 1px solid #4a1010;
    box-shadow: 0 0 15px rgba(0,0,0,0.8);
}

/* Utility */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-20 { margin-bottom: 20px; }
.error { 
    color: #ff6b6b; 
    background: rgba(255, 68, 68, 0.1); 
    padding: 15px; 
    border-radius: 6px;
    border-left: 3px solid #ff4444; 
    font-size: 0.95rem;
}
.success { 
    color: #6bff6b; 
    background: rgba(68, 255, 68, 0.1); 
    padding: 15px; 
    border-radius: 6px;
    border-left: 3px solid #44ff44; 
    font-size: 0.95rem;
}

/* Footer */
footer {
    background-color: #0a0202;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #3d1010;
    color: #666;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 1200px) {
    main {
        flex-wrap: wrap;
    }
    .content {
        order: -1; /* Put content on top on smaller screens? Or keep middle? */
        width: 100%;
        max-width: 100%;
    }
    .sidebar {
        width: 45%; /* Side by side on tablet */
    }
}

@media (max-width: 768px) {
    main {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
}

/* WhatsApp Widget */
.whatsapp-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.whatsapp-widget:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    background-color: #20bd5a;
}

.whatsapp-widget svg {
    width: 35px;
    height: 35px;
}