/* 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: 1200px;
    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;
}

/* Cards Row - Side by side layout */
.cards-row {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.cards-row .card {
    margin-bottom: 0;
}

.cards-row .card-left {
    flex: 5 1 0; /* 5 parts out of 8 (62.5%) */
    min-width: 0; /* Allow shrinking */
}

.cards-row .card-right {
    flex: 3 1 0; /* 3 parts out of 8 (37.5%) */
    min-width: 0; /* Allow shrinking */
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .cards-row {
        flex-direction: column;
    }
    
    .cards-row .card-left,
    .cards-row .card-right {
        flex: 1 1 100%;
    }
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

/* Domain list */
.domain-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.domain-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.domain-info {
    flex: 1;
}

.domain-url {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.domain-meta {
    color: #6c757d;
    font-size: 0.9rem;
}

.domain-actions {
    display: flex;
    gap: 10px;
}

/* Changes list */
.change-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #28a745;
}

.change-item.removed {
    border-left-color: #dc3545;
}

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

.change-domain {
    font-weight: 600;
    color: #2c3e50;
}

.change-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.change-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.stat.added {
    background: #d4edda;
    color: #155724;
}

.stat.removed {
    background: #f8d7da;
    color: #721c24;
}

.change-urls {
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border-radius: 6px;
    padding: 15px;
}

.change-urls h4 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1rem;
}

.url-list {
    list-style: none;
}

.url-list li {
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

.url-list li:last-child {
    border-bottom: none;
}

.url-list li.added {
    color: #28a745;
}

.url-list li.removed {
    color: #dc3545;
}

/* Status badges for removed URLs */
.status-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    vertical-align: middle;
}

.status-404 {
    background-color: #e74c3c;
    color: white;
}

.status-200 {
    background-color: #27ae60;
    color: white;
}

.status-redirect {
    background-color: #f39c12;
    color: white;
}

.status-4xx {
    background-color: #e67e22;
    color: white;
}

.status-5xx {
    background-color: #c0392b;
    color: white;
}

.status-timeout {
    background-color: #95a5a6;
    color: white;
}

.status-unknown {
    background-color: #bdc3c7;
    color: #2c3e50;
}

.status-other {
    background-color: #3498db;
    color: white;
}

/* Loading states */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .domain-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .domain-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .change-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .change-stats {
        flex-direction: column;
        gap: 10px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

