/* ===================================
   DeseoRank Client Questionnaire Styles
   Complete Brand Identity Implementation
   🟣 Purple/Indigo Primary | 🟡 Amber/Yellow Accent
   =================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* DeseoRank Brand Gradients */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    
    /* Primary Colors */
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --primary-light: #8b9aff;
    --accent-color: #fbbf24;
    --accent-dark: #f59e0b;
    
    /* Dark Theme (Default) */
    --bg-body: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-input: #252538;
    --bg-hover: #2d2d42;
    --text-primary: #ffffff;
    --text-secondary: #b8b8d1;
    --text-muted: #8888a8;
    --border-color: #3a3a52;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --glow-primary: 0 0 24px rgba(102, 126, 234, 0.4);
    --glow-accent: 0 0 24px rgba(251, 191, 36, 0.4);
    
    /* Success & Error */
    --success-color: #10b981;
    --error-color: #ef4444;
}

/* Light Theme */
[data-theme="light"] {
    --bg-body: #f8f9fc;
    --bg-card: #ffffff;
    --bg-input: #f3f4f8;
    --bg-hover: #e8e9f0;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-muted: #7a7a98;
    --border-color: #e0e0f0;
    --shadow-sm: 0 2px 8px rgba(102, 126, 234, 0.08);
    --shadow-md: 0 4px 16px rgba(102, 126, 234, 0.12);
    --shadow-lg: 0 8px 32px rgba(102, 126, 234, 0.16);
    --glow-primary: 0 0 24px rgba(102, 126, 234, 0.2);
    --glow-accent: 0 0 24px rgba(251, 191, 36, 0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 8px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--glow-primary);
}

/* Header */
.form-header {
    text-align: center;
    padding: 50px 30px;
    margin-bottom: 30px;
    background: var(--primary-gradient);
    border-radius: 24px;
    box-shadow: var(--shadow-lg), var(--glow-primary);
    position: relative;
    overflow: hidden;
}

.form-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="white" stroke-opacity="0.05" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.logo {
    position: relative;
    z-index: 1;
}

.logo h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: 3px;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo h1 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.5));
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: white;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1.2rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.intro-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 6px;
    background: var(--bg-card);
    border-radius: 10px;
    margin-bottom: 40px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--glow-accent);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Form Sections */
.form-section {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: none;
    animation: fadeInUp 0.5s ease;
}

.form-section.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid;
    border-image: var(--primary-gradient) 1;
}

.section-header i {
    font-size: 2.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.3));
}

.section-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Form Groups */
.form-group {
    margin-bottom: 28px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.required {
    color: var(--error-color);
    margin-left: 4px;
    font-weight: 700;
}

/* Input Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), var(--glow-primary);
    transform: translateY(-1px);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

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

/* Radio & Checkbox Styles */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
}

.radio-label:hover,
.checkbox-label:hover {
    border-color: var(--primary-color);
    background: var(--bg-hover);
    transform: translateX(4px);
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.radio-label:has(input:checked),
.checkbox-label:has(input:checked) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

.radio-label:has(input:checked)::before,
.checkbox-label:has(input:checked)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-gradient);
    border-radius: 12px 0 0 12px;
}

/* Social Media Inputs */
.social-input-group {
    margin-bottom: 18px;
}

.social-input-group .checkbox-label {
    margin-bottom: 10px;
}

.social-input-group .checkbox-label i {
    font-size: 1.3rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.social-url {
    margin-left: 0;
    margin-top: 10px;
}

/* Conditional Inputs */
.conditional-input {
    margin-top: 14px;
}

/* Help Text */
.help-text {
    display: block;
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

.description-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
    margin-bottom: 14px;
    line-height: 1.7;
    padding: 12px;
    background: var(--bg-input);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

/* Consent Checkbox */
.consent-check {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid var(--primary-color);
    padding: 18px;
    font-weight: 600;
    box-shadow: var(--glow-primary);
}

/* Buttons */
.btn {
    padding: 16px 36px;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--accent-gradient);
    color: #1a1a2e;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
    padding: 18px 48px;
    font-size: 1.15rem;
}

.btn-success:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 35px rgba(251, 191, 36, 0.6);
}

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

.btn > * {
    position: relative;
    z-index: 1;
}

/* Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-top: 50px;
    padding: 24px 0;
}

/* Success Message */
.success-message {
    background: var(--bg-card);
    padding: 70px 50px;
    border-radius: 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 3px solid;
    border-image: var(--accent-gradient) 1;
    animation: fadeInUp 0.5s ease;
}

.success-message i {
    font-size: 5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 30px rgba(251, 191, 36, 0.5));
    animation: bounce 1s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.success-message h2 {
    font-size: 2.5rem;
    margin-bottom: 18px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.success-message p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Footer */
.form-footer {
    background: var(--primary-gradient);
    padding: 40px 30px;
    border-radius: 20px;
    margin-top: 50px;
    text-align: center;
    box-shadow: var(--shadow-lg), var(--glow-primary);
    position: relative;
    overflow: hidden;
}

.form-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="white" stroke-opacity="0.05" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.2;
}

.footer-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-contact p {
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 500;
}

.footer-contact i {
    font-size: 1.2rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.3));
}

.footer-contact a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.footer-contact a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Validation Styles */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: var(--success-color);
}

/* Error Message */
.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 8px;
    display: none;
    font-weight: 600;
}

.form-group.error .error-message {
    display: block;
}

.form-group.error input,
.form-group.error textarea {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Focus Enhancement */
.form-group.focused input,
.form-group.focused textarea {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), var(--glow-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .form-header {
        padding: 40px 25px;
    }
    
    .logo h1 {
        font-size: 2.2rem;
    }
    
    .form-header h2 {
        font-size: 1.6rem;
    }
    
    .form-section {
        padding: 30px 20px;
    }
    
    .section-header h3 {
        font-size: 1.4rem;
    }
    
    .section-header i {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .form-navigation .btn {
        width: 100%;
        justify-content: center;
    }
    
    .theme-toggle {
        top: 10px;
        right: 10px;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .form-header h2 {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .intro-text {
        font-size: 0.9rem;
    }
    
    .form-section {
        padding: 25px 18px;
    }
    
    .btn {
        padding: 14px 28px;
        font-size: 0.95rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: #1a1a2e;
    }
    
    .form-navigation,
    .progress-container,
    .theme-toggle {
        display: none;
    }
    
    .form-section {
        display: block !important;
        page-break-inside: avoid;
        border: 1px solid #e0e0f0;
    }
    
    .form-header,
    .form-footer {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Utility Classes */
.gradient-text-primary {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-border {
    border: 2px solid;
    border-image: var(--primary-gradient) 1;
}
#domainProviderGroup { display: block !important; }
