/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: #ffd700;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Status Card */
.status-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-icon {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.status-icon.online {
    color: #28a745;
    animation: pulse 2s infinite;
}

.status-icon.offline {
    color: #dc3545;
}

.status-icon.checking {
    color: #ffc107;
    animation: spin 1s linear infinite;
}

.refresh-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.4);
}

/* Main Content */
.main-content {
    display: grid;
    gap: 25px;
}

.card-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.card-section:hover {
    transform: translateY(-5px);
}

.card-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
}

.card-section h2 i {
    color: #007bff;
}

/* Input Groups */
.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.input-group input,
.input-group textarea {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 150px;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.input-group textarea {
    resize: vertical;
    min-height: 80px;
}

.check-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.check-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40,167,69,0.4);
}

.check-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* File Input Styling */
input[type="file"] {
    padding: 10px;
    border: 2px dashed #007bff;
    border-radius: 10px;
    background: rgba(0,123,255,0.05);
    cursor: pointer;
}

input[type="file"]:hover {
    background: rgba(0,123,255,0.1);
}

/* Bulk Info */
.bulk-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.bulk-info p {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

.bulk-info p:last-child {
    margin-bottom: 0;
}

/* Result Areas */
.result-area {
    min-height: 50px;
    padding: 15px;
    border-radius: 10px;
    background: #f8f9fa;
    border-left: 4px solid #dee2e6;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-all;
}

.result-area:empty {
    display: none;
}

/* Mini Loading Indicator */
.mini-loading {
    color: #007bff;
    font-style: italic;
    text-align: center;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 10px;
    border-left: 4px solid #007bff;
    font-size: 0.9rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.mini-loading::before {
    content: "🔄 ";
    margin-right: 8px;
}

/* Summary Section */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.summary-item {
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    color: white;
    transition: transform 0.3s ease;
}

.summary-item:hover {
    transform: translateY(-5px);
}

.summary-item.live {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.summary-item.dead {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

.summary-item.unknown {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.summary-item.error {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.summary-item i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.summary-item .count {
    font-size: 2rem;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.summary-item .label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Download Button */
.download-btn {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(111,66,193,0.4);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
}

.footer p {
    margin-bottom: 5px;
}

#apiUrl {
    font-family: 'Courier New', monospace;
    background: rgba(255,255,255,0.1);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .input-group input,
    .input-group textarea {
        min-width: auto;
    }
    
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .status-card {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .card-section {
        padding: 20px;
    }
}
