* {
    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, #002366 0%, #D36339 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    color: white;
    margin-bottom: 30px;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-content > div:first-child {
    flex: 1;
    text-align: center;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
}

.control-panel {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    height: fit-content;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

textarea, input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

textarea:focus, input[type="number"]:focus {
    outline: none;
    border-color: #4CAF50;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

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

.checkbox-label span {
    font-size: 0.95rem;
    color: #555;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.btn-primary, .btn-secondary, .btn-clear {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #f44336;
    color: white;
}

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

.btn-clear {
    background: #9e9e9e;
    color: white;
}

.btn-clear:hover {
    background: #757575;
}

.excel-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.btn-excel-template,
.btn-excel-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
}

.btn-excel-template {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.btn-excel-template:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.5);
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
}

.btn-excel-upload {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-excel-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
}

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

.btn-export {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.5);
}

.results-panel {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

.results-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.results-header h2 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.stats {
    display: flex;
    gap: 30px;
    font-size: 1.1rem;
    color: #666;
    align-items: center;
}

.stats.has-data {
    font-size: 1.4rem;
    font-weight: 700;
}

.stats span {
    font-weight: 700;
    color: #4CAF50;
    font-size: 1.8rem;
    min-width: 40px;
    text-align: center;
}

.stats.has-data span {
    font-size: 2.2rem;
    color: #2e7d32;
}

.progress-section {
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.progress-info {
    margin-bottom: 10px;
}

.progress-stats {
    font-size: 1rem;
    font-weight: 600;
    color: #4CAF50;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}


.results-content {
    flex: 1;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.site-result {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
}

.site-result h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    word-break: break-all;
}

.site-result .site-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.emails-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.email-item {
    padding: 10px 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.email-item:hover {
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.email-item .email {
    font-weight: 500;
    color: #333;
}

.email-item .copy-btn {
    padding: 5px 12px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.email-item .copy-btn:hover {
    background: #1976D2;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 400px;
    word-wrap: break-word;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-info {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.toast-success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.toast-error {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.toast-warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}
