* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

a {
    color: #ff8c00;
    text-decoration: none;
}
a:hover {
    color: #ffa500;
}

header {
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    border-bottom: 2px solid #ff8c00;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

header .logo img {
    height: 36px;
}

header .logo h1 {
    color: #ff8c00;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

header .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

header .user-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ff8c00;
}

header .user-info span {
    color: #eee;
    font-size: 14px;
}

header .user-info a {
    color: #ff8c00;
    font-size: 13px;
}

.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.card-header {
    background: #222;
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    font-weight: 600;
    color: #ff8c00;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 16px;
}

.server-card {
    position: relative;
    height: 150px;
    padding: 14px 16px;
    border-bottom: 1px solid #252525;
    cursor: pointer;
    transition: background 0.2s;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    overflow: hidden;
}
.server-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to left, transparent 0%, #0d0d0d 55%);
    pointer-events: none;
}
.server-card:hover::before {
    background: linear-gradient(to left, transparent 0%, #1a1a1a 55%);
}
.server-card:last-child {
    border-bottom: none;
}

.server-card .server-info {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.server-card .server-info .sv-name {
    color: #ff8c00;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}
.server-card .server-info .sv-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #aaa;
}
.server-card .server-info .sv-details span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.server-card .server-info .sv-details .sv-players {
    color: #ff8c00;
    font-weight: 600;
}
.server-card .server-info .sv-details .sv-ping {
    color: #ff4444;
    font-weight: 700;
    font-size: 20px;
}

.featured-news {
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 16px;
}

.featured-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: #ff8c00;
    color: #0d0d0d;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 8px 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
}

.featured-news .featured-inner {
    position: relative;
    z-index: 2;
}

.featured-news .featured-content {
    padding: 30px 16px 16px;
}

.featured-news .featured-content h2 {
    color: #ff8c00;
    font-size: 22px;
    margin-bottom: 8px;
}

.featured-news .featured-content .meta {
    color: #666;
    font-size: 12px;
    margin-bottom: 12px;
}

.featured-news .featured-content p {
    color: #ccc;
    line-height: 1.6;
    font-size: 14px;
}

.featured-news .featured-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 12px;
}

.news-item {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #252525;
    transition: background 0.2s;
    cursor: pointer;
    position: relative;
}
.news-item .news-text {
    position: relative;
    z-index: 1;
}
.news-item .news-thumb {
    position: relative;
    z-index: 1;
}
.gradient-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.news-item:hover {
    background: #222;
}
.news-item:last-child {
    border-bottom: none;
}
.news-item.pinned {
    border-left: 3px solid #ff8c00;
    border-bottom: 1px solid #333;
}
.news-item.pinned .news-title {
    font-size: 16px;
}
.news-item.latest {
    border-left: 3px solid #e67e22;
}
.news-item.latest .news-title {
    font-size: 16px;
}
.news-item.latest .news-text {
    position: relative;
}
.news-item.pinned .news-text {
    position: relative;
}
.news-badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pin-badge {
    background: #ff8c00;
    color: #0d0d0d;
}
.latest-badge {
    background: #e67e22;
    color: #fff;
}

.news-item .news-thumb {
    width: 100px;
    height: 56px;
    border-radius: 4px;
    background: #252525;
    flex-shrink: 0;
    overflow: hidden;
}
.news-item .news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.news-item .news-thumb .no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 10px;
}

.news-item .news-text {
    flex: 1;
    min-width: 0;
}
.news-item .news-text .news-cat {
    font-size: 11px;
    color: #ff8c00;
    text-transform: uppercase;
    font-weight: 600;
}
.news-item .news-text .news-title {
    color: #eee;
    font-size: 15px;
    font-weight: 600;
    margin: 2px 0 4px;
}
.news-item .news-text .news-excerpt {
    color: #888;
    font-size: 13px;
    line-height: 1.4;
}
.news-item .news-text .news-date {
    color: #555;
    font-size: 11px;
    margin-top: 4px;
}

.pm-item {
    padding: 12px 16px;
    border-bottom: 1px solid #252525;
    transition: background 0.2s;
    cursor: pointer;
}
.pm-item:hover {
    background: #222;
}
.pm-item:last-child {
    border-bottom: none;
}
.pm-item.unread {
    border-left: 3px solid #ff8c00;
}
.pm-item .pm-sender {
    color: #ff8c00;
    font-size: 13px;
    font-weight: 600;
}
.pm-item .pm-title {
    color: #eee;
    font-size: 14px;
    margin: 2px 0;
}
.pm-item .pm-date {
    color: #555;
    font-size: 11px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #555;
}
.empty-state p {
    font-size: 14px;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-orange {
    background: #ff8c00;
    color: #0d0d0d;
}
.btn-orange:hover {
    background: #ffa500;
    color: #0d0d0d;
}
.btn-dark {
    background: #333;
    color: #ccc;
}
.btn-dark:hover {
    background: #444;
    color: #eee;
}
.btn-danger {
    background: #c0392b;
    color: #fff;
}
.btn-danger:hover {
    background: #e74c3c;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th {
    background: #222;
    color: #ff8c00;
    padding: 10px 12px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #333;
}
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #252525;
    font-size: 13px;
}
.admin-table tr:hover td {
    background: #222;
}

.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    color: #ff8c00;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 4px;
    color: #eee;
    font-size: 14px;
    font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff8c00;
}
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #1a1a1a 0%, #0d0d0d 70%);
}

.login-box {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 48px 40px;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-box .logo-big {
    margin-bottom: 24px;
}
.login-box .logo-big img {
    height: 64px;
}
.login-box h1 {
    color: #ff8c00;
    font-size: 24px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.login-box p {
    color: #666;
    font-size: 13px;
    margin-bottom: 32px;
}

.login-box .steam-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #1b2838;
    color: #fff;
    padding: 12px 32px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
}
.login-box .steam-btn:hover {
    background: #2a475e;
    color: #fff;
}
.login-box .steam-btn img {
    height: 24px;
}

.login-box .error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 16px;
}

.empty-servers {
    padding: 20px;
    text-align: center;
    color: #555;
    font-size: 12px;
}

/* ============ Admin Dashboard ============ */

.admin-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.admin-dash-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 20px 24px;
    transition: all 0.25s ease;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.admin-dash-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.admin-dash-card.news-card::before {
    background: linear-gradient(135deg, rgba(255,140,0,0.08) 0%, transparent 60%);
}

.admin-dash-card.pm-card::before {
    background: linear-gradient(135deg, rgba(0,150,255,0.08) 0%, transparent 60%);
}

.admin-dash-card:hover::before {
    opacity: 1;
}

.admin-dash-card:hover {
    border-color: #ff8c00;
    transform: translateY(-2px);
}

.admin-dash-card .dash-icon {
    font-size: 36px;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    border-radius: 10px;
    border: 1px solid #333;
}

.admin-dash-card.news-card .dash-icon {
    background: linear-gradient(135deg, #2a1a00, #1a1a1a);
    border-color: #ff8c00;
}

.admin-dash-card.pm-card .dash-icon {
    background: linear-gradient(135deg, #001a2a, #1a1a1a);
    border-color: #0088ff;
}

.admin-dash-card .dash-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-dash-card .dash-title {
    color: #eee;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.admin-dash-card .dash-desc {
    color: #777;
    font-size: 12px;
    line-height: 1.4;
}

.admin-dash-card .dash-arrow {
    color: #555;
    font-size: 20px;
    flex-shrink: 0;
    transition: transform 0.2s, color 0.2s;
}

.admin-dash-card:hover .dash-arrow {
    color: #ff8c00;
    transform: translateX(4px);
}

/* Stats */

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-box {
    background: #1a1a1a;
    border: 1px solid #252525;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.stat-box .stat-num {
    display: block;
    color: #ff8c00;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-box .stat-label {
    display: block;
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Alerts */

.alert {
    padding: 10px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
}

.alert-success {
    background: #0d2d0d;
    border: 1px solid #2ecc71;
    color: #2ecc71;
}

.alert-warning {
    background: #2d1a00;
    border: 1px solid #ff8c00;
    color: #ff8c00;
}

.alert-error {
    background: #2d0d0d;
    border: 1px solid #c0392b;
    color: #e74c3c;
}

/* Buttons */

.btn-sm {
    padding: 3px 10px;
    font-size: 11px;
}

.action-cell {
    white-space: nowrap;
}

.action-cell .btn {
    margin-right: 4px;
}

/* Type badges */

.type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.type-news {
    background: rgba(255,140,0,0.15);
    color: #ff8c00;
}

.type-pm {
    background: rgba(100,100,100,0.2);
    color: #888;
}

/* Player list */

.player-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #252525;
    border-radius: 4px;
    background: #0d0d0d;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #1a1a1a;
    cursor: pointer;
    transition: background 0.15s;
}

.player-item:hover {
    background: #1a1a1a;
}

.player-item:last-child {
    border-bottom: none;
}

.player-item input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: #ff8c00;
}

.player-item .player-name {
    flex: 1;
    color: #ddd;
    font-size: 13px;
    font-weight: 500;
}

.player-item .player-sid {
    color: #555;
    font-size: 11px;
    font-family: monospace;
}

/* File input */

.form-group input[type="file"] {
    padding: 8px;
    background: #0d0d0d;
    border: 1px dashed #333;
    border-radius: 4px;
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: #ff8c00;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 6px;
    accent-color: #ff8c00;
}

/* Responsive */

@media (max-width: 768px) {
    .admin-dashboard {
        grid-template-columns: 1fr;
    }
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
}

/* Effect wrapper */
.msg-effects {
    position: relative;
    transition: all 0.3s ease;
}
