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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0A1628 0%, #1C2F4A 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.wizard-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    animation: fadeIn 0.5s ease-in;
}

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

/* Progress Section */
.progress-section {
    margin-bottom: 30px;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0A1628 0%, #1C2F4A 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 11%;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Step Indicators */
.step-indicators {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    overflow-x: auto;
    padding: 10px 0;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 80px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.step-indicator.active {
    opacity: 1;
}

.step-indicator.completed {
    opacity: 0.7;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-indicator.active .step-number {
    background: linear-gradient(135deg, #0A1628 0%, #1C2F4A 100%);
    color: white;
    transform: scale(1.1);
}

.step-indicator.completed .step-number {
    background: #4CAF50;
    color: white;
}

.step-indicator.completed .step-number::after {
    content: '✓';
}

.step-label {
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* Wizard Content */
.wizard-content {
    min-height: 400px;
    margin-bottom: 30px;
}

.wizard-step {
    display: none;
    animation: slideIn 0.4s ease;
}

.wizard-step.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.section-content {
    margin-top: 30px;
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.template-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.template-card:hover {
    border-color: #0A1628;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(10, 22, 40, 0.2);
}

.template-card.selected {
    border-color: #0A1628;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.1) 0%, rgba(28, 47, 74, 0.1) 100%);
    box-shadow: 0 4px 12px rgba(10, 22, 40, 0.3);
}

.template-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.template-card h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.template-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.template-example {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-top: 10px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.form-row-3 {
    grid-template-columns: 2fr 1fr 1fr;
}

@media (max-width: 768px) {
    .form-row-3 {
        grid-template-columns: 1fr 1fr;
    }

    .form-row-3 .form-group:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-row-3 {
        grid-template-columns: 1fr;
    }

    .form-row-3 .form-group:first-child {
        grid-column: auto;
    }
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 15px;
}

.required {
    color: #e74c3c;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #0A1628;
    box-shadow: 0 0 0 3px rgba(10, 22, 40, 0.1);
}

textarea {
    resize: vertical;
    line-height: 1.5;
}

.field-hint {
    font-size: 13px;
    color: #999;
    margin-top: 6px;
}

.field-hint a {
    color: #0A1628;
    text-decoration: none;
}

.field-hint a:hover {
    text-decoration: underline;
}

/* Subdomain Input */
.subdomain-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.subdomain-input input {
    flex: 1;
}

.subdomain-suffix {
    color: #999;
    font-size: 14px;
    white-space: nowrap;
}

/* Example Box */
.example-box {
    background: #f8f9fa;
    border-left: 4px solid #0A1628;
    padding: 12px 16px;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
}

.example-box strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

/* Dynamic Lists (USPs and Pain Points) */
.dynamic-list {
    margin-bottom: 15px;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.list-item input {
    flex: 1;
}

.btn-remove {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.btn-remove:hover {
    background: #c0392b;
}

.btn-add {
    background: #0A1628;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-add:hover {
    background: #0D1F38;
    transform: translateY(-2px);
}

/* Test Connection Button */
.btn-test {
    background: white;
    color: #0A1628;
    border: 2px solid #0A1628;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.btn-test:hover {
    background: #0A1628;
    color: white;
}

.test-result {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
}

.test-result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.test-result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Review Section */
.review-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.review-header h3 {
    margin: 0;
    font-size: 18px;
}

.btn-edit {
    background: white;
    color: #0A1628;
    border: 2px solid #0A1628;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-edit:hover {
    background: #0A1628;
    color: white;
}

.review-content {
    color: #555;
    line-height: 1.6;
}

.review-content p {
    margin-bottom: 8px;
}

.review-content ul {
    margin-left: 20px;
    margin-top: 8px;
}

.review-content ul li {
    margin-bottom: 5px;
}

/* Navigation Buttons */
.wizard-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.btn-primary,
.btn-secondary,
.btn-success {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #0A1628 0%, #1C2F4A 100%);
    color: white;
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 22, 40, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    flex: 1;
}

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

.btn-secondary {
    background: white;
    color: #0A1628;
    border: 2px solid #0A1628;
}

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

.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalPop 0.5s ease;
}

@keyframes modalPop {
    0% { transform: scale(0.7); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.success-animation {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

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

.modal-content h2 {
    color: #333;
    margin-bottom: 15px;
}

.modal-content p {
    color: #666;
    margin-bottom: 15px;
    font-size: 16px;
}

#countdown {
    font-weight: bold;
    color: #0A1628;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wizard-container {
        padding: 20px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 22px;
    }

    .step-indicators {
        overflow-x: scroll;
        justify-content: flex-start;
    }

    .step-indicator {
        min-width: 60px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .step-label {
        font-size: 10px;
    }

    .template-grid {
        grid-template-columns: 1fr;
    }

    .wizard-navigation {
        flex-wrap: wrap;
    }

    .btn-primary,
    .btn-secondary,
    .btn-success {
        flex: 1 1 100%;
    }
}

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

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

/* Auto-Fill Button */
.btn-autofill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #0A1628 0%, #1C2F4A 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(10, 22, 40, 0.3);
}

.btn-autofill:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 22, 40, 0.4);
}

.btn-autofill:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-autofill .btn-icon {
    font-size: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.btn-autofill:not(:disabled):hover .btn-icon {
    animation: sparkle 0.6s ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

@keyframes sparkle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-10deg) scale(1.2); }
    75% { transform: rotate(10deg) scale(1.2); }
}

/* ====================================
   AI ANALYSIS MODAL STYLES
   ==================================== */

/* Modal Overlay */
.ai-modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    animation: modalFadeIn 0.4s ease-out;
}

.ai-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ai-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ai-modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: linear-gradient(135deg, #0A1628 0%, #1C2F4A 100%);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(100px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Particle Animation */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: float linear infinite;
    opacity: 0;
}

/* Randomize particles */
.particle:nth-child(1) { width: 4px; height: 4px; left: 10%; animation-duration: 8s; animation-delay: 0s; }
.particle:nth-child(2) { width: 6px; height: 6px; left: 20%; animation-duration: 6s; animation-delay: 0.5s; }
.particle:nth-child(3) { width: 3px; height: 3px; left: 30%; animation-duration: 10s; animation-delay: 1s; }
.particle:nth-child(4) { width: 5px; height: 5px; left: 40%; animation-duration: 7s; animation-delay: 0.2s; }
.particle:nth-child(5) { width: 4px; height: 4px; left: 50%; animation-duration: 9s; animation-delay: 1.5s; }
.particle:nth-child(6) { width: 6px; height: 6px; left: 60%; animation-duration: 8s; animation-delay: 0.8s; }
.particle:nth-child(7) { width: 3px; height: 3px; left: 70%; animation-duration: 11s; animation-delay: 0.3s; }
.particle:nth-child(8) { width: 5px; height: 5px; left: 80%; animation-duration: 7s; animation-delay: 1.2s; }
.particle:nth-child(9) { width: 4px; height: 4px; left: 90%; animation-duration: 9s; animation-delay: 0.6s; }
.particle:nth-child(10) { width: 3px; height: 3px; left: 15%; animation-duration: 10s; animation-delay: 0.9s; }
.particle:nth-child(11) { width: 6px; height: 6px; left: 25%; animation-duration: 8s; animation-delay: 1.8s; }
.particle:nth-child(12) { width: 4px; height: 4px; left: 35%; animation-duration: 7s; animation-delay: 0.4s; }
.particle:nth-child(13) { width: 5px; height: 5px; left: 45%; animation-duration: 9s; animation-delay: 1.1s; }
.particle:nth-child(14) { width: 3px; height: 3px; left: 55%; animation-duration: 10s; animation-delay: 0.7s; }
.particle:nth-child(15) { width: 6px; height: 6px; left: 65%; animation-duration: 8s; animation-delay: 1.6s; }
.particle:nth-child(16) { width: 4px; height: 4px; left: 75%; animation-duration: 7s; animation-delay: 0.1s; }
.particle:nth-child(17) { width: 5px; height: 5px; left: 85%; animation-duration: 9s; animation-delay: 1.4s; }
.particle:nth-child(18) { width: 3px; height: 3px; left: 95%; animation-duration: 10s; animation-delay: 0.5s; }
.particle:nth-child(19) { width: 6px; height: 6px; left: 12%; animation-duration: 8s; animation-delay: 1.9s; }
.particle:nth-child(20) { width: 4px; height: 4px; left: 88%; animation-duration: 7s; animation-delay: 1.3s; }

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Modal Inner Content */
.ai-modal-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.ai-modal-title {
    color: white;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Animated Icon Container */
.ai-icon-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 25px;
}

.ai-icon {
    font-size: 64px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    25% { transform: translate(-50%, -50%) scale(1.1) rotate(-5deg); }
    75% { transform: translate(-50%, -50%) scale(1.1) rotate(5deg); }
}

.ai-icon-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: ringPulse 2s ease-out infinite;
}

.ai-icon-ring.ring-2 {
    animation-delay: 1s;
}

@keyframes ringPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Company Name */
.ai-company-name {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Step Progress */
.ai-steps {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.ai-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.ai-step.active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.ai-step.completed {
    background: rgba(16, 185, 129, 0.2);
}

.ai-step-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.ai-step-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
    flex-grow: 1;
    text-align: left;
}

.ai-step-status {
    font-size: 20px;
    flex-shrink: 0;
    animation: statusSpin 1s linear infinite;
}

.ai-step.active .ai-step-status {
    animation: statusSpin 1s linear infinite;
}

.ai-step.completed .ai-step-status {
    animation: none;
}

@keyframes statusSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Bar */
.ai-progress-container {
    margin-bottom: 20px;
}

.ai-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 10px;
}

.ai-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 20px;
    width: 0%;
    transition: width 0.5s ease-out;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.ai-progress-text {
    color: white;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Status Message */
.ai-status-message {
    color: white;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
    min-height: 24px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Time Estimate */
.ai-time-estimate {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 400;
}

/* Plan Selection Styles */
.plan-card {
    transition: all 0.3s ease;
}

.plan-card:hover {
    border-color: #0A1628 !important;
    box-shadow: 0 4px 12px rgba(10, 22, 40, 0.15);
    transform: translateY(-2px);
}

.plan-card.selected {
    border-color: #0A1628 !important;
    background-color: #f8fafc !important;
    box-shadow: 0 4px 12px rgba(10, 22, 40, 0.2);
}

/* Payment Form Styles */
.test-mode-banner {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.payment-summary {
    position: sticky;
    top: 20px;
}

/* Form validation styles */
input.invalid {
    border-color: #dc2626 !important;
}

input.valid {
    border-color: #047857 !important;
}


/* ===== IMPROVED OPTIMIZE COPY BUTTON STYLES ===== */
.btn-optimize {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    margin-top: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-optimize:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-optimize:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.btn-optimize:hover:before {
    left: 100%;
}

.btn-optimize:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.btn-optimize .btn-icon {
    font-size: 18px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Consistent spacing */
.form-group .btn-optimize {
    margin-top: 12px;
    margin-bottom: 0;
}
