/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #0a0a14 0%, #12121e 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Ultra Light Background Animation */
#bgAnimation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

/* Light gradient overlay */
#bgAnimation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(255, 165, 0, 0.03) 0%, transparent 40%);
}

/* Minimal floating particles */
.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.1);
    pointer-events: none;
    animation: floatParticle 20s infinite linear;
}

@keyframes floatParticle {
    0% {
        transform: translate(0, 0);
        opacity: 0.1;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        transform: translate(calc(100vw - 50px), calc(-100vh + 50px));
        opacity: 0.1;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-top: 3px solid #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #FFD700;
    font-size: 18px;
    font-weight: 500;
}

/* Card */
.card {
    background: rgba(20, 20, 25, 0.85);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 35px;
    max-width: 450px;
    width: 90%;
    border: 1px solid rgba(255, 215, 0, 0.4);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4),
        inset 0 0 30px rgba(255, 215, 0, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
    animation: cardShimmer 3s infinite linear;
}

@keyframes cardShimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
    margin-right: 15px;
}

.logo-icon::before {
    content: "CX";
    font-size: 22px;
    font-weight: bold;
    color: #000;
}

.logo-text {
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(to right, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 25px;
    background: linear-gradient(to right, #FFD700, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Form Styles */
.input-group {
    margin-bottom: 18px;
    position: relative;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 15px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
    appearance: none;
    cursor: pointer;
}

.input-group.has-password-toggle input {
    padding-right: 54px;
}

.password-toggle {
    position: absolute;
    top: 26px;
    right: 14px;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: rgba(255, 215, 0, 0.85);
    cursor: pointer;
    padding: 0;
}

.password-toggle:hover {
    color: #FFD700;
}

.password-toggle:focus-visible {
    outline: 2px solid rgba(255, 215, 0, 0.9);
    outline-offset: 2px;
}

.eye-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.eye-closed {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}

/* =================== FIX: DARK DROPDOWN OPTIONS =================== */
/* Custom dropdown arrow */
.input-group select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFD700'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 45px;
}

/* Dark background for dropdown options */
.input-group select option {
    background-color: #12121e !important;
    color: #ffffff !important;
    padding: 12px !important;
    font-size: 15px !important;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2) !important;
}

/* Hover effect for dropdown options */
.input-group select option:hover {
    background-color: rgba(255, 215, 0, 0.2) !important;
}

/* Selected option style */
.input-group select option:checked {
    background-color: rgba(255, 215, 0, 0.3) !important;
    color: #FFD700 !important;
    font-weight: bold !important;
}

/* Focus state */
.input-group select option:focus {
    background-color: rgba(255, 215, 0, 0.4) !important;
}

/* For Webkit browsers (Chrome, Safari) */
.input-group select::-webkit-scrollbar {
    width: 10px;
    background: #12121e;
}

.input-group select::-webkit-scrollbar-thumb {
    background: #FFD700;
    border-radius: 5px;
}

.input-group select::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

/* =================== END FIX =================== */

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Error and Success States */
.input-group.error input,
.input-group.error select {
    border-color: #ff4444;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.4);
}

.input-group.success input,
.input-group.success select {
    border-color: #00ff44;
    box-shadow: 0 0 20px rgba(0, 255, 68, 0.4);
}

.error-message {
    color: #ff4444;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

/* Name Group */
.name-group {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
}

.name-group .input-group {
    flex: 1;
    margin-bottom: 0;
}

/* Password Strength */
.password-strength {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    height: 5px;
}

.password-strength span {
    flex: 1;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.password-strength .weak.active {
    background: #ff4444;
    box-shadow: 0 0 10px #ff4444;
}

.password-strength .medium.active {
    background: #ffaa00;
    box-shadow: 0 0 10px #ffaa00;
}

.password-strength .strong.active {
    background: #00ff44;
    box-shadow: 0 0 10px #00ff44;
}

.password-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin: -8px 0 15px;
    line-height: 1.4;
}

/* Profile Upload Section - Updated with Gallery Option */
.profile-upload-section {
    margin: 20px 0;
}

.profile-upload {
    text-align: center;
    padding: 20px;
    border: 2px dashed rgba(255, 215, 0, 0.5);
    border-radius: 16px;
    background: rgba(255, 215, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 15px;
}

.profile-upload:hover {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.profile-preview-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#profilePreview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.upload-icon {
    font-size: 36px;
    color: #FFD700;
}

.upload-text {
    color: #FFD700;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 5px;
}

.upload-subtext {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-top: 5px;
}

/* Gallery Options Modal */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.gallery-modal-content {
    background: rgba(25, 25, 35, 0.95);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
    position: relative;
}

.gallery-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.gallery-modal-title {
    font-size: 22px;
    color: #FFD700;
    font-weight: 600;
}

.close-gallery {
    background: none;
    border: none;
    color: #FFD700;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-gallery:hover {
    transform: rotate(90deg);
}

.gallery-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.gallery-option {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-option:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: #FFD700;
    transform: translateY(-3px);
}

.gallery-option-icon {
    font-size: 32px;
    color: #FFD700;
    margin-bottom: 10px;
}

.gallery-option-text {
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

.gallery-option-subtext {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-top: 5px;
}

/* Gallery Images Grid */
.gallery-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    display: none;
}

.gallery-image-item {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.gallery-image-item:hover {
    border-color: #FFD700;
    transform: scale(1.05);
}

.gallery-image-item.selected {
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.gallery-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.select-gallery-image-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    display: none;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.select-gallery-image-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

/* File Upload Section */
.file-upload-section {
    padding: 20px;
    border: 2px dashed rgba(255, 215, 0, 0.5);
    border-radius: 12px;
    background: rgba(255, 215, 0, 0.05);
    margin-top: 15px;
    display: none;
}

.file-upload-btn {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 215, 0, 0.5);
    border-radius: 10px;
    color: #FFD700;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.file-upload-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #FFD700;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.checkbox-group input[type="checkbox"] {
    accent-color: #FFD700;
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

/* Buttons - Unique Golden Style */
.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.6s;
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

/* Unique Golden Button for Create Account */
.btn-primary {
    background: linear-gradient(135deg, #FFD700, #FFA500, #FFD700);
    background-size: 200% 100%;
    color: #000;
    box-shadow:
        0 10px 30px rgba(255, 215, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 2px solid #FFA500;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow:
        0 15px 40px rgba(255, 215, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Unique Google Button */
.btn-google {
    background: linear-gradient(135deg, #4285F4, #34A853, #FBBC05, #EA4335);
    background-size: 200% 200%;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.3);
    animation: googleGradient 4s ease infinite;
}

@keyframes googleGradient {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.btn-google:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(66, 133, 244, 0.5);
    border-color: #fff;
}

.google-icon {
    background: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4285F4;
    font-weight: bold;
}

/* Login Link */
.login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 15px;
}

.login-link a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding-bottom: 2px;
}

.login-link a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #FFD700;
    transition: width 0.3s ease;
}

.login-link a:hover::after {
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .card {
        padding: 25px;
        max-width: 400px;
    }

    .name-group {
        flex-direction: column;
        gap: 10px;
    }

    .logo-text {
        font-size: 28px;
    }

    .form-title {
        font-size: 24px;
    }

    .gallery-options {
        grid-template-columns: 1fr;
    }

    .gallery-images {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .card {
        width: 95%;
        padding: 20px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .logo-icon::before {
        font-size: 18px;
    }

    .logo-text {
        font-size: 24px;
    }

    .form-title {
        font-size: 22px;
    }

    .gallery-images {
        grid-template-columns: repeat(2, 1fr);
    }
}