/* GANRENhub Main Stylesheet */
/* Версия 1.2 */
@import url('https://fonts.googleapis.com/css2?family=Minecraftia&family=Press+Start+2P&display=swap');

:root {
    /* Цветовая схема */
    --primary: #4b7bec;
    --primary-dark: #3867d6;
    --accent: #ff9f43;
    --accent-dark: #fa8231;
    --success: #20bf6b;
    --danger: #eb3b5a;
    --warning: #fed330;
    
    /* Текстовые цвета */
    --text-light: #f1f2f6;
    --text-dark: #2f3640;
    --text-muted: #a5b1c2;
    
    /* Фоновые цвета */
    --bg-dark: #1e272e;
    --bg-darker: #0c2461;
    --bg-light: #dfe6e9;
    
    /* Границы */
    --border-radius: 8px;
    --border-color: rgba(255, 255, 255, 0.1);
}

/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Minecraftia', sans-serif;
    background: linear-gradient(135deg, var(--bg-darker), var(--bg-dark));
    color: var(--text-light);
    min-height: 100vh;
    line-height: 1.6;
    background-attachment: fixed;
    background-size: cover;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://i.pinimg.com/originals/21/95/7a/21957a5d9a8d9f5e7b2d8b8e1d4d4d4c.png') center/cover;
    opacity: 0.12;
    z-index: -1;
}

html[data-theme="light"] {
    --primary: #3f6fd8;
    --primary-dark: #345fc0;
    --accent: #f08f36;
    --accent-dark: #dd7f2e;
    --text-light: #243142;
    --text-muted: #5f6f81;
    --bg-dark: #f4f7fb;
    --bg-darker: #e7edf6;
    --border-color: rgba(37, 59, 87, 0.18);
}

html[data-theme="light"] body {
    background: linear-gradient(135deg, var(--bg-darker), var(--bg-dark));
    color: var(--text-light);
}

/* Контейнеры */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.auth-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background: rgba(30, 39, 46, 0.86);
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

html[data-theme="light"] .auth-container {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(37, 59, 87, 0.18);
    box-shadow: 0 12px 30px rgba(30, 53, 83, 0.16);
}

.auth-form {
    margin-top: 20px;
}

.auth-btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(75, 123, 236, 0.35);
}

.toggle-auth {
    margin-top: 14px;
    color: var(--text-muted);
    text-align: center;
}

.toggle-auth a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.error-message,
.success-message {
    margin-bottom: 10px;
    border-radius: 8px;
    padding: 10px 12px;
    display: none;
}

.error-message {
    color: #ffd1d8;
    background: rgba(235, 59, 90, 0.22);
    border: 1px solid rgba(235, 59, 90, 0.5);
}

.success-message {
    color: #d8ffeb;
    background: rgba(32, 191, 107, 0.22);
    border: 1px solid rgba(32, 191, 107, 0.5);
}

/* Формы */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-light);
    font-size: 16px;
    transition: all 0.3s ease;
}

html[data-theme="light"] .form-group input {
    background: rgba(240, 244, 250, 0.92);
    border-color: rgba(37, 59, 87, 0.2);
    color: #243142;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 159, 67, 0.2);
}

.form-group i {
    position: absolute;
    right: 15px;
    top: 40px;
    color: var(--text-muted);
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(75, 123, 236, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
}

/* Индикатор сложности пароля */
.password-strength {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}

html[data-theme="light"] .password-strength {
    background: rgba(37, 59, 87, 0.14);
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s, background 0.3s;
}

.strength-1 { width: 20%; background: var(--danger); }
.strength-2 { width: 40%; background: #fa8231; }
.strength-3 { width: 60%; background: var(--warning); }
.strength-4 { width: 80%; background: #26de81; }
.strength-5 { width: 100%; background: var(--success); }

/* Сообщения */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-danger {
    background-color: rgba(235, 59, 90, 0.2);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-success {
    background-color: rgba(32, 191, 107, 0.2);
    border: 1px solid var(--success);
    color: var(--success);
}

/* Навигация */
.navbar {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Адаптивность */
@media (max-width: 768px) {
    .auth-container {
        margin: 20px auto;
        padding: 20px;
    }
    
    .navbar {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-links {
        margin-top: 15px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Админка */
.admin-container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.admin-nav {
    display: flex;
    gap: 12px;
}

.admin-nav a {
    text-decoration: none;
    color: var(--text-light);
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.admin-nav a.active,
.admin-nav a:hover {
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .admin-nav a.active,
html[data-theme="light"] .admin-nav a:hover {
    background: rgba(34, 56, 84, 0.1);
}

.admin-content {
    display: grid;
    gap: 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.stat-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
}

.admin-section {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    padding: 10px;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Профиль */
.profile-container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 24px;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

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

.logo h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.25rem;
    line-height: 1.4;
    background: linear-gradient(to right, var(--accent), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
}

.logo i {
    color: var(--accent);
    font-size: 28px;
    text-shadow: 0 0 10px rgba(255, 159, 67, 0.55);
}

.profile-nav {
    display: flex;
    gap: 12px;
}

.profile-nav a {
    text-decoration: none;
    color: var(--text-light);
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.profile-nav a.active,
.profile-nav a:hover {
    border-color: var(--border-color);
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .profile-nav a.active,
html[data-theme="light"] .profile-nav a:hover {
    background: rgba(34, 56, 84, 0.1);
}

.profile-content {
    display: grid;
    gap: 20px;
}

.profile-info,
.profile-stats,
.account-settings {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar {
    position: relative;
}

.avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.edit-btn {
    position: absolute;
    right: 0;
    bottom: 4px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--primary);
    color: #fff;
}

.user-details h2 {
    margin-bottom: 8px;
}

.user-details p {
    color: var(--text-muted);
    margin-bottom: 6px;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.stat-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    overflow: hidden;
    margin-top: 10px;
}

html[data-theme="light"] .progress-bar {
    background: rgba(37, 59, 87, 0.14);
}

.progress {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-top: 6px;
}

.settings-title {
    margin-bottom: 14px;
}

.theme-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.theme-controls label {
    color: var(--text-muted);
}

.theme-select {
    min-width: 220px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-light);
    font-size: 15px;
}

html[data-theme="light"] .theme-select {
    background: rgba(255, 255, 255, 0.8);
}

.theme-hint {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 14px;
}

html[data-theme="light"] .profile-header,
html[data-theme="light"] .profile-info,
html[data-theme="light"] .profile-stats,
html[data-theme="light"] .account-settings,
html[data-theme="light"] .admin-header,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .admin-section {
    background: rgba(255, 255, 255, 0.75);
}

@media (max-width: 768px) {
    .profile-container {
        padding: 14px;
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
