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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    color: #666;
    font-size: 1.1em;
}

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

#urlInput {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: monospace;
    resize: vertical;
    margin-bottom: 20px;
}

#urlInput:focus {
    outline: none;
    border-color: #667eea;
}

.options-section {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-label span {
    user-select: none;
}

.recursive-options {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.option-group {
    margin-bottom: 15px;
}

.option-group label {
    display: inline-block;
    width: 120px;
    font-weight: 600;
    color: #555;
}

.option-group input[type="number"] {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    width: 100px;
}

.option-group input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
}

.help-text {
    display: block;
    margin-left: 120px;
    margin-top: 5px;
    font-size: 13px;
    color: #888;
}

.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

.status-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.status-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.spinner-small {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

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

.status-text {
    flex: 1;
}

.status-message {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.status-details {
    font-size: 14px;
    opacity: 0.9;
}

.hidden {
    display: none;
}

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

.results-section h2 {
    color: #333;
    margin-bottom: 10px;
}

.result-count {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 16px;
}

.table-wrapper {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

thead {
    background: #667eea;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
}

tr:hover {
    background: #f8f9ff;
}

td a {
    color: #667eea;
    text-decoration: none;
    word-break: break-all;
}

td a:hover {
    text-decoration: underline;
}

.new-row {
    animation: highlightRow 0.5s ease;
}

@keyframes highlightRow {
    0% {
        background: #d4edda;
    }
    100% {
        background: white;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 10px;
    }

    .option-group label {
        display: block;
        width: 100%;
        margin-bottom: 5px;
    }

    .help-text {
        margin-left: 0;
    }

    .status-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
