/* ===== Server Detail Page Styles ===== */
.server-hero {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    padding: 3rem 1.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.server-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.server-hero-content {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.server-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #94a3b8;
}

.server-breadcrumb a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.server-breadcrumb a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.breadcrumb-separator {
    opacity: 0.5;
}

.server-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: #f1f5f9;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.server-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 600px;
    opacity: 0.9;
}

/* ===== Server Overview ===== */
.server-overview {
    padding: 2rem 1.5rem;
}

.overview-container {
    max-width: 1400px;
    margin: 0 auto;
}

.overview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.server-identity {
    flex: 1;
    min-width: 300px;
}

.server-name {
    font-size: 1.75rem;
    color: #f1f5f9;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.server-status-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.server-status-badge {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.server-status-badge.status-online {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.server-status-badge.status-offline {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.server-ip-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
}

.ip-label {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 500;
}

.server-ip {
    font-family: 'SF Mono', monospace;
    color: #7dd3fc;
    font-size: 0.9375rem;
    font-weight: 500;
}

.server-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-button:hover {
    background: rgba(30, 41, 59, 1);
    border-color: rgba(100, 116, 139, 0.4);
    transform: translateY(-1px);
}

.action-button.secondary {
    background: rgba(30, 41, 59, 0.4);
}

.action-button.secondary:hover {
    background: rgba(30, 41, 59, 0.6);
}

.action-icon {
    font-size: 1.125rem;
    line-height: 1;
}

/* ===== Overview Grid ===== */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.overview-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(100, 116, 139, 0.3);
}

.overview-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.overview-card-title {
    font-size: 1.25rem;
    color: #f1f5f9;
    font-weight: 600;
    margin: 0;
}

.live-badge,
.history-badge,
.motd-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.live-badge {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.history-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.motd-badge {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.overview-card-body {
    padding: 1.5rem;
}

/* ===== Status Metrics ===== */
.status-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.metric {
    text-align: center;
}

.metric-label {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.players-metric {
    color: #4ade80;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.metric-separator {
    color: #94a3b8;
    font-weight: 400;
}

.version-metric {
    color: #f1f5f9;
    font-family: 'SF Mono', monospace;
    font-size: 1.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metric-description {
    font-size: 0.75rem;
    color: #94a3b8;
    opacity: 0.8;
}

/* ===== Timeline Metrics ===== */
.timeline-metrics {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.timeline-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.timeline-content {
    flex: 1;
}

.timeline-label {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.timeline-value {
    font-size: 1rem;
    color: #f1f5f9;
    font-weight: 600;
}

/* ===== MOTD Card ===== */
.motd-card .overview-card-body {
    padding: 1.5rem;
}

.motd-content {
    margin-bottom: 1.5rem;
}

.motd-text {
    color: #e2e8f0;
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    font-family: 'SF Mono', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.motd-metadata {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8125rem;
    color: #94a3b8;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* ===== Analytics Section ===== */
.analytics-section {
    padding: 2rem 1.5rem 3rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.4) 0%, rgba(30, 41, 59, 0.2) 100%);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.analytics-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    color: #f1f5f9;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* ===== Analytics Grid ===== */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.analytics-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.analytics-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(100, 116, 139, 0.3);
}

.analytics-card.wide-card {
    grid-column: 1 / -1;
}

.analytics-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.analytics-card-title {
    font-size: 1.25rem;
    color: #f1f5f9;
    font-weight: 600;
    margin: 0;
}

.time-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-range-label {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 500;
}

.uptime-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.uptime-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.analytics-card-body {
    padding: 1.5rem;
}

/* ===== Graph Placeholder ===== */
.graph-placeholder {
    margin-bottom: 1.5rem;
}

.graph-container {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    min-height: 300px;
}

.graph-title {
    font-size: 1rem;
    color: #f1f5f9;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.graph-axis {
    display: flex;
    height: 200px;
}

.y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-right: 1rem;
    margin-right: 1rem;
    border-right: 1px solid rgba(148, 163, 184, 0.2);
    min-width: 60px;
}

.y-axis span {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: right;
}

.graph-bars {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 0.5rem;
    padding-bottom: 2rem;
    position: relative;
}

.no-data-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #94a3b8;
    font-size: 0.875rem;
    text-align: center;
}

.graph-bar {
    flex: 1;
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 4px 4px 0 0;
    position: relative;
    min-width: 30px;
    max-width: 60px;
    transition: height 0.3s ease;
}

.graph-bar:hover {
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
}

.bar-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #f1f5f9;
    font-weight: 600;
    white-space: nowrap;
}

.x-axis {
    position: absolute;
    bottom: 0;
    left: 60px;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.x-axis span {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 2px;
}

.graph-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.graph-stat {
    text-align: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.no-data-stat {
    text-align: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
    border: 1px dashed rgba(148, 163, 184, 0.3);
}

.stat-label {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
}

/* ===== Uptime Metrics ===== */
.uptime-metrics {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.uptime-main {
    text-align: center;
}

.uptime-percentage {
    margin-bottom: 1rem;
}

.percentage-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #22c55e;
    display: block;
    line-height: 1;
}

.percentage-label {
    font-size: 1rem;
    color: #94a3b8;
    display: block;
    margin-top: 0.5rem;
}

.uptime-gauge {
    height: 12px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.gauge-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(148, 163, 184, 0.1);
}

.gauge-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.uptime-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.uptime-detail {
    text-align: center;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.detail-label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #f1f5f9;
}

/* ===== Data Export ===== */
.data-export {
    padding: 2rem 1.5rem;
}

.export-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.4) 100%);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
}

.export-footnote {
    padding-top: 0.5rem;
}

.export-footnote p {
    color: #94a3b8;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.export-footnote strong {
    color: #cbd5e1;
    font-weight: 600;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .overview-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .server-actions {
        justify-content: center;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .graph-axis {
        height: 180px;
    }
    
    .graph-bar {
        min-width: 25px;
        max-width: 45px;
    }
    
    .x-axis {
        left: 50px;
    }
    
    .server-status-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .server-ip-display {
        width: 100%;
        justify-content: space-between;
    }
    
    .x-axis span {
        font-size: 0.7rem;
        padding: 0 1px;
    }
}

@media (max-width: 480px) {
    .server-hero {
        padding: 2rem 1rem 1.5rem;
    }
    
    .server-overview,
    .analytics-section,
    .data-export {
        padding: 1.5rem 1rem;
    }
    
    .overview-card-header,
    .analytics-card-header {
        padding: 1.25rem 1.25rem 0.75rem;
    }
    
    .overview-card-body,
    .analytics-card-body {
        padding: 1.25rem;
    }
    
    .server-title {
        font-size: 1.75rem;
    }
    
    .server-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .export-container {
        padding: 1rem;
    }
    
    .graph-container {
        padding: 1rem;
        min-height: 250px;
    }
    
    .y-axis {
        min-width: 45px;
    }
    
    .x-axis {
        left: 45px;
    }
    
    .graph-bar {
        min-width: 20px;
        max-width: 35px;
    }
    
    .x-axis span {
        font-size: 0.65rem;
        transform: rotate(45deg);
        transform-origin: left top;
        margin-top: 5px;
        text-align: left;
    }
}

/* ===== Print Styles ===== */
@media print {
    .server-actions {
        display: none;
    }
    
    .server-hero {
        background: white !important;
        border-bottom: 2px solid #e2e8f0 !important;
    }
    
    .server-title {
        color: #1e293b !important;
        background: none !important;
        -webkit-text-fill-color: #1e293b !important;
    }
    
    .server-subtitle,
    .section-subtitle {
        color: #475569 !important;
    }
    
    .overview-card,
    .analytics-card,
    .export-container {
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        break-inside: avoid;
    }
    
    .server-name,
    .overview-card-title,
    .analytics-card-title {
        color: #1e293b !important;
    }
    
    .graph-container {
        background: white !important;
        border: 1px solid #e2e8f0 !important;
    }
    
    .graph-bar {
        background: #3b82f6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .gauge-fill {
        background: #22c55e !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}