/* CSS Custom Properties */
:root {
    --primary-color: #e50914;
    --primary-hover: #f40612;
    --primary-dark: #b8070f;
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --border-color: #30363d;
    --border-muted: #21262d;
    --success-color: #238636;
    --warning-color: #d29922;
    --danger-color: #da3633;
    --sidebar-width: 280px;
    --sidebar-collapsed: 70px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.4);
    --border-radius: 12px;
    --border-radius-sm: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

/* Navigation Header */
.nav-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    transition: var(--transition);
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.nav-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    display: none;
}

.nav-toggle:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

/* Navigation Menu */
.nav-menu {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-links {
    list-style: none;
    padding: 0 1rem;
}

.nav-links li {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    transition: var(--transition);
    z-index: -1;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background-color: rgba(229, 9, 20, 0.1);
    transform: translateX(4px);
}

.nav-link i {
    font-size: 1.2rem;
    min-width: 1.2rem;
}

.link-text {
    transition: var(--transition);
    white-space: nowrap;
}

.sidebar.collapsed .link-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* Navigation Footer */
.nav-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-muted);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 50%;
    transition: var(--transition);
    font-size: 1.1rem;
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.sidebar.collapsed .footer-links,
.sidebar.collapsed .social-links {
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    height: 100vh;
    transition: var(--transition);
    padding: 1.5rem;
    overflow: hidden;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Page System */
.page {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
    height: calc(100vh - 3rem);
    overflow-y: auto;
}

.page.active {
    display: flex;
    flex-direction: column;
}

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

/* Page Headers */
.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 2rem 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(229, 9, 20, 0.4);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Feature Cards */
.features-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    flex: 1;
    align-items: start;
}

.feature-card {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: fit-content;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    transform: scaleX(0);
    transition: var(--transition);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
}

/* Server Grid */
.server-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    flex: 1;
    align-items: start;
    overflow-y: auto;
}

.server-card {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: fit-content;
}

.server-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.server-card.coming-soon {
    opacity: 0.7;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background-color: var(--success-color);
}

.status-dot.coming-soon {
    background-color: var(--warning-color);
}

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

.status-text {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
}

.server-icon {
    text-align: center;
    margin-bottom: 1.5rem;
}

.server-icon i {
    font-size: 3rem;
    color: var(--primary-color);
}

.server-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.server-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.server-info {
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-muted);
}

.info-item i {
    color: var(--primary-color);
    min-width: 1.2rem;
}

/* Community Grid */
.community-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.community-card {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    height: fit-content;
}

.community-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.community-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
}

.community-icon.discord {
    background: linear-gradient(135deg, #5865f2, #7289da);
}

.community-icon.teamspeak {
    background: linear-gradient(135deg, #2580c3, #4fa8d8);
}

.community-icon.steam {
    background: linear-gradient(135deg, #1b2838, #2a475e);
}

.community-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.community-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.stats .online {
    color: var(--success-color);
}

/* Community Info */
.community-info {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.community-info h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-muted);
}

.rule-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.rule-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.rule-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* News Grid */
.news-grid {
    display: grid;
    gap: 1rem;
    flex: 1;
    overflow-y: auto;
    grid-template-rows: repeat(auto-fit, minmax(120px, max-content));
}

.news-card {
    display: flex;
    gap: 1rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
    height: fit-content;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.news-card.featured {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
}

.news-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: var(--border-radius);
    color: white;
    text-align: center;
    flex-shrink: 0;
}

.news-date .day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.news-date .month {
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 500;
}

.news-content {
    flex: 1;
}

.news-category {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.news-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.news-card p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
    font-size: 0.9rem;
}

.news-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
    flex: 1;
    overflow: hidden;
}

/* Contact Form */
.contact-form-section {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    height: fit-content;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    max-height: 120px;
}

/* Contact Info */
.contact-info-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    overflow-y: auto;
}

.contact-info,
.support-info {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    flex-shrink: 0;
}

.contact-info h3,
.support-info h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-muted);
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    min-width: 1.2rem;
}

.contact-item div {
    display: flex;
    flex-direction: column;
}

.contact-item strong {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.contact-item span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.support-hours {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-muted);
}

.support-hours h4 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.support-hours p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .features-section,
    .server-grid,
    .community-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
        height: 100vh;
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: 0;
    }
    
    .page {
        height: calc(100vh - 2rem);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .hero-section {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 0.75rem 1.5rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header {
        margin-bottom: 1rem;
    }
    
    .features-section,
    .server-grid,
    .community-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .news-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .news-date {
        align-self: center;
        margin-bottom: 1rem;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-card,
    .server-card,
    .community-card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.75rem;
    }
    
    .page {
        height: calc(100vh - 1.5rem);
    }
    
    .hero-section {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .page-header {
        margin-bottom: 0.75rem;
    }
    
    .feature-card,
    .server-card,
    .community-card,
    .news-card,
    .contact-form-section,
    .contact-info,
    .support-info {
        padding: 1rem;
    }
    
    .nav-header {
        padding: 1rem;
    }
    
    .nav-footer {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .features-section,
    .server-grid,
    .community-grid {
        gap: 0.75rem;
    }
    
    .community-info {
        padding: 1rem;
    }
    
    .news-grid {
        gap: 0.75rem;
    }
}

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

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

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

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

/* Selection Styling */
::selection {
    background-color: var(--primary-color);
    color: white;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
