/* Registration Form Styles */
.registration-form {
    background: rgba(22, 25, 31, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: visible;
}

.registration-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 16px 16px 0 0;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(45, 156, 219, 0.1);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Phone number field with country selector */
.phone-input-container {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.country-selector {
    min-width: 120px;
    flex-shrink: 0;
    position: relative;
}

.country-selector select {
    width: 100%;
    padding-left: 40px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

.country-flag {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 15px;
    font-size: 16px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-number-input {
    flex: 1;
}

/* Form validation states */
.form-group.error input,
.form-group.error select {
    border-color: #e53e3e;
    background: rgba(229, 62, 62, 0.1);
}

.form-group.success input,
.form-group.success select {
    border-color: #38a169;
    background: rgba(56, 161, 105, 0.1);
}

.error-message {
    color: #e53e3e;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Submit button */
.registration-form .btn-submit {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.registration-form .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 156, 219, 0.3);
}

.registration-form .btn-submit:active {
    transform: translateY(0);
}

.registration-form .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.registration-form .btn-submit.loading {
    pointer-events: none;
}

.registration-form .btn-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success message */
.success-message {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 32px 28px;
    color: #111827;
    text-align: center;
    margin-top: 20px;
    display: none;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.success-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.15), transparent);
    animation: shimmer 2s infinite;
    z-index: 1;
}

.success-message.show {
    display: block;
    animation: fadeInUp 0.6s ease;
}

.success-message.show::before {
    left: 100%;
}

.success-message h3 {
    margin: 0 0 20px 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #16a34a;
    text-shadow: none;
    z-index: 2;
    position: relative;
}

.success-message p {
    margin: 12px 0;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #374151;
    z-index: 2;
    position: relative;
}

.success-message p strong {
    color: #111827;
    font-weight: 600;
}

.success-details {
    margin-top: 24px;
    text-align: left;
    z-index: 2;
    position: relative;
}

.success-point {
    display: flex;
    align-items: flex-start;
    margin: 16px 0;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 8px;
    border-left: 3px solid #16a34a;
}

.success-point i {
    color: #16a34a;
    margin-right: 12px;
    font-size: 1rem;
    min-width: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.success-point span {
    font-size: 1rem;
    color: #374151;
    font-weight: 500;
    line-height: 1.5;
}

/* Error message container */
.error-message-container {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 16px;
    color: #dc2626;
    text-align: center;
    margin-top: 20px;
    display: none;
}

.error-message-container.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

.error-message-container i {
    margin-right: 8px;
    font-size: 1.1rem;
}

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

/* Mobile optimization */
@media (max-width: 768px) {
    .registration-form {
        padding: 20px;
        margin: 0 10px;
    }
    
    .phone-input-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .country-selector {
        min-width: auto;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS Safari */
    }
}

@media (max-width: 480px) {
    .registration-form {
        padding: 16px;
        border-radius: 12px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .country-flag {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .registration-form {
        background: rgba(11, 14, 17, 0.98);
        border-color: rgba(255, 255, 255, 0.08);
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .registration-form .btn-submit {
        transition: none;
    }
    
    .registration-form .btn-submit:hover {
        transform: none;
    }
    
    .success-message.show {
        animation: none;
    }
}

/* Focus visible for keyboard navigation */
.form-group input:focus-visible,
.form-group select:focus-visible,
.registration-form .btn-submit:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Enhanced Country Selector Styles */
.form-section-title {
    color: var(--text-primary) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-bottom: 12px !important;
}

.custom-country-selector {
    position: relative;
    width: 100%;
}

.country-selector-display {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.country-selector-display:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.selected-flag {
    font-size: 18px;
    min-width: 24px;
}

.selected-code {
    color: var(--primary-color);
    font-weight: 600;
    min-width: 50px;
}

.selected-name {
    flex: 1;
    color: var(--text-primary);
}

.dropdown-arrow {
    color: var(--text-secondary);
    font-size: 12px;
    transition: transform 0.3s ease;
}

.custom-country-selector.active .dropdown-arrow {
    transform: rotate(180deg);
}

.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(22, 25, 31, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 2px; /* Small gap between selector and dropdown */
}

/* Force dropdown height - registration form UX best practices */
.registration-form .country-dropdown.show,
.country-dropdown.show {
    max-height: 280px !important; /* Shows 5-6 countries - optimal for UX */
    height: auto !important;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-search {
    position: relative;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-search input {
    width: 100%;
    padding: 8px 36px 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    box-sizing: border-box;
}

.dropdown-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.search-icon {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 12px;
}

/* Force countries list height - registration form standards */
.registration-form .countries-list,
.countries-list {
    max-height: 220px !important; /* Shows 5-6 countries - registration form best practice */
    height: auto !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.countries-list::-webkit-scrollbar {
    width: 6px;
}

.countries-list::-webkit-scrollbar-track {
    background: transparent;
}

.countries-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.countries-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.country-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    gap: 12px;
}

.country-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.country-option .country-flag {
    position: static;
    font-size: 16px;
    min-width: 20px;
    transform: none;
    width: auto;
    height: auto;
}

.country-info {
    display: flex;
    flex: 1;
    justify-content: space-between;
    align-items: center;
}

.country-name {
    color: var(--text-primary);
    font-size: 14px;
}

.country-dial {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
}

/* Enhanced Button Styles */
.btn-submit {
    position: relative;
    overflow: hidden;
}

.btn-loading {
    display: none;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    margin-left: 8px;
}

/* Enhanced Success Message - Main Icon */
.success-message > i.fa-check-circle {
    font-size: 64px;
    color: #16a34a;
    margin-bottom: 20px;
    display: block;
    z-index: 2;
    position: relative;
    text-shadow: 0 2px 8px rgba(22, 163, 74, 0.2);
}

/* Enhanced Country Selector - Mobile Styles */
@media (max-width: 768px) {
    .phone-input-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .country-selector {
        width: 100%;
    }

    .country-selector-display {
        padding: 12px 14px;
        font-size: 14px;
        gap: 10px;
    }

    .selected-flag {
        font-size: 16px;
        min-width: 20px;
    }

    .selected-code {
        font-size: 13px;
        min-width: 45px;
    }

    .selected-name {
        font-size: 14px;
    }

    .registration-form .country-dropdown.show {
        max-height: 260px !important; /* Mobile - shows 5-6 countries (UX best practice) */
    }

    .dropdown-search {
        padding: 10px;
    }

    .dropdown-search input {
        padding: 8px 32px 8px 10px;
        font-size: 14px;
    }

    .registration-form .countries-list {
        max-height: 200px !important; /* Mobile - shows 5-6 countries (registration form standard) */
    }
    
    /* Mobile success message */
    .success-message {
        padding: 24px 20px;
        margin: 16px 0;
        border-radius: 12px;
    }
    
    .success-message > i.fa-check-circle {
        font-size: 48px;
        margin-bottom: 16px;
    }
    
    .success-message h3 {
        font-size: 1.5rem;
        margin-bottom: 16px;
    }
    
    .success-message p {
        font-size: 1rem;
        margin: 10px 0;
    }
    
    .success-details {
        margin-top: 20px;
    }
    
    .success-point {
        margin: 12px 0;
        padding: 10px 12px;
    }
    
    .success-point i {
        margin-right: 10px;
        font-size: 0.9rem;
    }
    
    .success-point span {
        font-size: 0.9rem;
    }

    .country-option {
        padding: 10px 14px;
        gap: 10px;
    }

    .country-option .country-flag {
        font-size: 14px;
        min-width: 18px;
    }

    .country-name,
    .country-dial {
        font-size: 13px;
    }
}

/* Extra small mobile screens - shows fewer countries for better visibility */
@media (max-width: 480px) {
    .registration-form .country-dropdown.show {
        max-height: 240px !important; /* Small mobile - shows 4-5 countries */
    }

    .registration-form .countries-list {
        max-height: 180px !important; /* Small mobile - shows 4-5 countries max */
    }

    .registration-form .country-option {
        padding: 8px 12px; /* Compact display for small screens */
    }
}

/* Large desktop screens - still follow UX best practices */
@media (min-width: 1200px) {
    .registration-form .country-dropdown.show {
        max-height: 300px !important; /* Large desktop - shows 6 countries max */
    }

    .registration-form .countries-list {
        max-height: 240px !important; /* Large desktop - shows 6 countries (UX standard) */
    }
}

/* FOMO Elements for Registration Form */
.registration-fomo-container {
    margin: 16px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.registration-spots-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.3);
    border-radius: 16px;
    padding: 8px 16px;
    backdrop-filter: blur(10px);
}

.registration-spots-counter .spots-icon {
    font-size: 14px;
}

.registration-spots-counter .spots-text {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.registration-spots-counter #registration-spots-counter {
    color: #00D4FF;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

/* Mobile Responsive for Registration FOMO */
@media (max-width: 767px) {
    .registration-fomo-container {
        margin: 12px 0;
    }
    
    .registration-spots-counter {
        padding: 6px 12px;
    }
    
    .registration-spots-counter .spots-text {
        font-size: 13px;
    }
}
/* Modern password input styling */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    width: 100%;
    padding-right: 80px; /* Space for icons */
    font-family: monospace;
    letter-spacing: 1px;
}

.password-input-icons {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}

.password-icon-btn {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-icon-btn:hover {
    color: #2c5aa0;
}

.password-info {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}