/* ============================================
   QUIX SPORTS CLUB - PUBLIC FORM
   Modern Premium Fitness SaaS Design
   ============================================ */

:root {
    --brand-red: #E43746;
    --brand-red-dark: #B91C1C;
    --brand-red-hover: #C92A2A;
    --bg-dark: #111111;
    --bg-dark-alt: #222222;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border-color: #D1D5DB;
    --border-light: #E5E7EB;
    --input-bg: #F9FAFB;
    --card-bg: #FFFFFF;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.25);
    --font-family: 'Inter', 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--bg-dark);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Blurred Background with Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-alt) 50%, rgba(228, 55, 70, 0.1) 100%);
    background-image: url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(12px);
    transform: scale(1.1);
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.85) 0%, rgba(34, 34, 34, 0.8) 50%, rgba(228, 55, 70, 0.15) 100%);
    z-index: -1;
}

.public-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.public-form-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 48px 40px;
    max-width: 600px;
    width: 100%;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-logo {
    width: 180px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 24px;
    transition: transform 0.3s ease;
}

.form-logo:hover {
    transform: scale(1.05);
}

.form-header h1 {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.form-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin: 0 auto;
    max-width: 80%;
    text-align: center;
}

.form-description strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #ECFDF5;
    color: #065F46;
    border-left: 4px solid #10B981;
}

.alert-danger {
    background-color: #FEF2F2;
    color: #991B1B;
    border-left: 4px solid var(--brand-red);
}

.alert i {
    font-size: 1.1rem;
}

/* Form Groups */
.public-form {
    margin-top: 8px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.form-label i {
    color: var(--text-secondary);
    width: 16px;
    font-size: 0.875rem;
}

.highlight {
    color: var(--brand-red);
    font-weight: 600;
}

/* Input Fields */
.form-control {
    width: 100%;
    height: 48px;
    padding: 12px 16px 12px 44px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-family: var(--font-family);
    position: relative;
}

.form-control::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-red);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(228, 55, 70, 0.1);
}

.form-control.is-invalid {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 4px rgba(228, 55, 70, 0.1);
}

.form-control.is-valid {
    border-color: #10B981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Input with Icon Wrapper */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-control {
    padding-left: 44px;
}

.input-icon-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1;
}

/* Phone Input Group */
.phone-input-group {
    display: flex;
    gap: 12px;
}

.country-code {
    width: 140px;
    flex-shrink: 0;
    background-color: var(--input-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 12px 16px;
    height: 48px;
}

.country-code:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 4px rgba(228, 55, 70, 0.1);
    background-color: var(--card-bg);
}

.phone-input-group .form-control {
    flex: 1;
}

/* Date Input */
input[type="date"] {
    position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 12px;
    cursor: pointer;
    opacity: 0.6;
}

/* Gender Options */
.gender-options {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background-color: var(--input-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    flex: 1;
}

.form-check:hover {
    background-color: var(--card-bg);
    border-color: var(--brand-red);
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--brand-red);
}

.form-check-input:checked + .form-check-label {
    color: var(--text-primary);
    font-weight: 600;
}

.form-check-label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-label i {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Consent Cards */
.consent-container {
    background: var(--card-bg);
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    padding: 18px 20px;
    margin: 16px 0;
    transition: all 0.2s ease;
}

.consent-container:hover {
    border-color: var(--brand-red);
    box-shadow: 0 2px 8px rgba(228, 55, 70, 0.1);
}

.consent-container .form-check {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.consent-container .form-check-input {
    margin-top: 2px;
    flex-shrink: 0;
}

.consent-container .form-check-label {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.consent-container .form-check-label i {
    color: var(--brand-red);
    margin-right: 6px;
}

.consent-container .btn {
    margin-top: 12px;
    padding: 6px 14px;
    font-size: 0.8125rem;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.consent-container .btn:hover {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: white;
    transform: translateY(-1px);
}

.consent-container .btn i {
    font-size: 0.75rem;
    margin-right: 4px;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    height: 52px;
    padding: 0;
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
    font-family: var(--font-family);
    box-shadow: 0 4px 12px rgba(228, 55, 70, 0.3);
}

.btn-submit:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(228, 55, 70, 0.4);
    background: linear-gradient(135deg, var(--brand-red-hover) 0%, var(--brand-red) 100%);
}

.btn-submit:active {
    transform: scale(0.98);
}

.btn-submit i {
    font-size: 0.875rem;
}

/* Error Messages */
.error-message {
    display: none;
    color: var(--brand-red);
    font-size: 0.8125rem;
    margin-top: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.error-message i {
    font-size: 0.875rem;
}

/* SMS Modal */
#smsModal .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-lg);
}

#smsModal .modal-header {
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-alt));
    border-radius: 20px 20px 0 0;
    border: none;
    padding: 20px 25px;
}

#smsModal .modal-title {
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
}

#smsModal .modal-body {
    padding: 30px 25px;
}

#smsModal .form-control {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    font-weight: 600;
    padding-left: 16px;
}

#smsModal .btn-danger {
    background: linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
    border: none;
    border-radius: 12px;
    padding: 12px 32px;
    font-weight: 600;
    transition: all 0.2s ease;
}

#smsModal .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(228, 55, 70, 0.4);
}

/* Countdown */
.countdown-container {
    margin-top: 20px;
}

.countdown-wrapper-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.countdown-circle-compact {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(var(--brand-red) 0deg, var(--border-light) 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 10px rgba(228, 55, 70, 0.3);
    border: 2px solid var(--card-bg);
}

.countdown-text-compact {
    font-weight: 700;
    color: white;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.countdown-info-compact {
    text-align: left;
}

.countdown-label-compact {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    margin: 0;
}

/* Modern Modals */
.modern-modal {
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modern-modal-header {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-alt) 100%);
    color: white;
    border: none;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modern-modal-header .modal-title {
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modern-modal-header .modal-title i {
    font-size: 1.125rem;
    color: var(--brand-red);
}

.modern-modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.modern-modal-header .btn-close:hover {
    opacity: 1;
}

.modern-modal-body {
    padding: 28px;
    max-height: 500px;
    overflow-y: auto;
    background: var(--card-bg);
}

.modern-modal-body::-webkit-scrollbar {
    width: 8px;
}

.modern-modal-body::-webkit-scrollbar-track {
    background: var(--input-bg);
    border-radius: 4px;
}

.modern-modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.modern-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.modern-modal-footer {
    border: none;
    padding: 20px 28px;
    background: var(--input-bg);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Info Banner */
.info-banner {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border: 1px solid #BFDBFE;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-banner i {
    color: #3B82F6;
    font-size: 1.25rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.info-banner div {
    color: #1E40AF;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.info-banner strong {
    font-weight: 600;
    color: #1E3A8A;
}

/* Content Sections */
.content-section {
    margin-bottom: 24px;
}

.content-section:last-child {
    margin-bottom: 0;
}

.content-section h6 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-section h6 i {
    color: var(--brand-red);
    font-size: 0.9375rem;
}

.content-section p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.content-section p:last-child {
    margin-bottom: 0;
}

.highlight-text {
    color: var(--text-primary) !important;
    font-weight: 500;
}

/* Modern List */
.modern-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modern-list li {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: var(--input-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.modern-list li:hover {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transform: translateX(4px);
}

.modern-list li i {
    color: var(--brand-red);
    font-size: 0.875rem;
    width: 20px;
}

.modern-list li:last-child {
    margin-bottom: 0;
}

/* Modal Buttons */
.btn-modal-secondary {
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-family);
}

.btn-modal-secondary:hover {
    background: var(--input-bg);
    border-color: var(--text-secondary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-modal-secondary i {
    font-size: 0.875rem;
}

.btn-modal-primary {
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-family);
    box-shadow: 0 4px 12px rgba(228, 55, 70, 0.3);
}

.btn-modal-primary:hover {
    background: linear-gradient(135deg, var(--brand-red-hover) 0%, var(--brand-red) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(228, 55, 70, 0.4);
}

.btn-modal-primary:active {
    transform: translateY(0);
}

.btn-modal-primary i {
    font-size: 0.875rem;
}

/* Legacy Modal Support */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-alt));
    color: white;
    border: none;
    border-radius: 20px 20px 0 0;
    padding: 20px 25px;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 25px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-footer {
    border: none;
    padding: 20px 25px;
    background-color: var(--input-bg);
    border-radius: 0 0 20px 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .public-form-card {
        padding: 32px 24px;
        max-width: 100%;
        border-radius: 16px;
    }
    
    .form-header h1 {
        font-size: 1.75rem;
    }
    
    .form-description {
        max-width: 100%;
        font-size: 0.875rem;
    }
    
    .form-logo {
        width: 150px;
        height: 80px;
    }
    
    .phone-input-group {
        flex-direction: column;
    }
    
    .country-code {
        width: 100%;
    }
    
    .gender-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-check {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .public-form-card {
        padding: 24px 20px;
        border-radius: 16px;
    }
    
    .form-header h1 {
        font-size: 1.5rem;
    }
    
    .form-description {
        font-size: 0.8125rem;
    }
    
    .form-control {
        height: 44px;
        font-size: 0.875rem;
    }
    
    .btn-submit {
        height: 48px;
        font-size: 0.9375rem;
    }
    
    #smsModal .form-control {
        font-size: 1.25rem;
        letter-spacing: 0.3rem;
    }
    
    .modern-modal-header {
        padding: 20px;
    }
    
    .modern-modal-header .modal-title {
        font-size: 1.125rem;
    }
    
    .modern-modal-body {
        padding: 20px;
    }
    
    .modern-modal-footer {
        padding: 16px 20px;
        flex-direction: column;
    }
    
    .modern-modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
    
    .info-banner {
        padding: 14px 16px;
        font-size: 0.875rem;
    }
    
    .content-section h6 {
        font-size: 0.9375rem;
    }
    
    .content-section p {
        font-size: 0.875rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.public-form-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading State */
.btn-submit.loading {
    position: relative;
    color: transparent;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
