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

/* Стили для скроллбаров */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #2c2c2c;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
    border: 1px solid #404040;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}

::-webkit-scrollbar-thumb:active {
    background: #777;
}

::-webkit-scrollbar-corner {
    background: #2c2c2c;
}

/* Для Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #555 #2c2c2c;
}

body {
    font-family: Arial, sans-serif;
    overflow: hidden;
    background-color: #3c3c3c;
    color: #e0e0e0;
}

.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

.sidebar {
    width: 350px;
    background-color: #282828;
    border-right: 2px solid #404040;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    z-index: 100;
}

.sidebar h2 {
    margin-bottom: 15px;
    color: #ffffff;
    border-bottom: 2px solid #404040;
    padding-bottom: 10px;
    font-size: 18px;
}

.nav-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 25px;
}

.nav-btn {
    padding: 12px 15px;
    background-color: #343434;
    border: 1px solid #404040;
    border-radius: 6px;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: left;
}

.nav-btn:hover {
    background-color: #383838;
    border-color: #555;
}

.nav-btn.active {
    background-color: #4CAF50;
    border-color: #45a049;
    color: white;
}

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 25px;
}

.quick-link {
    padding: 10px 12px;
    background-color: #343434;
    border: 1px solid #404040;
    border-radius: 6px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: left;
}

.quick-link:hover {
    background-color: #383838;
    border-color: #555;
    transform: translateX(5px);
}

.auth-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #343434;
    border-radius: 8px;
    border: 1px solid #404040;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid #4CAF50;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: bold;
    color: #ffffff;
    font-size: 14px;
}

.user-steamid {
    font-size: 12px;
    color: #b0b0b0;
}

.user-role {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 2px;
}

.user-role.admin {
    background-color: #4CAF50;
    color: white;
}

.user-role.user {
    background-color: #6c757d;
    color: white;
}

.control-btn {
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    background-color: #4CAF50;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.control-btn:hover {
    background-color: #45a049;
}

.control-btn.secondary {
    background-color: #6c757d;
}

.control-btn.secondary:hover {
    background-color: #5a6268;
}

.server-stats {
    padding: 15px;
    background: #343434;
    border-radius: 8px;
    border: 1px solid #404040;
}

.server-stats h3 {
    margin-bottom: 15px;
    color: #ffffff;
    font-size: 16px;
    border-bottom: 1px solid #404040;
    padding-bottom: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 5px 0;
}

.stat-label {
    color: #b0b0b0;
    font-size: 14px;
}

.stat-value {
    color: #ffffff;
    font-weight: bold;
    font-size: 14px;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #2a2a2a;
    overflow-y: auto;
}

.content-header {
    padding: 30px 40px;
    background: linear-gradient(135deg, #343434 0%, #2a2a2a 100%);
    border-bottom: 2px solid #404040;
    text-align: center;
}

.content-header h1 {
    color: #ffffff;
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: bold;
}

.subtitle {
    color: #b0b0b0;
    font-size: 18px;
}

.servers-container {
    padding: 30px 40px;
    flex: 1;
}

.servers-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.server-item {
    background: #343434;
    border: 1px solid #404040;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.server-item:hover {
    border-color: #555;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.server-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s ease;
}

.server-header:hover {
    background-color: #383838;
}

.server-header.active {
    background-color: #2e7d32;
}

.server-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.server-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.server-details {
    flex: 1;
}

.server-name {
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-online {
    background-color: #4CAF50;
}

.status-offline {
    background-color: #f44336;
}

.status-text {
    color: #b0b0b0;
}

.server-players {
    background: #2c2c2c;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 14px;
    color: #ffffff;
    font-weight: bold;
}

.server-arrow {
    font-size: 20px;
    color: #b0b0b0;
    transition: transform 0.3s ease;
}

.server-arrow.rotated {
    transform: rotate(180deg);
}

.server-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #2c2c2c;
}

.server-content.expanded {
    padding: 20px;
    max-height: 500px;
}

.server-description {
    color: #b0b0b0;
    margin-bottom: 15px;
    line-height: 1.5;
}

.server-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.spec-item {
    background: #343434;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #404040;
}

.spec-label {
    color: #b0b0b0;
    font-size: 12px;
    margin-bottom: 5px;
}

.spec-value {
    color: #ffffff;
    font-weight: bold;
    font-size: 14px;
}

.players-list {
    margin-top: 15px;
}

.players-title {
    color: #b0b0b0;
    font-size: 14px;
    margin-bottom: 10px;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.player-item {
    background: #343434;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #404040;
    color: #e0e0e0;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-players {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.server-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn.primary {
    background-color: #4CAF50;
    color: white;
}

.action-btn.primary:hover {
    background-color: #45a049;
}

.action-btn.secondary {
    background-color: #6c757d;
    color: white;
}

.action-btn.secondary:hover {
    background-color: #5a6268;
}

.action-btn:disabled {
    background-color: #555;
    color: #888;
    cursor: not-allowed;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 30px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    background: #343434;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: #555;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.info-card h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 1px solid #404040;
    padding-bottom: 10px;
}

.info-card p {
    color: #b0b0b0;
    margin-bottom: 8px;
    line-height: 1.4;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #b0b0b0;
}

.error-message {
    text-align: center;
    padding: 60px 20px;
    color: #f44336;
}

.error-message p {
    margin-bottom: 20px;
    font-size: 16px;
}

.btn-primary {
    padding: 12px 24px;
    background-color: #4CAF50;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #45a049;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.server-item {
    animation: fadeIn 0.5s ease;
}

/* Адаптивность */
@media (max-width: 992px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 50vh;
    }
    
    .content-header h1 {
        font-size: 28px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .servers-container {
        padding: 20px;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .server-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .server-info {
        width: 100%;
    }
    
    .server-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .server-specs {
        grid-template-columns: 1fr;
    }
    
    .players-grid {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        padding: 20px;
    }
    
    .content-header h1 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        padding: 15px;
    }
    
    .server-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .server-name {
        font-size: 16px;
    }
    
    .info-card {
        padding: 20px;
    }
}