/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    color: #ffffff;
    min-height: 100vh;
    padding-bottom: 80px;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.nav-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5em;
    font-weight: bold;
    color: #ed542b;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #aaa;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Flash Messages */
.flash-messages {
    max-width: 1800px;
    margin: 0 auto 20px;
    padding: 0 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.5);
    color: #4caf50;
}

.alert-error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.5);
    color: #f44336;
}

.alert-info {
    background: rgba(33, 150, 243, 0.2);
    border: 1px solid rgba(33, 150, 243, 0.5);
    color: #2196f3;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0 10px;
}

/* Header */
header {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

h1 {
    font-size: 3em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ed542b 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2em;
    color: #aaa;
    margin-bottom: 10px;
}

.timestamp {
    color: #888;
    font-size: 0.9em;
    margin-top: 10px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #ed542b;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sections */
.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.8em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: #ed542b;
}

/* Chart Container */
.chart-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1em;
}

.btn-primary {
    background: linear-gradient(135deg, #ed542b 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(237, 84, 43, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.4);
}

/* Cards */
.welcome-card, .action-card, .status-card, .info-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-card h2, .action-card h2, .status-card h2, .info-section h2 {
    color: #ed542b;
    margin-bottom: 15px;
}

.welcome-card p, .action-card p, .status-card p, .info-section p {
    color: #ccc;
    margin-bottom: 20px;
}

.info-section ul {
    color: #ccc;
    margin-left: 20px;
    line-height: 1.8;
}

.server-status {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.server-status h3 {
    color: #ed542b;
    margin-bottom: 10px;
}

.server-status ul {
    list-style: none;
    padding-left: 0;
}

.server-status li {
    padding: 5px 0;
    color: #aaa;
}

.status-info p {
    margin-bottom: 10px;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 500;
}

.badge-success {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.badge-error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.badge-info {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    color: #f44336;
}

.info-text {
    color: #888;
    font-size: 0.9em;
    margin-top: 10px;
}

/* Settings Page */
.settings-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 1200px) {
    .settings-container {
        grid-template-columns: 1fr 1fr;
    }
}

.settings-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.form-card h3 {
    color: #ed542b;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1em;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ed542b;
    box-shadow: 0 0 0 3px rgba(237, 84, 43, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.85em;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
    transform: scale(1.2);
}

.checkbox-group small {
    margin-left: 32px;
}

.server-list {
    margin-bottom: 20px;
}

.server-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.server-info h3 {
    color: #ed542b;
    margin-bottom: 5px;
}

.server-info p {
    color: #aaa;
    font-size: 0.9em;
}

.server-meta {
    color: #888 !important;
    font-size: 0.85em !important;
}

.import-section {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.import-section h3 {
    color: #ed542b;
    margin-bottom: 10px;
}

.import-section p {
    color: #ccc;
    margin-bottom: 15px;
}

.info-message {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.3);
    padding: 15px;
    border-radius: 8px;
    color: #2196f3;
    margin-bottom: 20px;
}

/* DataTables Styling */
.table-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
}

table.dataTable {
    width: 100% !important;
    margin: 0 !important;
    color: #fff !important;
    background: transparent !important;
}

table.dataTable thead th {
    background: rgba(237, 84, 43, 0.2) !important;
    color: #ed542b !important;
    border-bottom: 2px solid #ed542b !important;
    padding: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

table.dataTable tbody td {
    padding: 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #ccc !important;
}

/* Date column - prevent wrapping */
table.dataTable tbody td:first-child,
table.dataTable thead th:first-child {
    min-width: 110px !important;
    white-space: nowrap !important;
}

table.dataTable tbody tr {
    background: rgba(255, 255, 255, 0.02) !important;
}

table.dataTable tbody tr:hover {
    background: rgba(237, 84, 43, 0.1) !important;
}

table.dataTable tbody tr.odd {
    background: rgba(255, 255, 255, 0.03) !important;
}

table.dataTable tbody tr.odd:hover {
    background: rgba(237, 84, 43, 0.1) !important;
}

/* DataTables Controls */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: #ccc !important;
    margin-bottom: 15px;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    margin-left: 8px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: #ed542b !important;
    box-shadow: 0 0 0 3px rgba(237, 84, 43, 0.1);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ccc !important;
    padding: 6px 12px !important;
    margin: 0 4px !important;
    border-radius: 6px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(237, 84, 43, 0.2) !important;
    border-color: #ed542b !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #ed542b 0%, #764ba2 100%) !important;
    border-color: #ed542b !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 0.9em;
    margin-top: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .server-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}
