/* ========================================= */
/*           SERVER DETAIL STYLES            */
/* ========================================= */

/* ========================================= */
/*              MAIN CONTAINER               */
/* ========================================= */
.server-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    animation: fadeIn 0.5s ease-out;
}

/* ========================================= */
/*               HEADER SECTION              */
/* ========================================= */
.server-detail-header {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.server-detail-name {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
    font-weight: 800;
}

.server-detail-flags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.server-basic-stats {
    display: flex;
    gap: 2rem;
}

.basic-stat {
    display: flex;
    flex-direction: column;
    min-width: 100px;
}

.basic-stat .stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.basic-stat .stat-value {
    color: var(--text-primary);
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 0.25rem;
}

/* Status Indicator Colors */
.status-online {
    color: var(--accent-success);
}

.status-offline {
    color: var(--accent-danger);
}

/* ========================================= */
/*               ACTION BUTTONS              */
/* ========================================= */
.server-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 200px;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.action-btn.primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
}

.action-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ========================================= */
/*               IP COPY COMPONENT           */
/* ========================================= */
.ip-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.copy-ip-small {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-ip-small:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
}

/* ========================================= */
/*               STATS GRID                  */
/* ========================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-card-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
}

.stat-card-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* ========================================= */
/*               SECTION STYLES              */
/* ========================================= */
.stats-section {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-icon {
    font-size: 1.6rem;
}

/* ========================================= */
/*               TIME PERIOD SELECTOR        */
/* ========================================= */
.time-period-selector {
    display: flex;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.period-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.85rem;
}

.period-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.period-btn.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* ========================================= */
/*               CHART STYLES                */
/* ========================================= */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.chart-header h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.chart-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ========================================= */
/*           TECHNICAL STATS GRID            */
/* ========================================= */
.technical-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.tech-stat-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.tech-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tech-stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tech-stat-value {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
}

.tech-stat-label {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.tech-stat-status {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
}

/* ========================================= */
/*               WIPE ANALYSIS               */
/* ========================================= */
.wipe-analysis {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.wipe-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.wipe-stat {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.wipe-stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--accent-primary);
}

.wipe-stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================= */
/*           CONNECTION DETAILS              */
/* ========================================= */
.connection-details {
    display: grid;
    gap: 1rem;
}

.connection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.connection-item .label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

.connection-item .value {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.connection-item .link {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.connection-item .link:hover {
    text-decoration: underline;
    color: var(--accent-secondary);
}

/* ========================================= */
/*               WIPE HISTORY                */
/* ========================================= */
.wipe-history-list {
    display: grid;
    gap: 0.5rem;
}

.wipe-entry {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    align-items: center;
    transition: all 0.2s ease;
}

.wipe-entry:hover {
    background: var(--bg-tertiary);
}

.wipe-date {
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.wipe-type {
    color: var(--accent-primary);
    font-size: 0.9rem;
    text-transform: capitalize;
}

.wipe-ago {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: right;
}

/* ========================================= */
/*               ANIMATIONS                  */
/* ========================================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================= */
/*           RESPONSIVE DESIGN               */
/* ========================================= */
@media (max-width: 768px) {
    .server-detail-header {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .server-basic-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .connection-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .ip-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .wipe-entry {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .technical-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .time-period-selector {
        flex-wrap: wrap;
    }
    
    .server-actions {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid,
    .technical-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .time-period-selector {
        width: 100%;
    }
}

.tech-stat-error {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.tech-stat-value.failed {
    color: #ff6b6b !important;
    font-weight: bold;
}

.chart-container.failed::after {
    content: "⚠️ Data not available";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff6b6b;
    font-weight: bold;
}