/**
 * KingSage Flaga - Stylowanie inspirowane grą
 * @author Darek & Hania 💕
 */

/* Reset i podstawy */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: linear-gradient(45deg, #8b4513, #cd853f);
    border: 3px solid #daa520;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 10px;
}

.header p {
    font-size: 1.2em;
    color: #f4f4f4;
    margin-bottom: 20px;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(0,0,0,0.3);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #daa520;
    font-weight: bold;
}

.stat-item i {
    color: #ffd700;
    margin-right: 8px;
}

/* Filtry */
.filters {
    background: linear-gradient(45deg, #2c3e50, #3498db);
    border: 2px solid #3498db;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: bold;
    color: #ecf0f1;
    font-size: 0.9em;
}

.filter-group select {
    padding: 8px 12px;
    border: 2px solid #34495e;
    border-radius: 6px;
    background: #2c3e50;
    color: #ecf0f1;
    font-size: 0.95em;
    min-width: 120px;
}

.filter-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.btn-refresh {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-left: auto;
}

.btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Tabela */
.table-container {
    background: linear-gradient(45deg, #34495e, #2c3e50);
    border: 3px solid #95a5a6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    overflow-x: auto;
}

.attacks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.attacks-table th {
    background: linear-gradient(45deg, #8b4513, #cd853f);
    color: #ffd700;
    padding: 15px 10px;
    text-align: left;
    border: 2px solid #daa520;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.attacks-table td {
    padding: 12px 10px;
    border: 1px solid #7f8c8d;
    background: rgba(52, 73, 94, 0.7);
    transition: background-color 0.3s ease;
}

.attacks-table tr:hover td {
    background: rgba(52, 152, 219, 0.2);
}

/* Status kolorowanie */
.status-active {
    color: #e74c3c !important;
    font-weight: bold;
}

.status-cancelled {
    color: #95a5a6 !important;
    text-decoration: line-through;
}

.status-completed {
    color: #2ecc71 !important;
    font-weight: bold;
}

/* Współrzędne */
.coords {
    font-family: 'Courier New', monospace;
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* Czas pozostały */
.time-remaining {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #f39c12;
}

.time-critical {
    color: #e74c3c !important;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Loading */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2em;
    color: #3498db;
}

.loading i {
    font-size: 2em;
    margin-bottom: 15px;
    display: block;
}

/* No data */
.no-data {
    text-align: center;
    padding: 50px;
    color: #95a5a6;
}

.no-data i {
    font-size: 4em;
    margin-bottom: 20px;
    display: block;
    color: #2ecc71;
}

/* Statystyki */
.stats-container {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    border: 2px solid #27ae60;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.stats-container h3 {
    color: #ecf0f1;
    margin-bottom: 15px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-card {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.stat-card h4 {
    color: #ecf0f1;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.stat-card .stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #ffd700;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: #bdc3c7;
    border-top: 1px solid #34495e;
    margin-top: 40px;
}

/* Responsywność */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .btn-refresh {
        margin-left: 0;
        width: 100%;
    }
    
    .attacks-table {
        font-size: 0.8em;
    }
    
    .attacks-table th,
    .attacks-table td {
        padding: 8px 5px;
    }
    
    .header-stats {
        gap: 15px;
    }
    
    .stat-item {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .attacks-table th,
    .attacks-table td {
        padding: 6px 3px;
        font-size: 0.75em;
    }
    
    .coords {
        font-size: 0.7em;
    }
}

/* Dodatkowe efekty */
.table-container:hover {
    border-color: #3498db;
    transition: border-color 0.3s ease;
}

.attacks-table th i {
    margin-right: 5px;
}

/* Tooltip style (jeśli będziemy dodawać) */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    border: 1px solid #34495e;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
}
