/* =========================================================================
   Sign-up Page Styles (Frame 12 & The Legend Multi-Step)
   ========================================================================= */
:root {
    --primary-yellow: #f2b705;
    --primary-dark: #192543;
    --primary-dark-light: #22325a;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --text-muted: #6b7280;
    --bg-light: #eef1f6;
    --bg-white: #ffffff;
    --transition: all 0.3s ease-in-out;
}

.signup-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--primary-dark);
    overflow-x: hidden;
}

.signup-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.signup-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.signup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(25, 37, 67, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.signup-header {
    width: 100%;
    padding: 1.5rem 0;
    position: relative;
    z-index: 10;
}

.signup-logo img {
    height: 60px;
    filter: brightness(1.1);
}

.signup-page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.signup-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 10;
}

.signup-card {
    background: var(--bg-white);
    border-radius: 20px;
    width: 100%;
    max-width: 550px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin: 2rem 0;
    position: relative;
}

.signup-card-header {
    margin-bottom: 2rem;
    text-align: center;
}

.signup-card-header h2 {
    color: var(--primary-dark);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.text-primary-blue {
    color: #3b82f6;
    font-size: 0.9rem;
    font-weight: 600;
}

/* =========================================
   Progress Bar
   ========================================= */
.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    position: relative;
    padding: 0 1rem;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 15px;
    right: 25px;
    left: 25px;
    height: 3px;
    background-color: #e2e8f0;
    z-index: 1;
}

.progress-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    transition: var(--transition);
    border: 3px solid var(--bg-white);
}

.progress-step.active .step-circle {
    background-color: var(--primary-yellow);
    color: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(242, 183, 5, 0.2);
}

.progress-step.active {
    color: var(--primary-dark);
}

.progress-step.completed .step-circle {
    background-color: var(--primary-dark);
    color: var(--text-light);
}

.progress-step.completed {
    color: var(--primary-dark);
}

/* Connecting lines progress logic */
.progress-bar[data-step="2"]::before {
    background: linear-gradient(to left, var(--primary-dark) 50%, #e2e8f0 50%);
}

.progress-bar[data-step="3"]::before {
    background-color: var(--primary-dark);
}

/* =========================================
   Form Elements
   ========================================= */
.step-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.75rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 0.5rem;
    text-align: right;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: var(--transition);
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 3px rgba(242, 183, 5, 0.15);
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%2364748b" viewBox="0 0 16 16"><path d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/></svg>') no-repeat;
    background-position: left 1rem center;
    padding-left: 2.5rem;
    padding-right: 1rem;
    cursor: pointer;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* =========================================
   Payment Methods & Upload
   ========================================= */
.payment-methods {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.payment-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-dark);
    flex: 1;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    padding: 1rem;
    border-radius: 10px;
    transition: var(--transition);
}

.payment-radio:hover {
    border-color: #cbd5e1;
}

.payment-radio input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #94a3b8;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    flex-shrink: 0;
}

.payment-radio input[type="radio"]:checked {
    border-color: var(--primary-yellow);
}

.payment-radio input[type="radio"]:checked::after {
    content: '';
    width: 10px;
    height: 10px;
    background-color: var(--primary-yellow);
    border-radius: 50%;
}

.payment-radio:has(input:checked) {
    border-color: var(--primary-yellow);
    background-color: #fefce8;
}

.upload-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out, margin 0.4s ease-in-out;
    opacity: 0;
    margin-top: 0;
}

.upload-wrapper.show {
    max-height: 200px;
    opacity: 1;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.upload-container {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    background-color: #f8fafc;
    transition: var(--transition);
    display: block;
}

.upload-container:hover {
    border-color: var(--primary-yellow);
    background-color: #fefce8;
}

.upload-icon {
    font-size: 2rem;
    color: var(--primary-yellow);
    margin-bottom: 0.5rem;
}

.upload-text {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.upload-container input[type="file"] {
    display: none;
}

/* =========================================
   Buttons & Actions
   ========================================= */
.step-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.btn-next,
.btn-submit {
    flex: 2;
    background-color: var(--primary-yellow);
    color: var(--primary-dark);
    padding: 0.8rem;
    font-size: 1rem;
    font-weight: 800;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-next:hover,
.btn-submit:hover {
    background-color: #e0ac04;
    transform: translateY(-2px);
}

.btn-back {
    flex: 1;
    background-color: #f1f5f9;
    color: #4b5563;
    padding: 0.8rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-back:hover {
    background-color: #e2e8f0;
    color: var(--primary-dark);
}

.form-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--primary-yellow);
    font-weight: 800;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 768px) {
    .signup-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .payment-methods {
        flex-direction: column;
        gap: 1rem;
    }

    .progress-bar {
        padding: 0;
    }

    .progress-step span {
        display: none;
        /* Hide text on very small screens, keep just circles */
    }

    .step-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-back {
        order: 2;
        /* Put back button under next on mobile */
        width: 100%;
    }
}

/* =========================================
   Success Screen & Image Validation
   ========================================= */

/* File Upload Validation States */
.upload-container.has-error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.upload-container.has-success {
    border-color: #22c55e;
    background-color: #f0fdf4;
}

.upload-content-success {
    animation: fadeIn 0.4s ease-in-out;
}

/* Success Screen Base */
.success-screen {
    padding: 3rem 1rem;
    animation: fadeIn 0.6s ease-in-out;
}

.success-title {
    color: var(--primary-dark);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.success-desc {
    color: #4b5563;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* CSS Animated Checkmark */
.success-animation {
    margin: 0 auto 2rem;
    width: 100px;
    height: 100px;
}

.success-checkmark {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    position: relative;
}

.check-icon {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: 4px solid #f2b705;
    border-radius: 50%;
    position: relative;
    background-color: transparent;
    animation: scaleCheck 0.5s ease-out forwards;
}

.icon-circle {
    top: -4px;
    left: -4px;
    z-index: 10;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    position: absolute;
    box-sizing: content-box;
    border: 4px solid #f2b705;
    animation: fillCircle 0.4s ease-in-out 0.4s forwards;
    opacity: 0;
}

.icon-fix {
    top: 15px;
    left: 45px;
    z-index: 1;
    width: 5px;
    height: 90px;
    background-color: var(--bg-white);
    position: absolute;
    transform: rotate(-45deg);
}

.icon-line {
    height: 5px;
    background-color: var(--primary-dark);
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
    opacity: 0;
    animation: drawCheck 0.3s ease-in-out 0.8s forwards;
}

.icon-line.line-tip {
    top: 50px;
    left: 20px;
    width: 30px;
    transform: rotate(45deg);
}

.icon-line.line-long {
    top: 42px;
    right: 15px;
    width: 55px;
    transform: rotate(-45deg);
}

@keyframes scaleCheck {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fillCircle {
    0% {
        border-width: 4px;
        border-color: #f2b705;
        opacity: 1;
    }

    50% {
        border-width: 50px;
        border-color: #f2b705;
        opacity: 1;
    }

    100% {
        border-width: 4px;
        border-color: #f2b705;
        background-color: #f2b705;
        opacity: 1;
    }
}

@keyframes drawCheck {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}