/* ==============================================
   GUFI DEMO EXPERIENCE - Vision Pro Edition
   Premium, calm, elegant. Like Apple's onboarding
   with Gufi's warm soul.
   ============================================== */

/* ===== SECTION - Breathing Ambient Space ===== */
.demo-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 40px 120px 40px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(167, 139, 250, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        linear-gradient(180deg,
            #FDFCFF 0%,
            #FAF9FC 30%,
            #F8F7FB 50%,
            #FDFCFF 100%
        );
}

/* Breathing ambient light - slow wave motion */
.demo-ambient-light {
    position: absolute;
    inset: -100px;
    background:
        radial-gradient(circle at 40% 40%,
            rgba(167, 139, 250, 0.12) 0%,
            transparent 40%
        ),
        radial-gradient(circle at 60% 60%,
            rgba(124, 58, 237, 0.08) 0%,
            transparent 50%
        );
    filter: blur(100px);
    animation: ambientBreath 12s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.8;
}

@keyframes ambientBreath {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 1;
    }
}

/* ===== CONTAINER - Centered vertical layout ===== */
.demo-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

/* ===== HERO - Minimal, aspirational ===== */
.demo-hero {
    text-align: center;
    animation: heroFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
    }
}

.demo-hero-title {
    font-size: 64px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg,
        #1a1a1a 0%,
        #4a4a4a 50%,
        #7C3AED 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 24px 0;
}

.demo-hero-subtitle {
    font-size: 28px;
    font-weight: 400;
    line-height: 1.4;
    color: #2a2a2a;
    margin: 0 0 20px 0;
    letter-spacing: -0.01em;
}

.demo-hero-description {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
    color: #8a8a8a;
    margin: 0;
    letter-spacing: -0.005em;
}

/* ===== PANEL WRAPPER - Contains panel + mascots ===== */
.demo-panel-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* ===== PANEL - Premium glassmorphism portal ===== */
.demo-panel {
    position: relative;
    width: 100%;
    max-width: 900px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(120px) saturate(180%);
    -webkit-backdrop-filter: blur(120px) saturate(180%);
    border-radius: 32px;
    padding: 48px 40px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 40px 120px rgba(124, 58, 237, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Levitation effect */
@keyframes panelFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* Removed hover effect to maintain consistent size */

/* ===== FORM - Clean, spacious ===== */
.demo-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    /* Prevent size changes */
    width: 100%;
}

.form-group {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Full width for button */
.demo-submit-btn {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #4a4a4a;
    text-transform: uppercase;
    margin: 0;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 400;
    color: #1a1a1a;
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(124, 58, 237, 0.1);
    border-radius: 16px;
    outline: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
}

/* Custom select arrow - Premium violet */
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237C3AED' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 48px;
}

.form-group input::placeholder {
    color: #9a9a9a;
    font-weight: 400;
}

/* Premium focus state with gentle glow */
.form-group input:focus,
.form-group select:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow:
        0 0 0 4px rgba(167, 139, 250, 0.08),
        0 8px 24px rgba(124, 58, 237, 0.1);
    transform: translateY(-2px);
}

.form-group input:hover:not(:focus),
.form-group select:hover:not(:focus) {
    border-color: rgba(124, 58, 237, 0.2);
    background: rgba(255, 255, 255, 0.85);
}

/* ===== CUSTOM SELECT DROPDOWN - Premium Design ===== */

.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-btn {
    width: 100%;
    padding: 16px 48px 16px 20px;
    font-size: 16px;
    font-weight: 400;
    color: #1a1a1a;
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(124, 58, 237, 0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.custom-select-value {
    flex: 1;
}

.custom-select-arrow {
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-select-wrapper.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-btn:hover {
    border-color: rgba(124, 58, 237, 0.2);
    background: rgba(255, 255, 255, 0.85);
}

.custom-select-wrapper.open .custom-select-btn {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow:
        0 0 0 4px rgba(167, 139, 250, 0.08),
        0 8px 24px rgba(124, 58, 237, 0.1);
    transform: translateY(-2px);
}

/* Dropdown menu */
.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(60px) saturate(180%);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(124, 58, 237, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    padding: 8px;
}

.custom-select-wrapper.open .custom-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Custom scrollbar */
.custom-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: rgba(124, 58, 237, 0.05);
    border-radius: 10px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 10px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.5);
}

/* Options */
.custom-select-option {
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 400;
    color: #1a1a1a;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 4px;
}

.custom-select-option:last-child {
    margin-bottom: 0;
}

.custom-select-option:hover {
    background: linear-gradient(135deg,
        rgba(167, 139, 250, 0.12) 0%,
        rgba(124, 58, 237, 0.08) 100%
    );
    color: #5e18ea;
    transform: translateX(4px);
}

.custom-select-option.selected {
    background: linear-gradient(135deg,
        rgba(167, 139, 250, 0.2) 0%,
        rgba(124, 58, 237, 0.15) 100%
    );
    color: #5e18ea;
    font-weight: 500;
}

.custom-select-option.placeholder {
    color: #9a9a9a;
    font-weight: 400;
}

/* Fallback for native select (if custom doesn't work) */
.form-group select option {
    background: #ffffff;
    color: #1a1a1a;
    padding: 12px;
    font-size: 15px;
    font-weight: 400;
}

.form-group select option:hover,
.form-group select option:checked {
    background: linear-gradient(135deg,
        rgba(167, 139, 250, 0.15) 0%,
        rgba(124, 58, 237, 0.1) 100%
    );
    color: #5e18ea;
    font-weight: 500;
}

.form-group select option[value=""] {
    color: #9a9a9a;
}

/* ===== BUTTON - Subtle energy core ===== */
.demo-submit-btn {
    position: relative;
    width: 100%;
    padding: 20px 32px;
    margin-top: 16px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #ffffff;
    background: linear-gradient(135deg,
        #6B21E8 0%,
        #7C3AED 50%,
        #8B5CF6 100%
    );
    border: none;
    border-radius: 16px;
    cursor: pointer;
    outline: none;
    overflow: visible;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 12px 40px rgba(124, 58, 237, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.btn-text {
    position: relative;
    z-index: 2;
}

/* Subtle inner pulse */
.btn-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 70%
    );
    border-radius: inherit;
    opacity: 0;
    animation: innerPulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes innerPulse {
    0%, 100% {
        opacity: 0;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.demo-submit-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 24px 64px rgba(124, 58, 237, 0.35),
        0 8px 24px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg,
        #5e18ea 0%,
        #7C3AED 50%,
        #9061F9 100%
    );
}

.demo-submit-btn:hover .btn-glow {
    animation: innerPulseActive 2s ease-in-out infinite;
}

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

.demo-submit-btn:active {
    transform: translateY(-2px) scale(1);
    box-shadow:
        0 12px 32px rgba(124, 58, 237, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Removed unused success state styles */

/* ===== MASCOTS - Side guardians ===== */
.demo-mascot {
    flex-shrink: 0;
    width: 160px;
    height: auto;
    opacity: 0.9;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    animation: mascotFloat 8s ease-in-out infinite;
}

.demo-mascot img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 60px rgba(124, 58, 237, 0.2));
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-mascot-left {
    animation-delay: 0s;
}

.demo-mascot-right {
    animation-delay: 4s;
    width: 200px;
}

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

.demo-mascot:hover {
    opacity: 1;
    transform: scale(1.05);
}

.demo-mascot:hover img {
    filter: drop-shadow(0 30px 80px rgba(124, 58, 237, 0.3));
}

/* ===== RESPONSIVE - Mobile refinement ===== */
@media (max-width: 768px) {
    .demo-section {
        padding: 80px 24px 280px 24px !important;
    }

    .demo-container {
        gap: 60px;
    }

    .demo-hero {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100%;
        padding: 0 20px;
        animation: none !important;
    }

    .demo-hero-title {
        font-size: 42px;
    }

    .demo-hero-subtitle {
        font-size: 22px;
    }

    .demo-hero-description {
        font-size: 16px;
    }

    .demo-panel {
        padding: 40px 32px;
        border-radius: 24px;
    }

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

    .demo-mascot {
        width: 100px;
        position: absolute;
        bottom: -110px;
    }

    .demo-mascot-left {
        left: 20px;
    }

    .demo-mascot-right {
        right: 20px;
        width: 120px;
    }

    .demo-panel-wrapper {
        gap: 0;
        position: relative;
        padding-bottom: 100px;
        margin-bottom: 50px !important;
    }
}

@media (max-width: 480px) {
    .demo-section {
        padding: 80px 24px 300px 24px !important;
    }

    .demo-hero-title {
        font-size: 36px;
    }

    .demo-hero-subtitle {
        font-size: 20px;
    }

    .demo-panel {
        padding: 32px 24px;
    }

    .form-group input,
    .form-group select {
        padding: 14px 16px;
        font-size: 15px;
    }

    .demo-submit-btn {
        padding: 18px 28px;
        font-size: 16px;
    }
}

/* ===== FORM VALIDATION - Simple error states ===== */

/* Error state for inputs - Just red border */
.form-group input.error,
.form-group select.error,
.custom-select-btn.error {
    border-color: #ef4444 !important;
    border-width: 2px !important;
}

/* Focus state for error inputs */
.form-group input.error:focus,
.custom-select-btn.error:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Disabled button state */
.demo-submit-btn.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Prevent transformations when disabled */
.demo-submit-btn.btn-disabled:hover,
.demo-submit-btn.btn-disabled:active {
    transform: none !important;
}

/* Success button state */
.demo-submit-btn.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    pointer-events: none;
}

/* ===== SUCCESS OVERLAY ===== */
.demo-success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 56px;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    pointer-events: none;
}

.demo-success-overlay.show {
    opacity: 1;
    transform: scale(1);
}

.demo-success-content {
    text-align: center;
    max-width: 500px;
}

.success-title {
    font-size: 72px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 16px 0;
    background: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: successBoom 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.success-subtitle {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    letter-spacing: -0.01em;
    animation: successSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

.success-message {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
    color: #6a6a6a;
    margin: 0;
    animation: successSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

@keyframes successSlide {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .demo-success-overlay {
        padding: 40px 32px;
    }

    .success-title {
        font-size: 56px;
    }

    .success-subtitle {
        font-size: 20px;
    }

    .success-message {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .demo-success-overlay {
        padding: 32px 24px;
    }

    .success-title {
        font-size: 48px;
    }

    .success-subtitle {
        font-size: 18px;
    }

    .success-message {
        font-size: 15px;
    }
}

