/* Modal Overlay */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

/* Modal Content */
.modal-content {
    background-color: #fff;
    margin: 8% auto;
    padding: 3rem;
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h1 {
    color: #2c2c2c;
    margin: 0 0 1rem 0;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    font-family: 'Inter', sans-serif;
}

.modal-subtitle {
    color: #666;
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 400;
}

/* Close Button */
.close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: #999;
    font-size: 1.8rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0.5rem;
}

.close:hover,
.close:focus {
    color: #333;
}

/* Form Styling */
.signup-form {
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    width: 100%;
}

.form-row input {
    flex: 1;
    min-width: 0; /* This prevents overflow */
    padding: 1rem 1.2rem;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
    box-sizing: border-box;
}

.form-row input:focus {
    outline: none;
    border-color: #D2691E;
    box-shadow: 0 0 0 3px rgba(210, 105, 30, 0.08);
}

.form-row input::placeholder {
    color: #999;
    font-weight: 400;
}

.email-input-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.email-input-container input {
    width: 100%;
    padding: 1rem 4rem 1rem 1.2rem;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
    box-sizing: border-box;
}

.email-input-container input:focus {
    outline: none;
    border-color: #D2691E;
    box-shadow: 0 0 0 3px rgba(210, 105, 30, 0.08);
}

.email-input-container input::placeholder {
    color: #999;
    font-weight: 400;
}

/* Submit Button */
.submit-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: #D2691E;
    color: white;
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn:hover {
    background: #b8571a;
    transform: translateY(-50%) scale(1.05);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: translateY(-50%);
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Form Messages */
.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    text-align: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.form-message.success {
    background-color: #f0f9f0;
    color: #2d5a2d;
    border: 1px solid #b8e6b8;
    opacity: 1;
}

.form-message.error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    opacity: 1;
}

/* Button Styling for Hero CTA */
.primary-cta {
    background: white;
    color: #333;
    border: 2px solid #e1e5e9;
    padding: 1rem 2.5rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.primary-cta:hover {
    background: #f8f9fa;
    border-color: #D2691E;
    color: #D2691E;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .modal-content {
        margin: 15% auto;
        width: 95%;
        padding: 2rem;
    }
    
    .modal-header h1 {
        font-size: 1.6rem;
    }
    
    .modal-subtitle {
        font-size: 0.9rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .close {
        top: 1rem;
        right: 1rem;
        font-size: 1.5rem;
    }
}