/* ==========================================================================
   1. RESET & GLOBAL STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #e0e0e0;
    font-family: Arial, Helvetica, sans-serif;
    color: #333333;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Dynamic Red Logo & Badge */
.red-logo, 
.header-label {
    background-color: #d9383a; /* Exact Red */
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    font-size: 16px;
    text-decoration: none;
    line-height: 1.2;
}

/* ==========================================================================
   2. AUTHENTICATION (LOGIN & REGISTER) & ALERTS
   ========================================================================== */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    padding: 35px 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-radius: 4px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    color: #888888;
    margin-bottom: 5px;
    font-size: 14px;
}

/* Inputs & Textareas */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #dddddd;
    border-radius: 4px;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    background-color: #ffffff;
    box-sizing: border-box;
}

input:focus, 
select:focus, 
textarea:focus {
    border-color: #999999;
}

/* Captcha Block */
.captcha-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.captcha-img {
    background: #eeeeee url('https://www.transparenttextures.com/patterns/pinstriped-suit.png');
    flex: 1;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-style: italic;
    font-size: 20px;
    border: 1px solid #dddddd;
    letter-spacing: 3px;
    user-select: none;
}

.captcha-input {
    width: 90px !important;
    text-align: center;
}

/* Buttons */
.btn-submit {
    background-color: #66cc77; /* Green Button */
    color: #ffffff;
    border: none;
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    font-size: 15px;
    transition: background-color 0.2s ease;
}

.btn-submit:hover {
    background-color: #55bb66;
}

.footer-link {
    margin-top: 20px;
    font-size: 14px;
    color: #666666;
}

.footer-link a {
    color: #d9383a;
    text-decoration: none;
    font-weight: bold;
}

/* Alert Boxes for Success / Error */
.alert {
    padding: 10px 14px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 13px;
    text-align: left;
    word-wrap: break-word;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ==========================================================================
   3. HEADER & USER PROFILE BAR
   ========================================================================== */
.main-header {
    background-color: #333333;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 900;
}

.menu-icon {
    font-size: 24px;
    cursor: pointer;
    color: #ffffff;
    padding: 5px;
}

.user-info-bar {
    background-color: #ffffff;
    padding: 10px 20px;
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid #dddddd;
}

.user-profile-link {
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.user-name {
    font-weight: 600;
    color: #333333;
    font-size: 15px;
}

.user-name i {
    font-size: 12px;
    margin-left: 5px;
    color: #777777;
}

/* ==========================================================================
   4. SLIDING DRAWER SIDEBAR (WITH SCROLLER)
   ========================================================================== */
.side-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background-color: #f9f9f9;
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.side-drawer.active {
    right: 0;
}

.drawer-header {
    background-color: #333333;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-icon {
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

/* Scrollable Drawer Nav */
.drawer-nav {
    flex: 1;
    overflow-y: auto;
}

.drawer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.drawer-nav li a {
    display: block;
    padding: 14px 20px;
    color: #555555;
    text-decoration: none;
    border-bottom: 1px solid #eeeeee;
    font-size: 15px;
    transition: background-color 0.15s ease;
}

.drawer-nav li a:hover {
    background-color: #ffffff;
}

/* Specific Sidebar Colors */
.text-red { color: #d9383a !important; }
.text-green { color: #27ae60 !important; }

/* Dark Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 999;
}

.menu-overlay.active {
    display: block;
}

/* ==========================================================================
   5. NEWS PAGE MODULES & EXACT CARD STYLING
   ========================================================================== */
.news-container {
    max-width: 480px; /* Exact mobile/card width */
    margin: 0 auto;
    padding: 12px;
    box-sizing: border-box;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
}

.news-header h1 {
    font-size: 22px;
    margin: 0;
    color: #222222;
    font-weight: 800;
}

.server-time {
    font-size: 13px;
    color: #555555;
    font-weight: 500;
}

/* Yellow Telegram Banner Box */
.yellow-box {
    background-color: #f39c12; /* Exact bright yellow/orange */
    border-radius: 4px;
    padding: 14px;
    text-align: center;
    font-weight: 700;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.yellow-box a {
    color: #000000;
    text-decoration: underline;
    font-size: 14px;
    word-break: break-all;
}

/* Outer Card Container */
.card-box {
    background-color: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* Card Top Bar Headers */
.card-top {
    color: #ffffff;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 0.5px;
}

.red-bg { 
    background-color: #d9383a; /* Exact Red */
}

.purple-bg { 
    background-color: #6b1198; /* Exact Purple */
}

/* Card Outer Padding Area */
.card-outer-body {
    padding: 12px;
    background-color: #ffffff;
}

/* Bright Green Inner Box */
.green-inner-box {
    background-color: #27ae60; /* Vibrant Emerald Green */
    border-radius: 4px;
    padding: 14px 10px;
    text-align: center; /* Centered Text */
    color: #ffffff;
}

.green-inner-box p, 
.green-inner-box div {
    margin: 3px 0;
    font-size: 13px;
    font-weight: 600; /* Bold & Crisp Visibility */
    line-height: 1.5;
    color: #ffffff;
    word-break: break-word;
}

/* Gray Inner Box for Info */
.gray-inner-box {
    background-color: #f0f0f0;
    border-radius: 4px;
    padding: 14px;
    color: #333333;
    font-size: 13px;
    text-align: center;
}

/* ==========================================================================
   6. PAGINATION & FOOTER BLOCKS
   ========================================================================== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    margin: 20px 0;
}

.page-label {
    font-size: 13px;
    margin-right: 4px;
    color: #444444;
}

.page-link {
    background-color: #2196f3;
    color: #ffffff;
    padding: 5px 9px;
    text-decoration: none;
    border-radius: 2px;
    font-size: 12px;
    font-weight: bold;
}

.page-link.active {
    background-color: #0d47a1;
}

/* Footer Content Sections (Contacts / Terms) */
.content-block h2 {
    font-size: 18px;
    color: #222222;
    margin-top: 20px;
    margin-bottom: 8px;
    font-weight: 700;
}

.text-card {
    background: #ffffff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    font-size: 13px;
    line-height: 1.6;
    color: #333333;
    word-break: break-word;
}

/* ==========================================================================
   7. MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 480px) {
    .news-container {
        padding: 10px;
    }

    .news-header h1 {
        font-size: 20px;
    }

    .container {
        padding: 25px 15px;
    }

    .main-header, 
    .user-info-bar {
        padding: 10px 15px;
    }
}