* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    background-attachment: fixed;
    min-height: 100vh;
    color: #4a5568;
    padding: 2rem;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 1px;
    color: #2d3748;
}

.crawler-form {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group.controls {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.form-group.controls > div {
    flex: 1;
}

input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    transition: all 0.3s;
    color: #4a5568;
}

input:focus {
    outline: none;
    border-color: #718096;
    box-shadow: 0 0 0 2px rgba(113, 128, 150, 0.2);
}

button, .button {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    background: #4a5568;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

button:hover, .button:hover {
    background: #2d3748;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.results {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    min-height: 100px;
}

.results-tabs {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
    background: transparent;
    color: #4a5568;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    border-radius: 4px 4px 0 0;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    width: auto;
}

.tab-btn:hover {
    background: rgba(226, 232, 240, 0.5);
    box-shadow: none;
}

.tab-btn.active {
    background: white;
    color: #2d3748;
    border-bottom: 2px solid #4a5568;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.results-table-container {
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 600px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    font-size: 1rem;
}

.results-table th, .results-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e2e8f0;
}

.results-table th {
    background: #f5f7fa;
    color: #2d3748;
    font-weight: 600;
    font-size: 1.05rem;
    border-bottom: 2px solid #c3cfe2;
    position: sticky;
    top: 0;
    z-index: 1;
}

.results-table tr:nth-child(even) {
    background: #f7fafc;
}

.results-table tr:nth-child(odd) {
    background: #fff;
}

.cell-url, .cell-title {
    max-width: 340px;
    word-break: break-all;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .results-table, .results-table th, .results-table td {
        font-size: 0.95rem;
    }
    .cell-url, .cell-title {
        max-width: 180px;
    }
}

@media (max-width: 600px) {
    .results-table-container {
        padding: 0.5rem 0.1rem;
    }
    .results-table th, .results-table td {
        padding: 0.5rem 0.3rem;
    }
    .cell-url, .cell-title {
        max-width: 100px;
    }
}

.results td.good {
    color: #38a169;
    font-weight: 500;
}

.results td.bad {
    color: #e53e3e;
    font-weight: 500;
}

.empty-results {
    text-align: center;
    padding: 2rem;
    color: #718096;
}

.actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.actions button, .actions .button {
    width: auto;
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
}

.spinner-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.htmx-indicator {
    display: none;
    text-align: center;
}

.spinner {
    border: 3px solid rgba(74, 85, 104, 0.2);
    border-radius: 50%;
    border-top: 3px solid #4a5568;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.crawl-info {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.crawl-info h2 {
    color: #2d3748;
    font-weight: 500;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.page-count {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 0.5rem;
}

.error {
    color: #e53e3e;
    padding: 1rem;
    background: #fff5f5;
    border-radius: 4px;
    border-left: 3px solid #e53e3e;
}

.download-info {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.download-info a {
    color: #4a5568;
    text-decoration: underline;
}

.download-info a:hover {
    color: #2d3748;
}

/* Responsive table for small screens */
@media (max-width: 768px) {
    .form-group.controls {
        flex-direction: column;
    }

    .results table {
        display: block;
        overflow-x: auto;
    }
} 