/**
 * CS 1.6 Web Panel - Ana Stil Dosyası
 */

/* --- Temel Ayarlar --- */
:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #1a1f3a;
    --bg-tertiary: #252b4a;
    --text-primary: #ffffff;
    --text-secondary: #a0a8c0;
    --accent-primary: #4CAF50;
    --accent-secondary: #2196F3;
    --accent-danger: #f44336;
    --accent-warning: #ff9800;
    --border-color: #3a4266;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* --- Login Sayfası --- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1f3a 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 60px;
    margin-bottom: 10px;
}

.login-header h2 {
    font-size: 24px;
    color: var(--accent-primary);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-form {
    margin-bottom: 20px;
}

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 5px;
}

/* --- Ana Layout --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-toggle {
    display: none;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.sidebar-header h1 {
    font-size: 20px;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header .version {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-nav-item.active {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
}

.sidebar-nav-item .icon {
    width: 24px;
    margin-right: 10px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 20px;
    transition: margin-left 0.3s ease;
}

/* --- Header --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.header h1 {
    font-size: 24px;
}

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

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

.header-info .user .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* --- Cards --- */
.card {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 18px;
    color: var(--accent-primary);
}

.card-header h3 {
    font-size: 16px;
    color: var(--text-primary);
}

.card-body {
    padding: 0;
}

/* --- Grid System --- */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* --- Stats Cards --- */
.stat-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-primary);
}

.stat-card.danger::before {
    background: var(--accent-danger);
}

.stat-card.warning::before {
    background: var(--accent-warning);
}

.stat-card.info::before {
    background: var(--accent-secondary);
}

.stat-card .icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-card .label {
    color: var(--text-secondary);
    font-size: 14px;
}

/* --- Tables --- */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
}

table tr:hover {
    background: var(--bg-tertiary);
}

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

/* --- Forms --- */
.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a0a8c0' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    gap: 8px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: var(--accent-secondary);
    color: white;
}

.btn-secondary:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(76, 175, 80, 0.2);
    color: var(--accent-primary);
}

.badge-danger {
    background: rgba(244, 67, 54, 0.2);
    color: var(--accent-danger);
}

.badge-warning {
    background: rgba(255, 152, 0, 0.2);
    color: var(--accent-warning);
}

.badge-info {
    background: rgba(33, 150, 243, 0.2);
    color: var(--accent-secondary);
}

/* --- Alerts --- */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.alert-danger {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--accent-danger);
    color: var(--accent-danger);
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid var(--accent-warning);
    color: var(--accent-warning);
}

.alert-info {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid var(--accent-secondary);
    color: var(--accent-secondary);
}

/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 20px;
    color: var(--accent-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--accent-danger);
}

.modal-body {
    padding: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* --- Loading Spinner --- */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--accent-primary);
}

.toast.error {
    border-left: 4px solid var(--accent-danger);
}

.toast.warning {
    border-left: 4px solid var(--accent-warning);
}

.toast.info {
    border-left: 4px solid var(--accent-secondary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- Responsive Design --- */
@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block !important;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .card-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* --- Utility Classes --- */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }
.gap-3 { gap: 30px; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* --- Animations --- */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* --- Server Status Indicator --- */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-online {
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.status-offline {
    background: var(--accent-danger);
    box-shadow: 0 0 10px var(--accent-danger);
}

.status-loading {
    background: var(--accent-warning);
    box-shadow: 0 0 10px var(--accent-warning);
    animation: pulse 1s infinite;
}

/* --- Player List --- */
.player-list {
    display: grid;
    gap: 10px;
}

.player-item {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
}

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

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.player-name {
    font-weight: 600;
}

.player-stats {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.player-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}
