/* Landing Page Styles */
.hero {
    padding: 150px 0 100px;
    text-align: center;
    color: var(--text-white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 40%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 4.5rem);
    margin-bottom: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-white) 0%, rgba(255, 255, 255, 0.8) 50%, var(--accent-teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out;
}

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

.hero p {
    font-size: var(--text-xl);
    margin-bottom: 3rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    font-weight: 400;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Hero Input Container */
.hero-input-container {
    max-width: 600px;
    margin: 0 auto 3rem auto;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-input-wrapper {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur-md);
    border: var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: 1.5rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
}

.hero-input-wrapper:hover {
    background: var(--glass-bg-strong);
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.hero-input-wrapper:focus-within {
    background: var(--glass-bg-strong);
    box-shadow: var(--shadow-xl), 0 0 0 3px rgba(78, 205, 196, 0.2);
    border-color: rgba(78, 205, 196, 0.3);
    transform: translateY(-2px);
}

#hero-ideal-client {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-white);
    font-size: var(--text-lg);
    font-weight: 400;
    line-height: 1.6;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    padding: 0;
    margin-bottom: 1rem;
}

#hero-ideal-client::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

#hero-ideal-client:focus::placeholder {
    opacity: 0.5;
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-style: italic;
}

.hint-icon {
    font-size: var(--text-base);
    opacity: 0.8;
}

/* CTA Buttons */
.hero .cta-button {
    animation: fadeInUp 0.8s ease-out 0.4s both;
    font-size: var(--text-lg);
    padding: 1.25rem 2.5rem;
    box-shadow: var(--shadow-teal), 0 0 40px rgba(78, 205, 196, 0.2);
}

.features {
    padding: 120px 0;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: var(--backdrop-blur-sm);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.features h2 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 4rem;
    color: var(--text-white);
    font-weight: 600;
    letter-spacing: -0.025em;
    position: relative;
}

.features h2::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.feature-grid {
    animation: fadeInUp 0.8s ease-out;
}

.feature-card {
    animation: fadeInUp 0.8s ease-out calc(var(--animation-delay, 0) * 0.1s);
}

/* Form Page Styles */
.form-page, .login-page {
    display: none;
    padding: 140px 0 100px;
    color: var(--text-white);
    position: relative;
    min-height: 100vh;
}

.form-page::before,
.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 20%, rgba(78, 205, 196, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.form-container,
.login-container {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

.form-container h2,
.login-container h2 {
    background: linear-gradient(135deg, var(--text-white) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Form Steps */
.step-header {
    margin-bottom: 3rem;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width 0.8s ease;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

.form-step {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Enhanced Form Elements */
.form-group {
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out calc(var(--form-delay, 0) * 0.1s);
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: var(--text-base);
    color: var(--text-light);
    letter-spacing: 0.025em;
}

.form-description {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: 1rem;
    font-style: italic;
    line-height: 1.5;
}

/* Modern Back Button */
.back-btn {
    background: var(--glass-bg-strong);
    border: var(--glass-border);
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    margin-bottom: 2rem;
    transition: all var(--transition-normal);
    backdrop-filter: var(--backdrop-blur-sm);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn::before {
    content: '←';
    transition: transform var(--transition-normal);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.back-btn:hover::before {
    transform: translateX(-2px);
}

/* Page Display States */
#landing-page {
    display: block;
    animation: fadeIn 0.5s ease-out;
    flex: 1;
}

#form-page,
#login-page,
#register-page,
#verify-email-page,
#results-page,
#profile-page,
#about-page,
#contact-page,
#pricing-page,
#terms-page {
    display: none;
    flex: 1;
    position: relative;
}

/* Main Content */
#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
}

/* Pages Container - Only show when a page is active */
#pages-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    min-height: 0;
}

/* Hide main content when footer pages are active */
body.page-active #main-content {
    display: none;
}

/* Show pages container always, but individual pages control their visibility */
body.page-active #pages-container {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Default state - hide pages container when on main pages */
body:not(.page-active) #pages-container {
    display: none;
}

/* Ensure pages fill the space properly */
.form-page,
.login-page {
    flex: 1;
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* All pages inside pages-container are hidden by default */
#pages-container > div[id$="-page"] {
    display: none;
    visibility: hidden;
    flex: 1;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

/* Show pages with the active-page class */
#pages-container > div[id$="-page"].active-page {
    display: flex !important;
    visibility: visible !important;
    flex-direction: column;
    z-index: 10;
}

/* Page Transition Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pricing Page Styles */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    min-width: 0; /* Allow grid items to shrink */
}

.pricing-grid > div {
    min-width: 0; /* Allow content to wrap/shrink */
    overflow: hidden; /* Prevent content overflow */
}

/* Ensure pricing cards maintain layout on medium screens */
@media (max-width: 900px) {
    .pricing-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 700px) {
    .pricing-grid {
        gap: 1rem;
    }
}

/* Very small screens - still keep in one line but very compact */
@media (max-width: 550px) {
    .pricing-grid {
        gap: 0.5rem;
    }
    
    .pricing-grid > div {
        padding: 1rem 0.5rem !important;
    }
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero h1 {
        font-size: clamp(2.5rem, 8vw, 3.5rem);
        margin-bottom: 1.5rem;
    }
    
    .hero p {
        font-size: var(--text-lg);
        margin-bottom: 2.5rem;
        padding: 0 1rem;
    }
    
    /* Hero Input Responsive */
    .hero-input-container {
        margin: 0 1rem 2.5rem 1rem;
    }
    
    .hero-input-wrapper {
        padding: 1.25rem;
    }
    
    #hero-ideal-client {
        font-size: var(--text-base);
        min-height: 70px;
    }
    
    .hero .cta-button {
        display: block;
        width: calc(100% - 2rem);
        margin: 0 1rem 1rem 1rem;
        text-align: center;
    }
    
    .features {
        padding: 80px 0;
    }
    
    .features h2 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
        margin-bottom: 3rem;
    }
    
    /* Feature grid responsive design */
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 600px;
    }
    
    .feature-card {
        min-height: 240px;
        padding: 2.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1.5rem;
    }
    
    .form-page,
    .login-page {
        padding: 100px 0 60px;
    }
    
    .form-container,
    .login-container {
        padding: 2rem;
        margin: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero .cta-button {
        padding: 1rem 1.5rem;
        font-size: var(--text-base);
        margin: 0 0.5rem 1rem 0.5rem;
        width: calc(100% - 1rem);
    }
    
    .hero-input-container {
        margin: 0 0.5rem 2rem 0.5rem;
    }
    
    .hero-input-wrapper {
        padding: 1rem;
    }
    
    #hero-ideal-client {
        font-size: var(--text-sm);
        min-height: 60px;
    }
    
    .input-hint {
        font-size: 0.75rem;
    }
    
    .features {
        padding: 60px 0;
    }
    
    .feature-grid {
        gap: 1.5rem;
        max-width: 100%;
    }
    
    .feature-card {
        min-height: 200px;
        padding: 2rem;
    }
    
    .feature-card h3 {
        font-size: var(--text-lg);
    }
    
    .feature-card p {
        font-size: var(--text-sm);
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }
    
    .form-container,
    .login-container {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
}