/* Redbot Lead Scraper - Styles */

:root {
    --primary: #e74c3c;
    --primary-dark: #c0392b;
    --secondary: #3498db;
    --success: #27ae60;
    --warning: #f39c12;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --white: #ffffff;
    --gray: #95a5a6;
    --gray-light: #bdc3c7;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: var(--light);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 6px;
    background: var(--white);
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.lang-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    background: var(--white);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo-img {
    max-height: 80px;
    width: auto;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--warning));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--gray);
    font-size: 1.1rem;
}

/* Panels */
section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

section h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--light);
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: var(--gray);
    font-size: 0.85rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

select, input[type="text"], input[type="number"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

select option {
    background: var(--dark);
    color: var(--white);
}

/* Divider */
.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider span {
    background: rgba(22, 33, 62, 0.9);
    padding: 0 1rem;
    color: var(--gray);
    position: relative;
}

/* Checkboxes */
.checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Buttons */
.btn-primary, .btn-success, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.4);
}

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

.btn-success {
    background: linear-gradient(135deg, var(--success), #219a52);
    color: var(--white);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-icon {
    font-size: 1.2rem;
}

/* Progress */
.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--warning));
    border-radius: 6px;
    transition: width 0.5s ease;
}

.progress-text {
    text-align: center;
    color: var(--light);
    margin-bottom: 1.5rem;
}

.phase-indicator {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.phase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.phase.active {
    opacity: 1;
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid var(--primary);
}

.phase.completed {
    opacity: 1;
    background: rgba(39, 174, 96, 0.2);
    border: 1px solid var(--success);
}

.phase-icon {
    font-size: 1.5rem;
}

/* Results */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray-light);
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 500px) {
    .action-buttons {
        grid-template-columns: 1fr;
    }
}

/* Leads Preview Table */
.leads-preview h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.leads-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leads-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.leads-table th, .leads-table td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.leads-table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: var(--white);
}

.leads-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.leads-table td {
    color: var(--light);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
    font-size: 0.9rem;
}

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

.search-panel, .progress-panel, .results-panel {
    animation: fadeIn 0.5s ease;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

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