* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
    pointer-events: none;
    z-index: 1;
}

body.dark-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

header {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease;
}

body.dark-theme header {
    background: rgba(0, 0, 0, 0.5);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 20px;
    width: 50px;
    height: 26px;
    cursor: pointer;
    transition: background 0.3s ease;
    padding: 0;
    position: relative;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.theme-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
}

body.dark-theme .theme-toggle-slider {
    transform: translateX(24px);
}

.theme-toggle-slider::before {
    content: '☀️';
}

body.dark-theme .theme-toggle-slider::before {
    content: '🌙';
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

header h1 {
    color: white;
    font-size: 24px;
    white-space: nowrap;
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
    white-space: nowrap;
}

nav a:hover {
    opacity: 0.7;
}

main {
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-theme section {
    background: #0f3460;
    color: #e0e0e0;
}

.hero {
    text-align: center;
}

.hero h2 {
    color: #667eea;
    margin-bottom: 30px;
    font-size: 32px;
}

.server-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    display: inline-block;
    transition: background 0.3s ease;
}

body.dark-theme .server-info {
    background: rgba(0, 0, 0, 0.3);
}

.server-info p {
    margin: 10px 0;
    font-size: 18px;
}

.ip {
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    font-family: monospace;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    user-select: none;
    position: relative;
}

.ip:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.ip:active {
    transform: scale(0.98);
}

.ip::after {
    content: '📋';
    margin-left: 8px;
    opacity: 0.7;
}

.ip.copied::after {
    content: '✓';
    color: #4ade80;
}

.status-online {
    color: #4ade80;
    font-weight: bold;
}

.status-online::before {
    content: '🟢 ';
}

.status-offline {
    color: #ef4444;
    font-weight: bold;
}

.status-offline::before {
    content: '🔴 ';
}

.status-loading {
    color: #fbbf24;
    font-weight: bold;
}

.status-loading::before {
    content: '🟡 ';
}

#onlineInfo {
    animation: fadeIn 0.5s ease;
}

.rules-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.rules-intro {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

body.dark-theme .rules-intro {
    background: rgba(0, 0, 0, 0.3);
    color: #b0b0b0;
}

.rule-category {
    margin-bottom: 40px;
}

.rule-category h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 24px;
}

.rule-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.2s ease, background 0.3s ease;
}

.rule-item:hover {
    transform: translateX(5px);
}

body.dark-theme .rule-item {
    background: rgba(0, 0, 0, 0.3);
}

.rule-number {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    min-width: 30px;
}

.rule-content h4 {
    color: #333;
    margin-bottom: 8px;
    font-size: 18px;
}

body.dark-theme .rule-content h4 {
    color: #e0e0e0;
}

.rule-content p {
    color: #666;
    line-height: 1.6;
}

body.dark-theme .rule-content p {
    color: #b0b0b0;
}

.punishment-info {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.punishment-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
}

body.dark-theme .punishment-item {
    background: rgba(255, 193, 7, 0.2);
}

.punishment-icon {
    font-size: 32px;
}

.punishment-item strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
}

body.dark-theme .punishment-item strong {
    color: #e0e0e0;
}

.punishment-item p {
    color: #666;
    margin: 0;
}

body.dark-theme .punishment-item p {
    color: #b0b0b0;
}

.rules-footer {
    margin-top: 40px;
    padding: 25px;
    background: #e3f2fd;
    border-radius: 8px;
    text-align: center;
}

body.dark-theme .rules-footer {
    background: rgba(102, 126, 234, 0.2);
}

.rules-footer p {
    margin: 10px 0;
    color: #333;
}

body.dark-theme .rules-footer p {
    color: #e0e0e0;
}

.rules-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

.rules-footer a:hover {
    text-decoration: underline;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.support-section h2,
.donate-section h2 {
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
}

.support-form {
    max-width: 600px;
    margin: 0 auto 40px;
}

.support-form h3 {
    margin-bottom: 20px;
    color: #555;
    transition: color 0.3s ease;
    text-align: center;
}

body.dark-theme .support-form h3 {
    color: #b0b0b0;
}

body.dark-theme .support-form p {
    color: #999;
}

.discord-support {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #5865F2 0%, #7289DA 100%);
    border-radius: 15px;
    color: white;
    margin-bottom: 30px;
}

.discord-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.discord-support h3 {
    font-size: 28px;
    margin-bottom: 15px;
}

.discord-support p {
    font-size: 16px;
    margin-bottom: 25px;
    opacity: 0.9;
}

.discord-btn {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: #5865F2;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 18px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.discord-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.support-divider {
    text-align: center;
    margin: 40px 0;
    position: relative;
}

.support-divider::before,
.support-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e0e0e0;
}

body.dark-theme .support-divider::before,
body.dark-theme .support-divider::after {
    background: #555;
}

.support-divider::before {
    left: 0;
}

.support-divider::after {
    right: 0;
}

.support-divider span {
    background: white;
    padding: 0 20px;
    color: #999;
    font-weight: bold;
}

body.dark-theme .support-divider span {
    background: #0f3460;
    color: #b0b0b0;
}

form input,
form select,
form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, background 0.3s, color 0.3s;
    background: white;
    color: #333;
}

body.dark-theme form input,
body.dark-theme form select,
body.dark-theme form textarea {
    background: rgba(0, 0, 0, 0.3);
    border-color: #555;
    color: #e0e0e0;
}

body.dark-theme form input::placeholder,
body.dark-theme form textarea::placeholder {
    color: #999;
}

form input:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: #667eea;
}

form button {
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s;
}

form button:hover {
    background: #5568d3;
}

.faq-section h2 {
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
}

.faq {
    margin-top: 0;
}

.faq h3 {
    margin-bottom: 20px;
    color: #555;
    transition: color 0.3s ease;
}

body.dark-theme .faq h3 {
    color: #b0b0b0;
}

.faq-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: background 0.3s ease;
}

body.dark-theme .faq-item {
    background: rgba(0, 0, 0, 0.3);
}

.faq-item h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.donate-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.donate-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
}

.donate-card:hover {
    transform: translateY(-5px);
}

.donate-card.featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
}

.donate-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.price {
    font-size: 32px;
    font-weight: bold;
    margin: 20px 0;
    color: #667eea;
}

.featured .price {
    color: white;
}

.donate-card ul {
    list-style: none;
    margin: 20px 0;
    text-align: left;
}

.donate-card li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.donate-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.featured li:before {
    color: white;
}

.donate-btn {
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.donate-btn:hover {
    background: #5568d3;
}

.featured .donate-btn {
    background: white;
    color: #667eea;
}

.featured .donate-btn:hover {
    background: #f0f0f0;
}

footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    transition: background 0.3s ease;
}

body.dark-theme footer {
    background: rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    header .container {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    header h1 {
        font-size: 18px;
        width: 100%;
        text-align: center;
    }
    
    nav {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    nav a {
        font-size: 13px;
        padding: 6px 12px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 5px;
    }
    
    .user-menu {
        order: 3;
    }
    
    #login-link {
        order: 3;
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .theme-toggle {
        order: 4;
        width: 50px !important;
        height: 26px !important;
        border-radius: 20px !important;
    }
    
    .theme-toggle-slider {
        width: 16px !important;
        height: 16px !important;
        font-size: 8px !important;
        top: 3px !important;
        left: 3px !important;
    }
    
    body.dark-theme .theme-toggle-slider {
        transform: translateX(24px) !important;
    }
    
    .user-menu-toggle {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .user-menu-content {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        min-width: 180px;
    }
    
    .user-menu-content.show {
        transform: translateX(-50%) translateY(0);
    }
    
    section {
        padding: 25px 20px;
    }
    
    .hero h2 {
        font-size: 24px;
    }
    
    .server-info {
        padding: 15px;
        width: 100%;
    }
    
    .server-info p {
        font-size: 16px;
    }
    
    .ip {
        display: inline-block;
        word-break: break-all;
        font-size: 14px;
    }
    
    .support-form {
        padding: 0;
    }
    
    .support-section h2,
    .faq-section h2 {
        font-size: 24px;
    }
    
    form input,
    form select,
    form textarea {
        font-size: 16px;
        padding: 14px;
    }
    
    form button {
        padding: 16px;
        font-size: 16px;
    }
    
    .faq-item {
        padding: 15px;
    }
    
    .faq-item h4 {
        font-size: 16px;
    }
    
    .donate-options {
        grid-template-columns: 1fr;
    }
    
    .donate-card.featured {
        transform: scale(1);
    }
    
    .rule-item {
        flex-direction: column;
        padding: 15px;
    }
    
    .rule-number {
        font-size: 20px;
    }
    
    .discord-support {
        padding: 30px 20px;
    }
    
    .discord-support h3 {
        font-size: 22px;
    }
    
    .discord-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 900px;
    }
    
    header .container {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    header h1 {
        font-size: 20px;
        flex: 0 0 auto;
        order: 1;
    }
    
    nav {
        order: 2;
        flex: 1;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    nav a {
        font-size: 14px;
        padding: 8px 14px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 5px;
    }
    
    .user-menu {
        order: 4;
    }
    
    #login-link {
        order: 4;
        font-size: 14px;
        padding: 8px 14px;
    }
    
    .user-menu-toggle {
        font-size: 14px;
        padding: 8px 14px;
    }
    
    .theme-toggle {
        order: 5;
        width: 50px;
        height: 26px;
    }
    
    .theme-toggle-slider {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }
    
    body.dark-theme .theme-toggle-slider {
        transform: translateX(24px);
    }
    
    .hero h2 {
        font-size: 28px;
    }
    
    .server-info p {
        font-size: 17px;
    }
    
    section {
        padding: 35px;
    }
    
    .donate-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .donate-card.featured {
        grid-column: span 2;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-card.full-width {
        grid-column: 1 / -1;
    }
    
    .users-table {
        font-size: 14px;
    }
    
    .application-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .requests-stats {
        flex-wrap: nowrap;
    }
    
    .applications-stats {
        flex-wrap: nowrap;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    header {
        padding: 12px 0;
    }
    
    header h1 {
        font-size: 16px;
    }
    
    nav a {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    #login-link,
    .user-menu-toggle {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .theme-toggle {
        width: 50px !important;
        height: 26px !important;
        border-radius: 20px !important;
    }
    
    .theme-toggle-slider {
        width: 16px !important;
        height: 16px !important;
        font-size: 8px !important;
        top: 3px !important;
        left: 3px !important;
    }
    
    body.dark-theme .theme-toggle-slider {
        transform: translateX(24px) !important;
    }
    
    main {
        padding: 20px 10px;
    }
    
    section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .hero h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .server-info {
        padding: 12px;
    }
    
    .server-info p {
        font-size: 14px;
        margin: 8px 0;
    }
    
    .ip {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .support-section h2,
    .faq-section h2,
    .rules-section h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .support-form h3,
    .faq h3 {
        font-size: 18px;
    }
    
    .faq-item h4 {
        font-size: 15px;
    }
    
    .faq-item p {
        font-size: 14px;
    }
    
    .discord-support {
        padding: 25px 15px;
    }
    
    .discord-icon {
        font-size: 48px;
    }
    
    .discord-support h3 {
        font-size: 20px;
    }
    
    .discord-support p {
        font-size: 14px;
    }
    
    .discord-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    .rule-category h3 {
        font-size: 20px;
    }
    
    .rule-item {
        padding: 12px;
    }
    
    .rule-number {
        font-size: 18px;
    }
    
    .rule-content h4 {
        font-size: 16px;
    }
    
    .rule-content p {
        font-size: 14px;
    }
    
    footer {
        font-size: 13px;
        padding: 15px 0;
    }
    
    .user-menu-content {
        min-width: 160px;
        padding: 8px;
    }
    
    .user-menu-content a,
    .user-menu-content button {
        padding: 8px 12px;
        font-size: 13px;
    }
}


.chat-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.chat-intro {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

body.dark-theme .chat-intro {
    color: #b0b0b0;
}

.chat-widget-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    min-height: 600px;
}

body.dark-theme .chat-widget-container {
    background: #0f3460;
}

widgetbot {
    display: block;
    border-radius: 15px;
}

.discord-embed-container {
    background: #2c2f33;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    padding: 10px;
}

.discord-embed-container iframe {
    border-radius: 10px;
}

.discord-direct-join {
    background: linear-gradient(135deg, #5865F2 0%, #7289DA 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    color: white;
    margin-top: 20px;
}

.discord-direct-join h3 {
    color: white;
    font-size: 22px;
    margin-bottom: 20px;
}

.chat-info {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

body.dark-theme .chat-info {
    background: rgba(0, 0, 0, 0.3);
}

.chat-info h3 {
    color: #667eea;
    margin-bottom: 20px;
}

.chat-info ol {
    margin-left: 20px;
    line-height: 2;
    color: #555;
}

body.dark-theme .chat-info ol {
    color: #b0b0b0;
}

.discord-join-box {
    background: linear-gradient(135deg, #5865F2 0%, #7289DA 100%);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    color: white;
    margin-top: 30px;
}

.discord-join-box h3 {
    color: white;
    font-size: 28px;
    margin-bottom: 15px;
}

.discord-join-box p {
    font-size: 16px;
    margin-bottom: 25px;
    opacity: 0.9;
}

.discord-btn-large {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 18px 45px;
    background: white;
    color: #5865F2;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.discord-btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.discord-icon-large {
    font-size: 32px;
}

.chat-alternative {
    margin-top: 40px;
}

.chat-alternative h3 {
    color: #667eea;
    margin-bottom: 25px;
    text-align: center;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.contact-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

body.dark-theme .contact-card {
    background: rgba(0, 0, 0, 0.3);
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.contact-card h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 20px;
}

body.dark-theme .contact-card h4 {
    color: #e0e0e0;
}

.contact-card p {
    color: #666;
    margin-bottom: 20px;
}

body.dark-theme .contact-card p {
    color: #b0b0b0;
}

.contact-link {
    display: inline-block;
    padding: 10px 25px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.contact-link:hover {
    background: #5568d3;
}


/* Плавающая кнопка чата */
.floating-chat-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0088cc 0%, #0077b5 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 136, 204, 0.4);
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.floating-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 136, 204, 0.6);
}

.floating-chat-btn svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.chat-popup {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    height: 550px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: none;
    flex-direction: column;
}

body.dark-theme .chat-popup {
    background: #1a1a2e;
}

.chat-popup.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-popup-header {
    background: linear-gradient(135deg, #0088cc 0%, #0077b5 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-popup-header h3 {
    margin: 0;
    font-size: 18px;
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-popup-body {
    padding: 25px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    display: flex;
    gap: 10px;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    background: #f0f0f0;
}

body.dark-theme .message-avatar {
    background: rgba(255, 255, 255, 0.1);
}

.user-message .message-avatar {
    background: #667eea;
}

.message-content {
    max-width: 70%;
}

.message-content p {
    background: #f0f0f0;
    padding: 10px 15px;
    border-radius: 15px;
    margin: 0 0 5px 0;
    word-wrap: break-word;
}

body.dark-theme .message-content p {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.user-message .message-content p {
    background: #667eea;
    color: white;
}

.message-time {
    font-size: 11px;
    color: #999;
    padding: 0 5px;
}

.chat-input-container {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
}

body.dark-theme .chat-input-container {
    border-top-color: #333;
}

#chatForm {
    display: flex;
    gap: 10px;
}

#chatInput {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

body.dark-theme #chatInput {
    background: rgba(255, 255, 255, 0.1);
    border-color: #333;
    color: #e0e0e0;
}

#chatInput:focus {
    border-color: #667eea;
}

.chat-send-btn {
    width: 45px;
    height: 45px;
    background: #667eea;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

.chat-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    text-decoration: none;
    color: inherit;
}

body.dark-theme .chat-option {
    background: rgba(0, 0, 0, 0.3);
}

.chat-option:hover {
    transform: translateX(5px);
    background: #e9ecef;
}

body.dark-theme .chat-option:hover {
    background: rgba(0, 0, 0, 0.5);
}

.chat-option-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.telegram-icon {
    background: linear-gradient(135deg, #0088cc 0%, #0077b5 100%);
}

.discord-icon {
    background: linear-gradient(135deg, #5865F2 0%, #7289DA 100%);
}

.chat-option-text h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

body.dark-theme .chat-option-text h4 {
    color: #e0e0e0;
}

.chat-option-text p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

body.dark-theme .chat-option-text p {
    color: #999;
}

@media (max-width: 480px) {
    .chat-popup {
        width: calc(100vw - 40px);
        right: 20px;
    }
    
    .floating-chat-btn {
        right: 20px;
        bottom: 20px;
    }
}


.telegram-chat-widget {
    min-height: 200px;
    margin-bottom: 20px;
}

.chat-divider {
    text-align: center;
    color: #999;
    font-size: 14px;
    margin: 20px 0;
    position: relative;
}

.chat-divider::before,
.chat-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: #e0e0e0;
}

body.dark-theme .chat-divider::before,
body.dark-theme .chat-divider::after {
    background: #555;
}

.chat-divider::before {
    left: 0;
}

.chat-divider::after {
    right: 0;
}


/* Авторизация */
.auth-section {
    min-height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}

.auth-container {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.auth-tab.active {
    background: var(--primary-color);
    color: white;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    margin-bottom: 25px;
    color: var(--text-color);
    text-align: center;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 14px;
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.auth-form button {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-form button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.auth-message {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    min-height: 20px;
}

/* Панель администратора */
.admin-section {
    padding: 40px 0;
}

.admin-section h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-color);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

.admin-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.admin-card.full-width {
    grid-column: 1 / -1;
}

.admin-card h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    text-align: center;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    align-items: center;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item strong {
    color: var(--primary-color);
    font-size: 18px;
}

/* Таблица пользователей */
.users-table {
    overflow-x: auto;
}

.users-table table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.users-table th {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
}

.users-table select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
}

.delete-btn {
    padding: 6px 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.delete-btn:hover {
    background: #c0392b;
}

/* Форма настроек */
#server-settings label {
    display: block;
    margin-bottom: 15px;
    color: var(--text-color);
}

#server-settings label span {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#server-settings input {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    box-sizing: border-box;
}

#server-settings button {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
}

#server-settings button:hover {
    background: var(--secondary-color);
}

/* Быстрые действия */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.action-btn:hover {
    background: var(--secondary-color);
    transform: translateX(5px);
}

/* Меню пользователя */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    position: relative;
}

.user-menu-dropdown {
    position: relative;
}

.user-menu-toggle {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
    user-select: none;
    white-space: nowrap;
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.user-menu-content {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 10px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.user-menu-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: flex !important;
}

.user-menu-content a,
.user-menu-content button {
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.3s;
    font-size: 14px;
    width: 100%;
}

.user-menu-content a:hover,
.user-menu-content button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-menu-content .admin-link {
    background: rgba(255, 215, 0, 0.2);
}

.user-menu-content .admin-link:hover {
    background: rgba(255, 215, 0, 0.3);
}

.logout-btn {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Адаптивность для админ-панели */
@media (max-width: 768px) {
    .admin-section h2 {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .admin-card {
        padding: 20px;
    }
    
    .admin-card h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    /* Статистика */
    .stat-item {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 0;
    }
    
    .stat-item span {
        font-size: 14px;
    }
    
    .stat-item strong {
        font-size: 18px;
    }
    
    /* Таблица пользователей */
    .users-table {
        font-size: 12px;
        overflow-x: auto;
        display: block;
    }
    
    .users-table table {
        min-width: 600px;
    }
    
    .users-table th,
    .users-table td {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    .users-table th {
        font-size: 11px;
    }
    
    .role-select {
        font-size: 11px;
        padding: 4px 6px;
    }
    
    .delete-user-btn {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    /* Информация о сервере */
    .server-info-admin p {
        font-size: 14px;
        margin: 8px 0;
    }
    
    /* Быстрые действия */
    .admin-action-btn {
        font-size: 13px;
        padding: 10px;
        margin-bottom: 8px;
    }
}


/* Дополнительные стили для админ-панели */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.logout-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.server-info-admin {
    color: var(--text-color);
}

.server-info-admin p {
    margin: 10px 0;
}

.admin-action-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: block;
}

.admin-action-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.02);
}

.delete-user-btn {
    padding: 6px 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.delete-user-btn:hover {
    background: #c0392b;
}

.role-select {
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: white;
    cursor: pointer;
}

body.dark-theme .role-select {
    background: rgba(0, 0, 0, 0.3);
    border-color: #555;
    color: #e0e0e0;
}

/* CSS переменные для темной темы */
:root {
    --primary-color: #667eea;
    --secondary-color: #5568d3;
    --text-color: #333;
    --bg-color: white;
    --card-bg: white;
    --border-color: #e0e0e0;
}

body.dark-theme {
    --text-color: #e0e0e0;
    --bg-color: #0f3460;
    --card-bg: #0f3460;
    --border-color: #555;
}

@media (max-width: 768px) {
    .auth-container {
        padding: 25px 20px;
        margin: 0 15px;
    }
    
    .auth-tab {
        font-size: 14px;
        padding: 10px;
    }
    
    .auth-form h2 {
        font-size: 22px;
    }
    
    .auth-form input {
        font-size: 14px;
        padding: 10px;
    }
    
    .auth-form button {
        font-size: 15px;
        padding: 12px;
    }
    
    .password-container input {
        font-size: 14px;
    }
    
    .toggle-password {
        width: 36px;
        min-width: 36px;
        max-width: 36px;
        font-size: 14px;
    }
    
    .send-code-btn {
        font-size: 14px;
        padding: 10px;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .users-table {
        font-size: 14px;
    }
    
    .users-table th,
    .users-table td {
        padding: 8px;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 10px;
    }
}


/* Страница запросов поддержки */
.requests-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.requests-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-badge {
    background: var(--card-bg);
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border: 2px solid var(--border-color);
}

.stat-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-value.new {
    color: #f39c12;
}

.stat-value.processed {
    color: #27ae60;
}

.requests-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.clear-all-btn {
    padding: 10px 20px;
    background: #e74c3c;
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.clear-all-btn:hover {
    background: #c0392b;
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.request-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.request-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.request-card.new {
    border-left: 5px solid #f39c12;
}

.request-card.processed {
    border-left: 5px solid #27ae60;
    opacity: 0.8;
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 10px;
}

.request-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.request-category {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}

.request-date {
    color: #999;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.request-status-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}

.request-status-badge.new {
    background: #fff3cd;
    color: #856404;
}

body.dark-theme .request-status-badge.new {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

.request-status-badge.processed {
    background: #d4edda;
    color: #155724;
}

body.dark-theme .request-status-badge.processed {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
}

.request-body {
    margin-bottom: 20px;
}

.request-field {
    margin-bottom: 15px;
    color: var(--text-color);
}

.request-field strong {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.request-message {
    background: rgba(0, 0, 0, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0 0 0;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

body.dark-theme .request-message {
    background: rgba(255, 255, 255, 0.05);
}

.request-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mark-processed-btn,
.mark-new-btn {
    padding: 10px 20px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.mark-processed-btn:hover {
    background: #229954;
}

.mark-new-btn {
    background: #f39c12;
}

.mark-new-btn:hover {
    background: #e67e22;
}

.delete-request-btn {
    padding: 10px 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.delete-request-btn:hover {
    background: #c0392b;
}

.no-requests {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-requests h3 {
    color: var(--text-color);
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .requests-controls {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }
    
    .requests-stats {
        justify-content: space-between;
        width: 100%;
    }
    
    .stat-badge {
        flex: 1;
        min-width: 100px;
        padding: 10px 12px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .requests-actions {
        justify-content: stretch;
        width: 100%;
    }
    
    .filter-btn,
    .clear-all-btn {
        flex: 1;
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .request-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .request-info {
        width: 100%;
    }
    
    .request-category,
    .request-date,
    .request-status-badge {
        font-size: 12px;
    }
    
    .request-field strong {
        font-size: 13px;
    }
    
    .request-field p {
        font-size: 14px;
    }
    
    .request-actions {
        width: 100%;
    }
    
    .mark-processed-btn,
    .mark-new-btn,
    .delete-request-btn {
        flex: 1;
        font-size: 12px;
        padding: 8px 12px;
    }
}


/* Страница заявок на администратора */
.apply-section {
    max-width: 800px;
    margin: 0 auto;
}

.apply-header {
    text-align: center;
    margin-bottom: 40px;
}

.apply-header h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.apply-status {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.status-badge {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
}

.status-badge.open {
    background: #d4edda;
    color: #155724;
}

body.dark-theme .status-badge.open {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
}

.status-badge.closed {
    background: #f8d7da;
    color: #721c24;
}

body.dark-theme .status-badge.closed {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.apply-info {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 2px solid var(--border-color);
}

.apply-info h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.apply-info ul {
    list-style: none;
    padding: 0;
}

.apply-info li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-color);
}

.apply-info li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
    font-size: 18px;
}

.apply-form {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.apply-form h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
}

.apply-form label {
    display: block;
    margin-bottom: 20px;
}

.apply-form label span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: bold;
}

.apply-form input,
.apply-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 14px;
    font-family: inherit;
}

.apply-form input:focus,
.apply-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.apply-form textarea {
    resize: vertical;
    min-height: 80px;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.apply-closed {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.apply-closed h3 {
    color: var(--text-color);
    margin-bottom: 15px;
}

.apply-closed p {
    color: #999;
    margin: 10px 0;
}

/* Страница управления заявками */
.applications-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.applications-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-value.pending {
    color: #f39c12;
}

.stat-value.approved {
    color: #27ae60;
}

.stat-value.rejected {
    color: #e74c3c;
}

.applications-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.toggle-status-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-status-btn.open {
    background: #e74c3c;
    color: white;
}

.toggle-status-btn.open:hover {
    background: #c0392b;
}

.toggle-status-btn.closed {
    background: #27ae60;
    color: white;
}

.toggle-status-btn.closed:hover {
    background: #229954;
}

.applications-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.application-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.application-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.application-card.pending {
    border-left: 5px solid #f39c12;
}

.application-card.approved {
    border-left: 5px solid #27ae60;
}

.application-card.rejected {
    border-left: 5px solid #e74c3c;
    opacity: 0.8;
}

.application-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 10px;
}

.application-info h3 {
    color: var(--text-color);
    margin: 0 0 5px 0;
}

.application-date {
    color: #999;
    font-size: 14px;
}

.application-status-badge {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}

.application-status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

body.dark-theme .application-status-badge.pending {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

.application-status-badge.approved {
    background: #d4edda;
    color: #155724;
}

body.dark-theme .application-status-badge.approved {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
}

.application-status-badge.rejected {
    background: #f8d7da;
    color: #721c24;
}

body.dark-theme .application-status-badge.rejected {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.application-body {
    margin-bottom: 20px;
}

.application-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.application-field {
    margin-bottom: 15px;
}

.application-field strong {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.application-field p {
    color: var(--text-color);
    margin: 0;
}

.application-text {
    background: rgba(0, 0, 0, 0.05);
    padding: 12px;
    border-radius: 8px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

body.dark-theme .application-text {
    background: rgba(255, 255, 255, 0.05);
}

.application-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.approve-btn,
.reject-btn,
.reset-btn,
.delete-app-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

.approve-btn {
    background: #27ae60;
    color: white;
}

.approve-btn:hover {
    background: #229954;
}

.reject-btn {
    background: #e74c3c;
    color: white;
}

.reject-btn:hover {
    background: #c0392b;
}

.reset-btn {
    background: #f39c12;
    color: white;
}

.reset-btn:hover {
    background: #e67e22;
}

.delete-app-btn {
    background: #95a5a6;
    color: white;
}

.delete-app-btn:hover {
    background: #7f8c8d;
}

.no-applications {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-applications h3 {
    color: var(--text-color);
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .applications-controls {
        align-items: stretch;
    }
    
    .applications-stats {
        justify-content: space-between;
        width: 100%;
    }
    
    .stat-badge {
        flex: 1;
        min-width: 120px;
        padding: 10px 12px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .applications-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-btn,
    .toggle-status-btn {
        width: 100%;
        font-size: 13px;
        padding: 10px;
    }
    
    .application-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .application-info h3 {
        font-size: 16px;
    }
    
    .application-date {
        font-size: 12px;
    }
    
    .application-grid {
        grid-template-columns: 1fr;
    }
    
    .application-field strong {
        font-size: 13px;
    }
    
    .application-field p {
        font-size: 14px;
    }
    
    .application-actions {
        width: 100%;
    }
    
    .approve-btn,
    .reject-btn,
    .reset-btn,
    .delete-app-btn {
        flex: 1;
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .apply-header h2 {
        font-size: 22px;
    }
    
    .apply-info {
        padding: 20px;
    }
    
    .apply-info h3 {
        font-size: 18px;
    }
    
    .apply-info li {
        font-size: 14px;
        padding: 8px 0 8px 25px;
    }
    
    .apply-form {
        padding: 20px;
    }
    
    .apply-form h3 {
        font-size: 18px;
    }
    
    .apply-form label span {
        font-size: 14px;
    }
    
    .apply-form input,
    .apply-form textarea {
        font-size: 14px;
        padding: 10px;
    }
    
    .submit-btn {
        font-size: 16px;
        padding: 12px;
    }
}


/* Кнопка отправки кода */
.send-code-btn {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.send-code-btn:hover {
    background: #2980b9;
}

/* Контейнер для пароля с кнопкой показа */
.password-container {
    display: flex !important;
    gap: 8px;
    width: 100%;
    margin-bottom: 15px;
    align-items: stretch;
}

.password-container input {
    flex: 1 !important;
    margin-bottom: 0 !important;
    width: 100%;
    min-width: 0;
}

.toggle-password {
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-radius: 8px;
    flex-shrink: 0;
    width: 40px !important;
    min-width: 40px;
    max-width: 40px;
}

.toggle-password:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* Кнопка обновления (иконка) */
.refresh-icon-btn {
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    color: white;
}

.refresh-icon-btn:hover {
    background: var(--secondary-color);
    transform: rotate(180deg) scale(1.05);
}

.refresh-icon-btn:active {
    transform: rotate(360deg) scale(0.95);
}

.eye-icon {
    user-select: none;
    display: block;
}


/* Принудительное скрытие контейнеров паролей до подтверждения */
#password-container-1[style*="display: none"],
#password-container-2[style*="display: none"] {
    display: none !important;
}

/* Улучшения для touch-устройств */
@media (hover: none) and (pointer: coarse) {
    /* Увеличиваем области нажатия для мобильных */
    nav a,
    button,
    .user-menu-toggle,
    #login-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .ip {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 8px 16px;
    }
    
    form input,
    form select,
    form textarea,
    form button {
        min-height: 44px;
    }
    
    .filter-btn,
    .admin-action-btn,
    .mark-processed-btn,
    .mark-new-btn,
    .delete-request-btn,
    .approve-btn,
    .reject-btn,
    .reset-btn,
    .delete-app-btn {
        min-height: 44px;
    }
    
    /* Убираем hover эффекты на touch-устройствах */
    nav a:hover,
    button:hover,
    .user-menu-toggle:hover {
        transform: none;
    }
    
    /* Добавляем active состояния для лучшей обратной связи */
    nav a:active,
    button:active,
    .user-menu-toggle:active {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 360px) {
    header h1 {
        font-size: 14px;
    }
    
    nav a {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    #login-link,
    .user-menu-toggle {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .hero h2 {
        font-size: 18px;
    }
    
    .server-info p {
        font-size: 13px;
    }
    
    .ip {
        font-size: 11px;
    }
    
    section {
        padding: 15px 10px;
    }
}


/* Мобильная версия админ-панели для телефонов */
@media (max-width: 480px) {
    .admin-section {
        padding: 20px 0;
    }
    
    .admin-section h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .admin-grid {
        gap: 15px;
    }
    
    .admin-card {
        padding: 15px;
    }
    
    .admin-card h3 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    /* Статистика */
    .stat-item {
        padding: 8px 0;
    }
    
    .stat-item span {
        font-size: 13px;
    }
    
    .stat-item strong {
        font-size: 16px;
    }
    
    /* Таблица пользователей - карточный вид */
    .users-table table {
        min-width: 100%;
    }
    
    .users-table thead {
        display: none;
    }
    
    .users-table tbody {
        display: block;
    }
    
    .users-table tr {
        display: block;
        margin-bottom: 15px;
        padding: 12px;
        background: rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        border: 1px solid var(--border-color);
    }
    
    body.dark-theme .users-table tr {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .users-table td {
        display: block;
        padding: 6px 0;
        border: none;
        text-align: left;
        font-size: 13px;
    }
    
    .users-table td::before {
        content: attr(data-label);
        font-weight: bold;
        display: inline-block;
        width: 120px;
        color: var(--primary-color);
    }
    
    .role-select {
        width: 100%;
        max-width: 200px;
        padding: 6px 10px;
        font-size: 13px;
        margin-top: 5px;
    }
    
    .delete-user-btn {
        width: 100%;
        max-width: 200px;
        padding: 8px 12px;
        font-size: 13px;
        margin-top: 5px;
    }
    
    /* Информация о сервере */
    .server-info-admin {
        font-size: 13px;
    }
    
    .server-info-admin p {
        font-size: 13px;
        margin: 6px 0;
    }
    
    /* Быстрые действия */
    .admin-action-btn {
        font-size: 14px;
        padding: 12px;
        margin-bottom: 10px;
    }
}

/* Планшетная версия админ-панели */
@media (min-width: 769px) and (max-width: 1024px) {
    .admin-section h2 {
        font-size: 26px;
    }
    
    .admin-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .admin-card.full-width {
        grid-column: 1 / -1;
    }
    
    .admin-card {
        padding: 25px;
    }
    
    .admin-card h3 {
        font-size: 18px;
    }
    
    .stat-item {
        padding: 10px 0;
    }
    
    .stat-item span {
        font-size: 15px;
    }
    
    .stat-item strong {
        font-size: 20px;
    }
    
    .users-table {
        font-size: 13px;
    }
    
    .users-table th,
    .users-table td {
        padding: 10px 8px;
    }
    
    .role-select {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .delete-user-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .admin-action-btn {
        font-size: 14px;
        padding: 12px;
    }
}

/* Очень маленькие экраны для админ-панели */
@media (max-width: 360px) {
    .admin-section h2 {
        font-size: 18px;
    }
    
    .admin-card {
        padding: 12px;
    }
    
    .admin-card h3 {
        font-size: 14px;
    }
    
    .stat-item span {
        font-size: 12px;
    }
    
    .stat-item strong {
        font-size: 14px;
    }
    
    .users-table td {
        font-size: 12px;
    }
    
    .users-table td::before {
        width: 100px;
        font-size: 11px;
    }
    
    .admin-action-btn {
        font-size: 13px;
        padding: 10px;
    }
}


/* Страница "О нас" */
.about-section {
    max-width: 900px;
    margin: 0 auto;
}

.about-section h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.about-block {
    background: rgba(0, 0, 0, 0.05);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-theme .about-block {
    background: rgba(255, 255, 255, 0.05);
}

.about-block:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.about-block h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 22px;
}

.about-block p {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 10px;
}

.about-block ul {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.about-block li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-color);
    font-size: 16px;
}

.about-block li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 18px;
}

/* Редактор в админ-панели */
.editor-info {
    background: rgba(52, 152, 219, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #3498db;
}

.editor-info p {
    margin: 0;
    color: var(--text-color);
    font-size: 14px;
}

#about-editor-textarea {
    font-family: 'Courier New', monospace;
    line-height: 1.6;
}

#about-preview-content {
    margin-top: 15px;
}

#about-preview-content .about-block {
    margin-bottom: 20px;
}

/* Адаптивность для страницы "О нас" */
@media (max-width: 768px) {
    .about-section h2 {
        font-size: 26px;
        margin-bottom: 30px;
    }
    
    .about-block {
        padding: 20px;
    }
    
    .about-block h3 {
        font-size: 20px;
    }
    
    .about-block p,
    .about-block li {
        font-size: 15px;
    }
    
    #about-editor-textarea {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .about-section h2 {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    .about-block {
        padding: 15px;
    }
    
    .about-block h3 {
        font-size: 18px;
    }
    
    .about-block p,
    .about-block li {
        font-size: 14px;
    }
    
    .editor-info {
        padding: 12px;
    }
    
    .editor-info p {
        font-size: 13px;
    }
}


/* Бейджи ролей */
.role-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

.role-badge.role-owner {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.role-badge.role-admin {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.role-badge.role-user {
    background: rgba(149, 165, 166, 0.2);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

/* Адаптивность для бейджей */
@media (max-width: 480px) {
    .role-badge {
        font-size: 11px;
        padding: 4px 8px;
    }
}


/* Панель инструментов редактора */
.editor-toolbar {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

body.dark-theme .editor-toolbar {
    background: rgba(255, 255, 255, 0.05);
}

.toolbar-btn {
    padding: 8px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
    min-width: 40px;
}

.toolbar-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.toolbar-btn:active {
    transform: translateY(0);
}

.toolbar-separator {
    display: inline-block;
    width: 1px;
    height: 30px;
    background: var(--border-color);
    margin: 0 5px;
    align-self: center;
}

/* Адаптивность для панели инструментов */
@media (max-width: 768px) {
    .editor-toolbar {
        padding: 8px;
        gap: 4px;
    }
    
    .toolbar-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 35px;
    }
    
    .toolbar-separator {
        height: 25px;
    }
}

@media (max-width: 480px) {
    .editor-toolbar {
        padding: 6px;
        gap: 3px;
    }
    
    .toolbar-btn {
        padding: 5px 8px;
        font-size: 12px;
        min-width: 30px;
    }
    
    .toolbar-separator {
        height: 20px;
        margin: 0 3px;
    }
}


/* Рейтинг игроков */
.leaderboard-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.leaderboard-intro {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

body.dark-theme .leaderboard-intro {
    background: rgba(0, 0, 0, 0.3);
    color: #b0b0b0;
}

/* Вкладки категорий */
.leaderboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.leaderboard-tab {
    padding: 12px 24px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    font-weight: bold;
}

.leaderboard-tab:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.leaderboard-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Таблица рейтинга */
.leaderboard-table {
    overflow-x: auto;
    margin-bottom: 30px;
}

.leaderboard-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.leaderboard-table th {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
}

.leaderboard-table tr:hover {
    background: rgba(102, 126, 234, 0.1);
}

.player-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    image-rendering: pixelated;
}

.edit-player-btn {
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.edit-player-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* Редактор рейтинга */
.leaderboard-editor {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
    border: 2px solid var(--border-color);
}

.leaderboard-editor h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
}

.leaderboard-editor label {
    display: block;
    margin-bottom: 20px;
}

.leaderboard-editor label span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: bold;
}

.leaderboard-editor input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 14px;
}

.leaderboard-editor input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Галерея */
.gallery-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.gallery-intro {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

body.dark-theme .gallery-intro {
    background: rgba(0, 0, 0, 0.3);
    color: #b0b0b0;
}

.owner-controls {
    text-align: center;
    margin-bottom: 30px;
}

.user-controls {
    text-align: center;
    margin-bottom: 30px;
}

.gallery-editor {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    border: 2px solid var(--border-color);
}

.gallery-editor h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
}

.gallery-editor label {
    display: block;
    margin-bottom: 20px;
}

.gallery-editor label > span:first-child {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: bold;
}

.gallery-editor label > span:first-child span {
    display: inline;
}

.gallery-editor input,
.gallery-editor textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 14px;
    font-family: inherit;
}

.gallery-editor input:focus,
.gallery-editor textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.gallery-editor textarea {
    resize: vertical;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.gallery-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f0f0f0;
}

body.dark-theme .gallery-image-wrapper {
    background: #1a1a2e;
}

.image-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.gallery-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-card:hover .gallery-image-wrapper img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.view-image-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
}

.view-image-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.gallery-info {
    padding: 20px;
}

.gallery-info h4 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 18px;
}

.gallery-info p {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.5;
}

body.dark-theme .gallery-info p {
    color: #b0b0b0;
}

.gallery-author {
    display: inline-block;
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
}

.empty-gallery {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-gallery h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 24px;
}

.empty-gallery p {
    font-size: 16px;
}

/* Модальное окно галереи */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gallery-modal-content {
    position: relative;
    max-width: 1200px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.gallery-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.gallery-modal-content img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: #000;
}

/* Слайдер изображений */
.gallery-slider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.slider-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: var(--card-bg);
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s;
}

.slider-dot:hover {
    background: #999;
    transform: scale(1.2);
}

.slider-dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

.add-url-btn,
.remove-url-btn {
    flex: 1;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

.add-url-btn:hover,
.remove-url-btn:hover {
    background: var(--secondary-color);
}

.remove-url-btn {
    background: #95a5a6;
}

.remove-url-btn:hover {
    background: #7f8c8d;
}

.gallery-modal-info {
    padding: 30px;
}

.gallery-modal-info h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 24px;
}

.gallery-modal-info p {
    color: #666;
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.6;
}

body.dark-theme .gallery-modal-info p {
    color: #b0b0b0;
}

.gallery-modal-actions {
    display: flex;
    gap: 10px;
    margin: 0 30px 30px;
}

.edit-image-btn,
.delete-image-btn {
    flex: 1;
    padding: 12px 24px;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
}

.edit-image-btn {
    background: var(--primary-color);
}

.edit-image-btn:hover {
    background: var(--secondary-color);
}

.delete-image-btn {
    background: #e74c3c;
}

.delete-image-btn:hover {
    background: #c0392b;
}

/* Адаптивность для галереи */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .gallery-image-wrapper {
        height: 200px;
    }
    
    .gallery-info {
        padding: 15px;
    }
    
    .gallery-info h4 {
        font-size: 16px;
    }
    
    .gallery-info p {
        font-size: 13px;
    }
    
    .gallery-modal-content {
        max-width: 100%;
    }
    
    .gallery-modal-content img {
        max-height: 50vh;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
    
    .slider-dot {
        width: 10px;
        height: 10px;
    }
    
    .gallery-modal-info {
        padding: 20px;
    }
    
    .gallery-modal-info h3 {
        font-size: 20px;
    }
    
    .gallery-modal-info p {
        font-size: 14px;
    }
    
    .gallery-editor {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-section h2 {
        font-size: 22px;
    }
    
    .gallery-intro {
        font-size: 16px;
        padding: 12px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-image-wrapper {
        height: 180px;
    }
    
    .view-image-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .gallery-modal {
        padding: 10px;
    }
    
    .gallery-modal-close {
        width: 40px;
        height: 40px;
        font-size: 30px;
        top: 10px;
        right: 10px;
    }
    
    .gallery-modal-content img {
        max-height: 40vh;
    }
    
    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .prev-btn {
        left: 5px;
    }
    
    .next-btn {
        right: 5px;
    }
    
    .slider-indicators {
        padding: 10px;
        gap: 8px;
    }
    
    .slider-dot {
        width: 8px;
        height: 8px;
    }
    
    .add-url-btn,
    .remove-url-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .gallery-modal-info {
        padding: 15px;
    }
    
    .gallery-modal-info h3 {
        font-size: 18px;
    }
    
    .gallery-modal-info p {
        font-size: 13px;
    }
    
    .delete-image-btn {
        margin: 0 15px 15px;
        width: calc(100% - 30px);
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .empty-gallery {
        padding: 60px 20px;
    }
    
    .empty-gallery h3 {
        font-size: 20px;
    }
    
    .empty-gallery p {
        font-size: 14px;
    }
}

/* Адаптивность для рейтинга */
@media (max-width: 768px) {
    .leaderboard-tabs {
        gap: 8px;
    }
    
    .leaderboard-tab {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .leaderboard-table {
        font-size: 14px;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 10px 8px;
    }
    
    .player-cell {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .leaderboard-editor {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .leaderboard-section h2 {
        font-size: 22px;
    }
    
    .leaderboard-intro {
        font-size: 16px;
        padding: 12px;
    }
    
    .leaderboard-tabs {
        gap: 6px;
    }
    
    .leaderboard-tab {
        padding: 8px 12px;
        font-size: 12px;
        flex: 1;
        min-width: 100px;
    }
    
    /* Таблица в карточки на мобильных */
    .leaderboard-table table,
    .leaderboard-table thead,
    .leaderboard-table tbody,
    .leaderboard-table tr,
    .leaderboard-table th,
    .leaderboard-table td {
        display: block;
    }
    
    .leaderboard-table thead {
        display: none;
    }
    
    .leaderboard-table tr {
        margin-bottom: 15px;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        padding: 15px;
        background: var(--card-bg);
    }
    
    .leaderboard-table td {
        padding: 8px 0;
        border: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .leaderboard-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--primary-color);
    }
    
    .player-cell {
        flex-direction: row;
        justify-content: flex-end;
    }
    
    .edit-player-btn {
        width: 100%;
        margin-top: 10px;
    }
}


/* Страница "Команда" */
.team-section {
    max-width: 1200px;
    margin: 0 auto;
}

.team-section h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
}

.team-intro {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
}

body.dark-theme .team-intro {
    background: rgba(255, 255, 255, 0.05);
}

.team-intro p {
    font-size: 18px;
    color: var(--text-color);
    line-height: 1.6;
}

.team-category {
    margin-bottom: 50px;
    width: 100%;
}

.team-category h3 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    width: 100%;
}

.team-member {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

body.dark-theme .team-member {
    background: rgba(255, 255, 255, 0.05);
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.member-avatar {
    font-size: 48px;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
}

body.dark-theme .member-avatar {
    background: rgba(255, 255, 255, 0.1);
}

.member-info {
    flex: 1;
    text-align: left;
}

.member-name {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 8px;
}

.member-role {
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.member-description {
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.6;
}

.team-join {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    margin-top: 50px;
}

.team-join h3 {
    color: white;
    font-size: 26px;
    margin-bottom: 15px;
}

.team-join p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 25px;
}

.join-team-btn {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.join-team-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Адаптивность для страницы команды */
@media (max-width: 768px) {
    .team-section h2 {
        font-size: 26px;
        margin-bottom: 30px;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .team-category h3 {
        font-size: 20px;
    }
    
    .team-member {
        flex-direction: column;
        text-align: center;
    }
    
    .member-info {
        text-align: center;
    }
    
    .team-join {
        padding: 30px 20px;
    }
    
    .team-join h3 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .team-section h2 {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    .team-intro p {
        font-size: 16px;
    }
    
    .member-avatar {
        font-size: 40px;
        width: 70px;
        height: 70px;
    }
    
    .member-name {
        font-size: 18px;
    }
    
    .team-member {
        padding: 20px;
    }
}
