* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0a0f1e 0%, #1a1a2e 50%, #16213e 100%);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    color: #e0e0e0;
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.header h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    background: linear-gradient(45deg, #ffd700, #ff6600);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.header h2 {
    color: #ffaa00;
    margin-top: 10px;
    font-size: clamp(1rem, 4vw, 1.3rem);
}

.datetime-box {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #ffd700;
    border-radius: 50px;
    padding: 12px 24px;
    display: inline-block;
    margin: 15px auto;
    font-family: 'Courier New', monospace;
    font-size: clamp(0.9rem, 4vw, 1.3rem);
    font-weight: bold;
    color: #ffd700;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #ff6600;
    color: #ffaa00;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: rgba(255, 100, 0, 0.3);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(45deg, #ff6600, #ff8800);
    color: white;
    box-shadow: 0 0 15px rgba(255, 100, 0, 0.5);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.server-status {
    display: inline-block;
    background: rgba(0, 100, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
    margin: 10px;
    font-size: 0.85rem;
}

.marquee-container {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 40px;
    margin: 20px 0;
    padding: 12px;
    overflow: hidden;
    border-left: 4px solid #ff6600;
    border-right: 4px solid #ff6600;
}

.marquee {
    white-space: nowrap;
    animation: marquee 20s linear infinite;
    font-size: clamp(0.9rem, 4vw, 1.2rem);
    font-weight: bold;
    color: #ffaa00;
    display: inline-block;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin: 30px auto;
    max-width: 1200px;
}

.card {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 100, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 100, 0, 0.2);
    border-color: #ff6600;
}

.card h3 {
    color: #ffaa00;
    font-size: 1.3rem;
    margin-bottom: 15px;
    border-left: 4px solid #ff6600;
    padding-left: 12px;
}

.card ul {
    list-style: none;
    padding-left: 5px;
}

.card li {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
    font-size: 0.9rem;
}

.card li::before {
    content: "🔥";
    position: absolute;
    left: 0;
}

.connect-box {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #ff6600;
    border-radius: 15px;
    padding: 20px;
    margin: 20px auto;
    text-align: center;
    max-width: 800px;
}

.connect-box code {
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 8px;
    display: inline-block;
    font-size: clamp(0.8rem, 3.5vw, 1rem);
    color: #ffaa00;
    margin: 8px;
    word-break: break-all;
}

.btn-copy {
    background: #ff6600;
    border: none;
    padding: 6px 15px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.85rem;
}

.btn-copy:hover {
    background: #ff8800;
    transform: scale(1.02);
}

.password-badge {
    display: inline-block;
    background: #ff4444;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.footer {
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    font-size: 0.7rem;
    border-top: 1px solid rgba(255, 100, 0, 0.3);
}

/* ============================================ */
/* СТАТИСТИКА САЙТА */
/* ============================================ */

.stats-dashboard {
    margin: 30px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 100, 0, 0.3);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: #ff6600;
    box-shadow: 0 5px 15px rgba(255, 100, 0, 0.2);
}

.stat-icon {
    font-size: 2.5rem;
    background: rgba(255, 100, 0, 0.2);
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: bold;
    color: #ffaa00;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================ */
/* СЧЁТЧИК ПОСЕТИТЕЛЕЙ */
/* ============================================ */

.visitors-counter-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.visitors-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 15px 20px;
    border: 1px solid rgba(255, 100, 0, 0.3);
    transition: all 0.3s;
    cursor: pointer;
}

.visitors-counter:hover {
    transform: translateY(-3px);
    border-color: #ff6600;
    box-shadow: 0 5px 15px rgba(255, 100, 0, 0.2);
}

.counter-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.counter-icon-img {
    font-size: 3rem;
    background: linear-gradient(135deg, #ff6600, #ffaa00);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
}

.counter-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    min-width: 30px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.counter-label {
    margin-top: 10px;
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================ */
/* МОДАЛЬНОЕ ОКНО */
/* ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: linear-gradient(145deg, #1a1a2e, #0f0f1a);
    border-radius: 24px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    border: 1px solid #ff6600;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 100, 0, 0.3);
}

.modal-header h3 {
    color: #ffaa00;
    font-size: 1.3rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 2rem;
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: #ff6600;
    transform: scale(1.1);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 60vh;
}

.visitors-modal-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.visitor-modal-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 14px;
    transition: all 0.2s;
}

.visitor-modal-item:hover {
    background: rgba(255, 100, 0, 0.15);
}

.visitor-modal-flag {
    font-size: 2rem;
}

.visitor-modal-info {
    flex: 1;
}

.visitor-modal-ip {
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: bold;
    color: #e0e0e0;
}

.visitor-modal-meta {
    font-size: 0.7rem;
    color: #888;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 4px;
}

.visitor-modal-country {
    color: #aaa;
}

.visitor-modal-time {
    color: #666;
}

.visitor-modal-badge {
    font-size: 0.65rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
}

.visitor-modal-badge.new {
    background: rgba(0, 200, 0, 0.2);
    color: #44ff44;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.visitor-modal-badge.old {
    background: rgba(255, 100, 0, 0.15);
    color: #ffaa00;
    border: 1px solid rgba(255, 100, 0, 0.3);
}

/* ============================================ */
/* ПОИСКОВАЯ ВКЛАДКА */
/* ============================================ */

.search-container {
    padding: 20px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    border: 1px solid rgba(255, 100, 0, 0.3);
    margin: 20px 0;
}

.search-container h3 {
    color: #ffaa00;
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.search-desc {
    text-align: center;
    color: #888;
    margin-bottom: 25px;
    font-size: 0.85rem;
}

.search-form-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.search-form {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 500px;
}

.search-input {
    flex: 1;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #ff6600;
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #ffaa00;
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
}

.search-btn {
    background: linear-gradient(45deg, #ff6600, #ff8800);
    border: none;
    padding: 0 25px;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.search-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(255, 100, 0, 0.4);
}

/* ============================================ */
/* STEAM СТАТИСТИКА */
/* ============================================ */

.steam-stats {
    background: linear-gradient(135deg, #171a21, #1e232c);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #2a6e8a;
}

.steam-stats-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a6e8a;
}

.steam-stats-header span {
    color: #67c1f5;
    font-weight: bold;
    font-size: 18px;
}

.steam-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.steam-stat {
    text-align: center;
}

.steam-stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #67c1f5;
}

.steam-stat-label {
    font-size: 0.7rem;
    color: #888;
}

.server-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
}

.server-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.server-players {
    background: #2a6e8a;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: bold;
}

.steam-group-link {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-steam-group, .btn-steam-login {
    background: linear-gradient(45deg, #171a21, #2a6e8a);
    padding: 10px 20px;
    border-radius: 30px;
    color: #67c1f5;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn-steam-group:hover, .btn-steam-login:hover {
    background: linear-gradient(45deg, #2a6e8a, #3a8eaa);
    color: white;
    transform: scale(1.02);
}

/* ============================================ */
/* ВКЛАДКИ SOTF */
/* ============================================ */

.sotf-tab-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #ff6600;
    color: #ffaa00;
    padding: 8px 25px;
    font-size: 0.95rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.sotf-tab-btn:hover {
    background: rgba(255, 100, 0, 0.3);
    transform: translateY(-2px);
}

.sotf-tab-btn.active {
    background: linear-gradient(45deg, #ff6600, #ff8800);
    color: white;
    box-shadow: 0 0 15px rgba(255, 100, 0, 0.5);
}

.sotf-content {
    display: none;
    animation: fadeIn 0.3s ease;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.sotf-content.active {
    display: block;
}

/* ============================================ */
/* ФИКСЫ ДЛЯ ВКЛАДОК */
/* ============================================ */

#tab-sotf, #tab-l4d2, #tab-search {
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

#tab-sotf .cards {
    max-width: 1200px !important;
    margin: 0 auto !important;
}

#tab-sotf .connect-box {
    max-width: 800px !important;
    margin: 20px auto !important;
}

#tab-l4d2 .connect-box {
    max-width: 800px !important;
    margin: 20px auto !important;
}

/* ============================================ */
/* АДАПТИВ */
/* ============================================ */

@media (max-width: 768px) {
    .container { padding: 15px; }
    .header { padding: 20px 15px; }
    .card { padding: 15px; }
    .card h3 { font-size: 1.1rem; }
    .tab-btn { padding: 8px 20px; font-size: 0.9rem; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .stat-card { padding: 10px 15px; }
    .stat-icon { font-size: 1.8rem; width: 45px; height: 45px; }
    .stat-number { font-size: 1.2rem; }
    .steam-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .search-form { flex-direction: column; gap: 10px; }
    .search-btn { padding: 12px; }
}

@media (max-width: 480px) {
    .steam-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .server-stats { flex-direction: column; align-items: center; }
    .steam-group-link { flex-direction: column; align-items: center; }
    .cards { grid-template-columns: 1fr; }
    .modal-container { width: 95%; }
    .visitor-modal-item { flex-wrap: wrap; padding: 12px; }
    .visitor-modal-badge { margin-left: auto; }
}