/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main content */
main {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Check form */
.check-form {
    margin-bottom: 40px;
}

.input-group {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

#ipInput {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#ipInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#checkButton {
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 120px;
}

#checkButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#checkButton:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Results */
.results {
    margin-bottom: 40px;
}

.results h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.blacklist-result {
    background: #f8f9fa;
    border-left: 4px solid #dee2e6;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
}

.blacklist-result.listed {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.blacklist-result.clean {
    border-left-color: #28a745;
    background: #f8fff8;
}

.blacklist-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.blacklist-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.blacklist-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-listed {
    background: #dc3545;
    color: white;
}

.status-clean {
    background: #28a745;
    color: white;
}

.status-error {
    background: #ffc107;
    color: #333;
}

.response-code {
    margin-top: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #666;
    background: #f1f3f4;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Recent checks */
.recent-checks h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.recent-check-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: background-color 0.2s ease;
}

.recent-check-item:hover {
    background: #f1f3f4;
}

.check-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ip {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #333;
}

.timestamp {
    color: #666;
    font-size: 0.9rem;
}

.check-summary {
    margin-top: 8px;
}

.status-good {
    color: #28a745;
    font-weight: 500;
}

.status-bad {
    color: #dc3545;
    font-weight: 500;
}

.no-checks {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Error styling */
.error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Loading animation */
.loader {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .check-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}