* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 10px;
}

header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

main {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.input-section {
    margin-bottom: 30px;
}

.input-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #34495e;
}

#urlInput {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: border-color 0.3s;
}

#urlInput:focus {
    outline: none;
    border-color: #3498db;
}

.primary-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.primary-button:hover {
    background: #2980b9;
}

.primary-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.options-section {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.options-section label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #7f8c8d;
}

.options-section input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.progress-section {
    margin: 30px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: #3498db;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #7f8c8d;
}

.results-section {
    margin-top: 30px;
}

.results-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-item {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    background: #f8f9fa;
}

.summary-item.success {
    background: #d4edda;
    color: #155724;
}

.summary-item.warning {
    background: #fff3cd;
    color: #856404;
}

.summary-item.error {
    background: #f8d7da;
    color: #721c24;
}

.summary-item .count {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.summary-item .label {
    font-size: 0.9rem;
    text-transform: uppercase;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-button {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-button:hover {
    background: #f8f9fa;
}

.filter-button.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.links-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
}

.link-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

.link-item:last-child {
    border-bottom: none;
}

.link-item:hover {
    background: #f8f9fa;
}

.link-item.hidden {
    display: none;
}

.status-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-icon.success {
    background: #27ae60;
}

.status-icon.warning {
    background: #f39c12;
}

.status-icon.error {
    background: #e74c3c;
}

.link-details {
    flex: 1;
    min-width: 0;
}

.link-url {
    color: #3498db;
    text-decoration: none;
    word-break: break-all;
    display: block;
    margin-bottom: 4px;
}

.link-url:hover {
    text-decoration: underline;
}

.link-status {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.link-type {
    font-size: 0.75rem;
    background: #ecf0f1;
    padding: 2px 8px;
    border-radius: 4px;
    color: #7f8c8d;
}

.export-button {
    margin-top: 20px;
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.export-button:hover {
    background: #229954;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: #7f8c8d;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    main {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .summary {
        grid-template-columns: 1fr;
    }
    
    .options-section {
        flex-direction: column;
        gap: 15px;
    }
}