/* Shards Page Styles */

.shards-hero {
    padding: calc(100px + var(--space-lg)) 0 var(--space-md);
    text-align: center;
}

.shards-header {
    margin-bottom: var(--space-md);
}

.shards-header h1 {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
}

/* Status Legend */
.status-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: var(--space-sm);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--silver);
}

.legend-item .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-item.online .dot {
    background: #2ecc71;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.legend-item.connecting .dot {
    background: #f39c12;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
    animation: pulse 1.5s ease-in-out infinite;
}

.legend-item.offline .dot {
    background: #e74c3c;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Summary Stats Pills */
.shard-stats-summary {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(33, 38, 45, 0.8);
    border: 1px solid rgba(201, 169, 98, 0.2);
    border-radius: 30px;
    padding: 0.5rem 1.5rem;
    width: fit-content;
    margin: 0 auto var(--space-sm);
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
}

.stat-icon {
    font-size: 1rem;
}

.stat-icon.online { color: #2ecc71; }
.stat-icon.connecting { color: #f39c12; }
.stat-icon.offline { color: #e74c3c; }

/* Ping Stats */
.ping-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: var(--space-sm);
    color: var(--silver);
    font-size: 0.9rem;
}

.ping-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
}

.ping-badge.low {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.ping-badge.high {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

/* Info Box */
.shard-info-box {
    background: rgba(33, 38, 45, 0.6);
    border: 1px solid rgba(201, 169, 98, 0.15);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 0 auto var(--space-sm);
    max-width: 600px;
    text-align: left;
}

.shard-info-box h3 {
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 0.75rem;
    text-align: center;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--silver);
}

.info-item i {
    color: var(--gold);
    width: 20px;
}

.info-item strong {
    color: var(--white);
}

/* Search */
.shard-search {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: var(--space-sm);
}

.shard-search input {
    padding: 0.6rem 1rem;
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: 8px;
    background: rgba(33, 38, 45, 0.8);
    color: var(--white);
    width: 250px;
    font-size: 0.9rem;
}

.shard-search input:focus {
    outline: none;
    border-color: var(--gold);
}

.shard-search button {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    background: var(--gold);
    color: var(--midnight);
    cursor: pointer;
    transition: all 0.3s ease;
}

.shard-search button:hover {
    background: var(--gold-dim);
}

/* Shards Grid Section */
.shards-grid-section {
    padding: var(--space-md) 0 var(--space-xl);
}

.shards-frame {
    background: rgba(33, 38, 45, 0.4);
    border: 2px solid rgba(201, 169, 98, 0.2);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
}

.shards-frame::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(201, 169, 98, 0.1);
    border-radius: 15px;
    pointer-events: none;
}

.shards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    min-height: 200px;
}

/* Shard Box */
.shard-box {
    position: relative;
    aspect-ratio: 1;
    background: rgba(33, 38, 45, 0.8);
    border: 2px solid rgba(46, 204, 113, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shard-box.online {
    border-color: rgba(46, 204, 113, 0.4);
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.1);
}

.shard-box.connecting {
    border-color: rgba(243, 156, 18, 0.4);
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.1);
    animation: pulse-border 2s ease-in-out infinite;
}

.shard-box.offline {
    border-color: rgba(231, 76, 60, 0.4);
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.1);
    opacity: 0.6;
}

.shard-box.highlighted {
    border-color: var(--gold);
    box-shadow: 0 0 25px rgba(201, 169, 98, 0.5);
    transform: scale(1.05);
}

@keyframes pulse-border {
    0%, 100% { border-color: rgba(243, 156, 18, 0.4); }
    50% { border-color: rgba(243, 156, 18, 0.8); }
}

.shard-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    font-family: 'Cormorant Garamond', serif;
}

.shard-box.online .shard-number { color: #2ecc71; }
.shard-box.connecting .shard-number { color: #f39c12; }
.shard-box.offline .shard-number { color: #e74c3c; }

/* Hover Info */
.shard-info-hover {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--slate);
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 0.8rem;
    text-align: left;
    color: var(--silver);
}

.shard-info-hover strong {
    color: var(--white);
}

.shard-box:hover .shard-info-hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

/* Loading and Error States */
.loading-state,
.error-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--silver);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(201, 169, 98, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-state i {
    font-size: 2rem;
    color: #e74c3c;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .shards-header h1 {
        font-size: 2rem;
    }
    
    .status-legend {
        gap: 1rem;
    }
    
    .ping-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .shards-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 0.75rem;
    }
    
    .shard-number {
        font-size: 1.2rem;
    }
    
    .shards-frame {
        padding: 1rem;
    }
}
