:root {
    --primary: #4CAF50;
    --secondary: #008CBA;
    --accent: #FF5733;
    --bg-light: #f9f9f9;
    --text-dark: #333;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --error: #e74c3c;
}

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

body {
    font-family: 'Vazir', sans-serif;
    background: linear-gradient(135deg, #e0eafc, #cfdef3);
    min-height: 100vh;
    padding: 2rem;
    color: var(--text-dark);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.url-section {
    position: relative;
    margin-bottom: 1.5rem;
}

#urlInput {
    width: 100%;
    padding: 1rem 4rem 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    background: var(--bg-light);
    font-size: 1rem;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

#urlInput:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    background: #fff;
}

.url-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.url-icon:hover {
    transform: translateY(-50%) scale(1.1);
}

#configFile, #configInput {
    width: 100%;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    background: var(--bg-light);
}

#configInput {
    min-height: 150px;
    resize: vertical;
}

button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin: 0.5rem 0;
}

button.primary {
    background: var(--primary);
    color: #fff;
}

button.secondary {
    background: var(--secondary);
    color: #fff;
}

button.accent {
    background: var(--accent);
    color: #fff;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

#progress-container {
    width: 100%;
    background: #ddd;
    border-radius: 20px;
    height: 20px;
    margin: 1.5rem 0;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
}

#status {
    margin: 1rem 0;
    font-size: 0.9rem;
    text-align: center;
}

.log-section {
    margin: 1rem 0;
    display: none;
}

#log-toggle {
    background: #6c757d;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    margin-bottom: 0.5rem;
}

#log-container {
    max-height: 200px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: var(--bg-light);
    font-size: 0.9rem;
}

.log-item.error {
    color: var(--error);
}

#output-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: var(--bg-light);
    margin: 1.5rem 0;
}

.config-item {
    margin: 0.5rem 0;
    word-break: break-all;
    font-size: 0.9rem;
}

.country-filter {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    display: none;
}

#country-select {
    flex: 1;
    padding: 0.8rem;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: var(--bg-light);
    font-size: 1rem;
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    h1 {
        font-size: 1.8rem;
    }
}