* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.5;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

h1 {
    text-align: center;
    padding: 20px;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

.input-box {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

#usernameInput {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: monospace;
    resize: vertical;
    margin-bottom: 10px;
}

#usernameInput:focus {
    outline: none;
    border-color: #007acc;
}

.file-btn {
    display: inline-block;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
}

.file-btn:hover {
    background: #e9ecef;
}

.controls {
    padding: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    border-bottom: 1px solid #eee;
}

.btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn:hover {
    background: #f8f9fa;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn.primary {
    background: #007acc;
    color: white;
    border-color: #007acc;
}

.btn.primary:hover:not(:disabled) {
    background: #0066b3;
}

.btn.success {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.btn.success:hover {
    background: #218838;
}

.progress {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: #007acc;
    width: 0%;
    transition: width 0.3s ease;
}

#progressText {
    font-size: 13px;
    color: #666;
}

.stats {
    padding: 15px 20px;
    display: flex;
    gap: 20px;
    font-size: 13px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

.stats span {
    color: #666;
}

.stats .valid strong { color: #28a745; }
.stats .taken strong { color: #6c757d; }
.stats .censored strong { color: #dc3545; }
.stats .error strong { color: #fd7e14; }

.results-section {
    min-height: 200px;
}

.results-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 10px;
}

.filters {
    display: flex;
    gap: 5px;
}

.filter {
    padding: 4px 8px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
}

.filter.active,
.filter:hover {
    background: #007acc;
    color: white;
    border-color: #007acc;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.page-btn {
    padding: 4px 8px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.page-btn:hover:not(:disabled) {
    background: #f8f9fa;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.results {
    max-height: 400px;
    overflow-y: auto;
}

.no-results {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
}

.result-item:hover {
    background: #f8f9fa;
}

.result-item:last-child {
    border-bottom: none;
}

.username {
    font-family: monospace;
    font-weight: 500;
}

.status {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status.valid {
    background: #d4edda;
    color: #155724;
}

.status.taken {
    background: #e2e3e5;
    color: #383d41;
}

.status.censored {
    background: #f8d7da;
    color: #721c24;
}

.status.error {
    background: #fff3cd;
    color: #856404;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 4px;
    }
    
    h1 {
        font-size: 1.3rem;
        padding: 15px;
    }
    
    .input-box,
    .controls,
    .progress,
    .stats {
        padding: 15px;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .stats {
        gap: 15px;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters {
        justify-content: center;
    }
    
    .pagination {
        justify-content: center;
    }
}

/* Scrollbar styling */
.results::-webkit-scrollbar {
    width: 6px;
}

.results::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.results::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.results::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}