/* style.css - обновлённый стиль для NeoForge 1.21.1 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0f172a;
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container, .admin-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* все углы прямые */
.card, .stat-card, .mod-card, .shader-card, .modal-content, .login-card, .item, .admin-tab, .tab-btn, button, input, textarea {
    border-radius: 0;
    border: 2px solid #334155;
}

button, .btn-download, .admin-tab, .tab-btn {
    border: 2px solid #475569;
}

/* вкладки */
.tabs, .admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn, .admin-tab {
    background: none;
    color: #cbd5e1;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    cursor: pointer;
    transition: 0.2s;
    background: rgba(30, 41, 59, 0.6);
}

.tab-btn.active, .admin-tab.active {
    background: #f97316;
    color: #0f172a;
    border-color: #f97316;
}

.tab-content, .admin-panel {
    display: none;
    animation: fade 0.2s ease;
}

.tab-content.active, .admin-panel.active {
    display: block;
}

@keyframes fade {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* карточки */
.card {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    background: rgba(0,0,0,0.3);
    border-bottom: 2px solid #334155;
    flex-wrap: wrap;
}

.card-icon {
    font-size: 1.6rem;
}

.card-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    flex: 1;
}

.badge {
    background: #1e293b;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    color: #f97316;
    border: 2px solid #475569;
}

/* статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(8px);
    padding: 1.2rem;
    text-align: center;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #f97316;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* миров и игроков */
.world-item, .player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1rem;
    border-bottom: 2px solid #1e293b;
}

.world-item:last-child, .player-item:last-child {
    border-bottom: none;
}

.world-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.world-item.overall {
    border-top: 2px solid #f97316;
    margin-top: 8px;
    padding-top: 12px;
    font-weight: bold;
    background: rgba(249, 115, 22, 0.1);
}

.world-name {
    font-size: 1rem;
    font-weight: 500;
}

.world-metrics {
    display: flex;
    gap: 1rem;
}

.world-tps, .world-mspt {
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

.player-item {
    background: rgba(76, 175, 80, 0.1);
    border-left: 3px solid #4caf50;
}

.player-name {
    font-weight: 500;
}

/* сетки модов и шейдеров */
.mods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.shaders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 1rem;
}

@media (max-width: 768px) {
    .shaders-grid {
        grid-template-columns: 1fr;
    }
}

.mod-card, .shader-card {
    background: rgba(15, 23, 42, 0.95);
    padding: 1rem;
    transition: 0.2s;
}

.mod-card:hover, .shader-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.mod-card img, .shader-card img {
    height: 160px;
    object-fit: contain;
    background: #0f172a;
    border: 2px solid #334155;
}

.mod-card h3, .shader-card h3 {
    font-size: 1.2rem;
    margin: 0.75rem 0 0.5rem;
}

.mod-card p, .shader-card p {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Экспертное мнение в карточке шейдера */
.expert-badge {
    background: rgba(249, 115, 22, 0.15);
    border-left: 4px solid #f97316;
    padding: 0.2rem;
    margin: 0.5rem 0;
    font-size: 0.8rem;
}

.expert-header {
    font-weight: bold;
    color: #f97316;
}

.expert-rating {
    color: #ffc107;
}

.expert-fps, .expert-hardware {
    color: #94a3b8;
}

.expert-comment {
    font-style: italic;
    margin-top: 4px;
}

/* кнопки */
.btn-download, .btn-load-more {
    background: #f97316;
    border: 2px solid #f97316;
    color: #0f172a;
    font-weight: bold;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
    font-size: 0.85rem;
    text-align: center;
}

.btn-download:hover, .btn-load-more:hover {
    background: #ea580c;
    transform: scale(1.02);
}

.skeleton {
    padding: 1rem;
    text-align: center;
    color: #64748b;
}

/* админ-панель */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-logout {
    background: #ef4444;
    border: 2px solid #ef4444;
    padding: 0.5rem 1.2rem;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.item-list {
    padding: 1rem;
}

.item {
    background: #1e293b;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #334155;
}

.item button {
    background: #3b82f6;
    border: none;
    padding: 0.3rem 0.8rem;
    color: white;
    cursor: pointer;
    margin-left: 0.5rem;
}

.item button:last-child {
    background: #ef4444;
}

/* логин-оверлей */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.login-card {
    background: #1e293b;
    padding: 2rem;
    width: 90%;
    max-width: 380px;
    text-align: center;
}

.login-card input {
    width: 100%;
    margin: 0.5rem 0;
    padding: 0.6rem;
    background: #0f172a;
    border: 2px solid #334155;
    color: #e2e8f0;
}

.login-card button {
    width: 100%;
    margin-top: 1rem;
    background: #f97316;
    border: 2px solid #f97316;
    padding: 0.6rem;
    font-weight: bold;
    cursor: pointer;
}

.error-message {
    color: #f87171;
    margin-top: 0.8rem;
    font-size: 0.85rem;
}

/* CAPTCHA styles */
.captcha-container {
    margin: 1rem 0;
}

.captcha-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0f172a;
    border: 2px solid #334155;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}

.captcha-code {
    font-size: 1.5rem;
    letter-spacing: 5px;
    font-family: 'Courier New', monospace;
    background: #0a0f1a;
    padding: 0.3rem 0.5rem;
    flex: 1;
    text-align: center;
}

.captcha-refresh {
    background: #334155;
    border: 2px solid #475569;
    color: #e2e8f0;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 0.5rem;
    width: auto;
}

.captcha-refresh:hover {
    background: #475569;
}

.rate-limit-warning {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
    padding: 0.5rem;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: #f87171;
}

/* модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.modal-content {
    background: #1e293b;
    padding: 1.5rem;
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 1rem;
}

.modal-content input, .modal-content textarea, .modal-content select {
    width: 100%;
    margin: 0.5rem 0;
    padding: 0.6rem;
    background: #0f172a;
    border: 2px solid #334155;
    color: #e2e8f0;
}

.modal-content textarea {
    resize: vertical;
    min-height: 80px;
}

.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.form-buttons button {
    flex: 1;
    padding: 0.6rem;
    font-weight: bold;
    cursor: pointer;
}

.form-buttons button:first-child {
    background: #f97316;
    border: 2px solid #f97316;
}

.form-buttons button:last-child {
    background: #334155;
    border: 2px solid #475569;
}

/* прогресс загрузки */
.upload-progress {
    margin: 0.5rem 0;
    text-align: center;
}

.progress-bar {
    background: #334155;
    height: 8px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #f97316;
    transition: width 0.3s;
}

/* FAQ */
.faq-content {
    padding: 1.5rem;
}

.faq-item {
    margin-bottom: 1.5rem;
}

.faq-item h3 {
    color: #f97316;
    margin-bottom: 0.5rem;
}

.faq-item p {
    color: #cbd5e1;
    line-height: 1.5;
}

.faq-item code {
    background: #0f172a;
    padding: 0.2rem 0.4rem;
    font-family: monospace;
}

/* адаптив */
@media (max-width: 768px) {
    body { padding: 1rem; }
    .stats-grid { gap: 1rem; }
    .mods-grid, .shaders-grid { grid-template-columns: 1fr; }
    .world-metrics { flex-direction: column; align-items: flex-end; gap: 0.25rem; }
    .world-item { flex-wrap: wrap; }
}

/* скроллбар */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #f97316;
}

::-webkit-scrollbar-thumb:hover {
    background: #ea580c;
}

/* load more button */
.load-more-container {
    margin-top: 1.5rem;
    text-align: center;
}
.btn-load-more {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}
.btn-load-more:hover {
    background: #475569;
    transform: none;
}

/* RCON Terminal Styles */
#rconOutput {
    scroll-behavior: smooth;
}

#rconOutput::-webkit-scrollbar {
    width: 6px;
}

#rconOutput::-webkit-scrollbar-track {
    background: #0f172a;
}

#rconOutput::-webkit-scrollbar-thumb {
    background: #f97316;
    border-radius: 0;
}

#rconCommand:focus {
    outline: none;
    border-color: #f97316;
}

#rconStatus {
    transition: all 0.3s ease;
}

.server-ip {
    text-align: center;
}

.server-ip h1 {
    font-family: "Comic Sans MS";
    font-size: 100px;
    text-decoration: underline;
}