/* Registration Page Styles - Updated to match Profile Settings */

/* Import CSS Custom Properties matching Settings */
:root {
    /* Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --bg-modal: #1a1a1a;
    --bg-card: #242424;
    --bg-input: #1e1e1e;
    --bg-button: #2d2d2d;
    --bg-button-hover: #3a3a3a;
    --bg-accent: #D9D9D950;
    --bg-accent-hover: #03a3b1;
    --bg-success: #8fc73e;
    --bg-danger: #ee2e24;
    --bg-warning: #fdb714;

    /* Text Colors - Unified with EEFDF9 */
    --text-primary: #EEFDF9;
    --text-secondary: #EEFDF9;
    --text-muted: #9ca3af;
    --text-accent: #4a9eff;
    --text-on-accent: #ffffff;

    /* Borders */
    --border-primary: #3a3a3a;
    --border-secondary: #2a2a2a;
    --border-accent: #EEFDF950;
    --border-radius: 1000px;
    --border-radius-sm: 1000px;
    --border-radius-lg: 28px;

    /* Modal specific colors - Unified with EEFDF9 */
    --modal-text-white: #EEFDF9;
    --modal-element-bg: #EEFDF910;
    --modal-element-bg-hover: #EEFDF950;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* Typography */
    --font-family: "Inter", sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 16px;
    --font-size-md: 16px;
    --font-size-lg: 24px;
    --font-size-xl: 24px;
    --font-size-2xl: 24px;
    --font-size-3xl: 36px;
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.35s ease;
}

/* Reset body for auth page */
body {
    background-color: #1a1a1a !important;
    color: var(--text-primary) !important;
    font-family: var(--font-family) !important;
    overflow: auto !important;
    height: auto !important;
    display: block !important;
    flex-direction: unset !important;
    justify-content: unset !important;
    align-items: unset !important;
    width: 100%;
}

/* Back Navigation (Top Left) */
.back-nav-register a {
    color: #EEFDF9;
    text-decoration: none;
    font-size: 14px;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    transition: color 0.2s ease;
    cursor: pointer;
}

.back-nav-register a:hover {
    color: #EEFDF950;
}

/* Container and Layout */
.register-container {
    /* Use CSS custom property for mobile viewport stability */
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 50px 24px 50px;
    padding-top: 80px;
    /* Add space for fixed progress bar */
    background-color: #1a1a1a;
}

/* Registration Progress Bar */
.registration-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #eefdf9;
    z-index: 1000;
    overflow: hidden;
}

.registration-progress-fill {
    height: 100%;
    width: 20%;
    background-color: #4f5251;
    transition: width 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    border-radius: 0;
}

/* Form Container - Matching settings.css card style */
.form-container {
    max-width: 600px;
    width: 100%;
}

/* Form Card - New card structure matching settings */
.form-card {
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl) 0px;
    margin-bottom: 20px;
}

/* Cube questionnaire layout */
.cube-stage {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
    /* Full screen height minus padding */
    width: 100%;
    overflow: hidden;
}

@media (max-width: 900px) {
    .cube-stage {
        height: calc(100vh - 80px);
    }
}

.cube-question-area {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 24px 16px;
    box-shadow: none;
    height: 60%;
    /* Top 60% for questions */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    /* Creates stacking context for dropdown and interactive elements */
    z-index: 10;
    /* Places question area above cube visual (z-index: 0) */
}

.cube-question-header {
    margin-bottom: 28px;
    /* Increase margin */
    text-align: center;
}

.cube-question-area.info-step .cube-question-header {
    margin-bottom: 12px;
}

.cube-step-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin: 0 0 4px;
}

.cube-question-title {
    margin: 0 0 8px;
    font-size: 32px;
    /* Larger title */
    font-weight: 700;
}

.cube-question-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 16px;
    /* Larger subtitle */
}

.cube-answers {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    /* Center answers horizontally */
    max-width: 700px;
    position: relative;
    z-index: 20;
    /* Higher than .cube-controls (z-index: 5) - ensures dropdown appears above Next button even when transform creates stacking context */
    pointer-events: auto;
    /* Ensure answers are clickable */
}

.cube-question-area.info-step .cube-answers {
    margin-top: 12px;
}

.cube-info-text {
    margin: 0;
    color: var(--text-muted);
    max-width: 620px;
}

.cube-stage .cube-question-title,
.cube-stage .cube-question-subtitle,
.cube-stage .cube-answers,
.cube-stage .cube-controls .btn {
    opacity: 0;
    transform: translateY(14px);
}

.cube-line {
    opacity: 0;
    transform: translateY(14px);
    animation: slideUpFade 0.7s ease forwards;
}

.cube-answers .answer-pill {
    border-radius: 999px;
    padding: 12px 20px;
    /* Adjust padding */
    border: 1px solid var(--border-primary);
    background: transparent;
    /* Transparent by default */
    color: var(--text-primary);
    cursor: pointer;
    transition: transform var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    font-size: 16px;
    /* Larger font */
    position: relative;
    z-index: 5;
    /* Ensure pills appear above cube */
}

.cube-answers .answer-pill:hover {
    transform: translateY(-2px);
    border-color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
    /* Subtle hover */
}

.cube-answers .answer-pill.selected {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.cube-answers .answer-pill.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.cube-controls {
    display: flex;
    justify-content: center;
    /* Center the Next button */
    align-items: center;
    margin-top: 32px;
    /* Increase margin */
    position: relative;
    z-index: 5;
    /* Below sport dropdown (3500+), above cube visual (0) */
    pointer-events: auto;
    /* Ensure button is clickable */
}

.cube-visual-area {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 40%;
    /* Bottom 40% for cube */
    width: 100%;
    cursor: grab;
    z-index: 0;
    pointer-events: none;
    /* Prevent blocking clicks on buttons below */
}

.cube-visual-area,
.cube-wrapper,
.cube {
    touch-action: none;
    -ms-touch-action: none;
    user-select: none;
    pointer-events: auto;
    /* Allow cube interaction */
}

.cube-visual-area:active {
    cursor: grabbing;
}

.cube-wrapper {
    perspective: 1200px;
    width: 220px;
    height: 220px;
    opacity: 0;
    transform: translateY(-80px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.cube-wrapper.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.cube {
    position: relative;
    width: 160px;
    height: 160px;
    margin: auto;
    transform-style: preserve-3d;
    transition: transform 1s ease-in-out;
    animation: cube-spin 20s linear infinite;
    transform: rotateX(-25deg) rotateY(45deg);
}

.cube.is-paused {
    animation: none !important;
}

.cube.is-celebrating {
    animation: cube-celebrate 2.5s ease-out forwards;
}

.cube-face {
    position: absolute;
    width: 160px;
    height: 160px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: transparent;
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

.cube-face.answered {
    border-color: transparent;
    background-color: var(--face-color, rgba(59, 130, 246, 0.7));
    /* Use CSS variable */
}

.cube-face-front {
    transform: rotateY(0deg) translateZ(80px);
}

.cube-face-right {
    transform: rotateY(90deg) translateZ(80px);
}

.cube-face-back {
    transform: rotateY(180deg) translateZ(80px);
}

.cube-face-left {
    transform: rotateY(-90deg) translateZ(80px);
}

.cube-face-top {
    transform: rotateX(90deg) translateZ(80px);
}

.cube-face-bottom {
    transform: rotateX(-90deg) translateZ(80px);
}

@keyframes cube-spin {
    from {
        transform: rotateX(var(--start-x, -25deg)) rotateY(var(--start-y, 45deg));
    }

    to {
        transform: rotateX(calc(var(--start-x, -25deg) + 360deg)) rotateY(calc(var(--start-y, 45deg) + 360deg));
    }
}

@keyframes cube-celebrate {
    0% {
        transform: rotateX(var(--start-x, 0deg)) rotateY(var(--start-y, 0deg)) rotateZ(0deg);
    }

    100% {
        transform: rotateX(calc(var(--start-x, 0deg) + 720deg)) rotateY(calc(var(--start-y, 0deg) - 360deg)) rotateZ(180deg);
    }
}


/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cube-question-title,
.cube-question-subtitle,
.cube-answers {
    transition: opacity 0.3s ease;
}

.form-step h2 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.step-description {
    color: var(--text-muted);
    font-size: var(--font-size-md);
    margin-bottom: var(--spacing-lg);
    line-height: var(--line-height-normal);
}

/* Form Groups */
.form-group {
    margin-bottom: 12px;
}

/* Contact Information step - increased spacing */
#step-2 .form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: var(--font-size-xs);
    font-weight: 500;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* Inputs - Updated to match profile settings style */
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--modal-element-bg);
    border: hidden;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: var(--font-size-md);
    font-family: var(--font-family);
    transition: all var(--transition-fast);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    background-color: var(--modal-element-bg-hover);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover {
    background-color: var(--modal-element-bg-hover);
}

/* Sport Dropdown - Matching settings.css */
.sport-dropdown-container {
    position: relative;
    z-index: 3500;
}

.sport-dropdown-container:has(.sport-dropdown.active) {
    z-index: 4000;
}

.sport-dropdown {
    position: relative;
    cursor: pointer;
}

.sport-search {
    width: 100%;
    padding: 12px 40px 12px 16px;
    background-color: var(--modal-element-bg);
    border: hidden;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: var(--font-size-md);
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
}

/* Ensure readonly input still has pointer cursor */
.sport-search[readonly] {
    cursor: pointer;
    background-color: var(--modal-element-bg);
    color: var(--text-primary);
    /* Prevent text selection on readonly */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.sport-search:hover {
    background-color: var(--modal-element-bg-hover);
}

.sport-search:focus {
    outline: none;
    background-color: var(--modal-element-bg-hover);
}

.dropdown-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-primary);
    pointer-events: none;
    transition: transform 0.3s ease;
    font-size: 12px;
}

.sport-dropdown.active .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.sport-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background-color: var(--bg-modal, #0f0f10);
    border: hidden;
    border-radius: var(--border-radius-lg);
    max-height: 240px;
    overflow-y: auto;
    display: none;
    z-index: 3999;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.sport-dropdown-container .sport-dropdown.active~.sport-options {
    display: block;
}

.sport-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    color: var(--text-primary);
    font-size: var(--font-size-md);
}

.sport-option:hover {
    background-color: var(--modal-element-bg-hover);
    color: var(--text-primary);
}

.sport-option.selected {
    background-color: var(--modal-element-bg-hover);
    color: var(--text-primary);
}

.sport-option.hidden {
    display: none;
}

/* Level Selection */
.level-options {
    display: grid;
    gap: 16px;
}

.level-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    background-color: var(--modal-element-bg);
    border: hidden;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: left;
}

.level-option:hover {
    background-color: var(--modal-element-bg-hover);
}

.level-option.selected {
    background-color: var(--modal-element-bg-hover);
}

.level-title {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.level-description {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* Days and Duration Selectors */
.days-selector,
.duration-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
}

.day-option,
.duration-option {
    padding: 12px;
    background-color: #1a1a1a;
    border: none;
    border-radius: 8px;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 16px;
    text-align: center;
    font-weight: 500;
}

.day-option:hover,
.duration-option:hover {
    background-color: rgba(3, 163, 177, 0.05);
}

.day-option.selected,
.duration-option.selected {
    background-color: rgba(3, 163, 177, 0.1);
    color: #ffffff;
}

/* Password Requirements Checklist */
.password-requirements {
    margin-top: 12px;
    padding: 16px;
    background-color: var(--modal-element-bg);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-fast);
}

.requirement-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 10px;
    font-weight: bold;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.requirement-text {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

/* Completed requirement styling */
.requirement-item.completed .requirement-icon {
    color: var(--bg-success);
}

.requirement-item.completed .requirement-icon::before {
    content: "✓";
}

.requirement-item.completed .requirement-text {
    color: var(--text-primary);
}

/* Error States */
input[type="text"].error,
input[type="email"].error,
input[type="password"].error,
.sport-search.error {
    color: #ef4444 !important;
}

input[type="text"].error::placeholder,
input[type="email"].error::placeholder,
input[type="password"].error::placeholder,
.sport-search.error::placeholder {
    color: #ef4444 !important;
}

.level-option.error {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.1) !important;
}

/* Skip Notice */
.skip-notice {
    margin: 20px 0;
}

.skip-notice p {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}

.form-actions .btn {
    min-width: 120px;
}

.form-actions .btn:only-child {
    margin-left: auto;
}

/* Button Styles - Updated to match profile settings */
.btn {
    padding: 12px 24px;
    border: 1px solid var(--border-primary);
    border-radius: 999px;
    /* Fully rounded */
    font-size: var(--font-size-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-align: center;
    justify-content: center;
    font-family: var(--font-family);
    background-color: transparent;
    /* Transparent background */
    color: var(--text-primary);
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.btn:hover,
.btn-primary:hover,
.register-container .btn-primary:hover,
#register-form .btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.btn:disabled,
.btn-primary:disabled {
    background-color: var(--bg-button);
    color: var(--text-muted);
    border-color: var(--border-primary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background-color: #5a6878;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #6b7a8c;
    transform: translateY(-1px);
}

.btn-ghost {
    background-color: transparent;
    color: #a0aec0;
    border: none;
}

.btn-ghost:hover {
    color: #03a3b1;
    background-color: rgba(3, 163, 177, 0.05);
}

/* Preferences Container - Matching Goal Selector Style */
.preferences-container {
    position: relative;
}

.preferences-scroll-wrapper {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    margin-right: -8px;
}

.preferences-scroll-wrapper::-webkit-scrollbar {
    width: 6px;
}

.preferences-scroll-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.preferences-scroll-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.preferences-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

.preferences-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 0;
}

.preference-option {
    padding: 12px 16px;
    border-radius: 20px;
    background: #2d2d2d;
    color: #EEFDF9;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    user-select: none;
    text-align: center;
    flex: 0 0 auto;
}

.preference-option:hover {
    background: #EEFDF950;
    color: #e5e7eb;
    transform: translateY(-1px);
}

.preference-option.selected {
    background: #EEFDF950;
    color: #ffffff;
    transform: translateY(-1px);
}

.scroll-indicator {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: #a0aec0;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.scroll-indicator.visible {
    opacity: 1;
}

.scroll-indicator svg {
    width: 20px;
    height: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(4px);
    }

    60% {
        transform: translateY(2px);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .register-container {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .form-container {
        padding: 24px;
        margin-top: 20px;
    }

    .form-title {
        font-size: 24px;
    }


    .step-label {
        font-size: 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .days-selector,
    .duration-selector {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .form-actions .btn:only-child {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .register-container {
        padding-top: 20px;
        /* Reduce top padding on mobile */
    }
}

/* Language Selection Styles - Updated to match profile settings */
.form-control {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--modal-element-bg);
    border: hidden;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: var(--font-size-md);
    font-family: var(--font-family);
    transition: all var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23EEFDF9' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-control:focus {
    outline: none;
    background-color: var(--modal-element-bg-hover);
}

.form-control:hover {
    background-color: var(--modal-element-bg-hover);
}

/* Dropdown options styling for select elements */
.form-control option {
    background-color: var(--bg-modal);
    color: var(--text-primary);
    padding: 8px;
}

.field-subtitle {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: 8px;
    margin-bottom: 0;
    line-height: 1.4;
}

.language-names-toggle {
    padding: 12px 16px;
    background-color: var(--modal-element-bg);
    border: hidden;
    border-radius: var(--border-radius);
    margin-top: 12px;
    transition: all var(--transition-fast);
    display: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    margin: 0;
}

.toggle-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #03a3b1;
}

.checkbox-text {
    flex: 1;
    font-size: 16px;
    color: #e5e7eb;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 12px;
    color: #a0aec0;
    cursor: help;
    transition: all 0.2s ease;
}

.info-icon:hover {
    background-color: #03a3b1;
    color: #ffffff;
}

/* Terms Agreement */
.terms-agreement {
    padding: 14px;
    border: hidden;
    border-radius: var(--border-radius-lg);
}

.terms-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 10px;
    margin: 0;
}

.terms-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    cursor: pointer;
    accent-color: #03a3b1;
    flex-shrink: 0;
}

.terms-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
}

.terms-text a {
    color: #03a3b1;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.terms-text a:hover {
    color: #04bfce;
    text-decoration: underline;
}

/* Email Consent Section */
.email-consent-section {
    margin: 24px 0 0 0;
    padding: 16px;
    border-radius: var(--border-radius-lg);
}

.consent-info-text {
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.marketing-consent-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 10px;
    margin: 0;
}

.marketing-consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #03a3b1;
    flex-shrink: 0;
}

.marketing-consent-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
}

/* ===== MODERN STEP CONTAINER (All Steps) ===== */
.modern-step-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 200px);
}

.modern-step-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.modern-step-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0 0 32px 0;
    line-height: 1.5;
}

.modern-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-align: left;
}

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

.modern-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.modern-input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--modal-element-bg);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: var(--font-size-md);
    font-family: var(--font-family);
    transition: all var(--transition-fast);
}

.modern-input:focus {
    outline: none;
    background-color: var(--modal-element-bg-hover);
}

.modern-input:hover {
    background-color: var(--modal-element-bg-hover);
}

.modern-input.error {
    /* Border removed - errors shown via placeholder color */
}

/* ===== STEP 0: WELCOME SCREEN ===== */
.welcome-screen {
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.welcome-text-container {
    max-width: 600px;
    margin-bottom: 48px;
}

.welcome-line {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.8s ease forwards;
    margin: 0 0 20px 0;
}

.welcome-line:first-child {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 28px;
}

.welcome-line:not(:first-child) {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.5;
}

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply delays via data-delay attribute */
.welcome-line[data-delay="0"] {
    animation-delay: 0s;
}

.welcome-line[data-delay="600"] {
    animation-delay: 0.6s;
}

.welcome-line[data-delay="1200"] {
    animation-delay: 1.2s;
}

.welcome-line[data-delay="1800"] {
    animation-delay: 1.8s;
}

.welcome-continue {
    opacity: 0;
    animation: slideUpFade 0.8s ease forwards 2.4s;
    min-width: 200px;
}

/* ===== ANIMATED STEP CONTAINER (Steps 1 & 2) ===== */
.animated-step-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: calc(100vh - 200px);
}

.animated-step-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.8s ease forwards;
}

.animated-step-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0 0 40px 0;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.8s ease forwards;
}

.animated-form-element {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.8s ease forwards;
    width: 100%;
    max-width: 500px;
    z-index: 1;
}

/* Ensure dropdown container wins when active */
.animated-form-element:has(.sport-dropdown.active) {
    z-index: 1000;
}

/* Animation delays for animated steps */
.animated-step-title[data-delay="0"] {
    animation-delay: 0s;
}

.animated-step-subtitle[data-delay="400"] {
    animation-delay: 0.4s;
}

.animated-form-element[data-delay="800"] {
    animation-delay: 0.8s;
}

.animated-form-element[data-delay="1200"] {
    animation-delay: 1.2s;
}

/* ===== STEP 1: LEVEL OPTIONS (MODERN) ===== */
.level-options-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.level-option-modern {
    background-color: var(--modal-element-bg);
    border: none;
    border-radius: var(--border-radius-lg);
    padding: 16px 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.level-option-modern:hover {
    background-color: var(--modal-element-bg-hover);
    transform: translateY(-2px);
}

.level-option-modern.selected {
    background-color: var(--modal-element-bg-hover);
}

.level-option-modern.error {
    /* Border removed - errors shown via background color */
}

.level-option-modern .level-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.level-option-modern .level-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    line-height: 1.3;
}

/* ===== STEP 2: COMPACT PASSWORD REQUIREMENTS ===== */
.password-requirements-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.password-requirements-compact .requirement-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.password-requirements-compact .requirement-item.completed {
    color: var(--bg-success);
}

.password-requirements-compact .requirement-icon {
    font-size: 0.7rem;
    transition: all var(--transition-fast);
}

.password-requirements-compact .requirement-item.completed .requirement-icon {
    font-size: 0;
    /* Hide the original ○ character */
}

.password-requirements-compact .requirement-item.completed .requirement-icon::before {
    content: "●";
    font-size: 12px;
    /* Restore font size for the filled circle */
}

/* ===== MODERN PREFERENCES LAYOUT (STEP 4) ===== */
.preferences-modern-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 200px);
    justify-content: flex-start;
}

.preferences-modern-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.preferences-modern-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.preferences-modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    max-height: 50vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a #1a1a1a;
}

/* Custom scrollbar for preferences grid (WebKit browsers) */
.preferences-modern-grid::-webkit-scrollbar {
    width: 8px;
}

.preferences-modern-grid::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.preferences-modern-grid::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 4px;
}

.preferences-modern-grid::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

/* Modern preference cards */
.preferences-modern-grid .preference-option {
    background-color: var(--modal-element-bg);
    border: none;
    border-radius: var(--border-radius-lg);
    padding: 14px 16px;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}

.preferences-modern-grid .preference-option:hover {
    background-color: var(--modal-element-bg-hover);
    transform: translateY(-2px);
}

.preferences-modern-grid .preference-option.selected {
    background-color: var(--modal-element-bg-hover);
}

/* If preferences have name/description structure (future) */
.preferences-modern-grid .preference-option .preference-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.preferences-modern-grid .preference-option .preference-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {

    /* Welcome Screen */
    .welcome-line:first-child {
        font-size: 1.75rem;
        margin-bottom: 20px;
    }

    .welcome-line:not(:first-child) {
        font-size: 1rem;
        margin-bottom: 16px;
    }

    .welcome-text-container {
        margin-bottom: 32px;
    }

    /* Animated Steps (Sport & Level) */
    .animated-step-container {
        padding: 10px 0;
        min-height: calc(100vh - 150px);
    }

    .animated-step-title {
        font-size: 1.5rem;
    }

    .animated-step-subtitle {
        font-size: 0.9rem;
        margin-bottom: 32px;
    }

    .animated-form-element {
        max-width: 100%;
    }

    /* Step Titles */
    .modern-step-title {
        font-size: 1.5rem;
    }

    .modern-step-subtitle {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }

    .modern-step-container {
        padding: 10px 0;
        min-height: calc(100vh - 150px);
    }

    /* Level Options - Stack on mobile */
    .level-options-modern {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .level-option-modern {
        padding: 14px 12px;
    }

    .level-option-modern .level-title {
        font-size: 0.95rem;
    }

    .level-option-modern .level-description {
        font-size: 0.75rem;
    }

    /* Form Inputs */
    .modern-input {
        padding: 10px 14px;
        font-size: 16px;
        /* Prevents iOS zoom on focus */
    }

    .modern-form-group {
        margin-bottom: 16px;
    }

    /* Password Requirements */
    .password-requirements-compact {
        gap: 6px;
    }

    .password-requirements-compact .requirement-item {
        font-size: 0.7rem;
    }

    /* Preferences Grid */
    .preferences-modern-title {
        font-size: 1.5rem;
    }

    .preferences-modern-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
        max-height: 45vh;
    }

    .preferences-modern-grid .preference-option {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    /* Terms Agreement */
    .terms-agreement {
        padding: 12px;
    }

    .terms-text {
        font-size: 0.8rem;
    }

    /* Skip Notice */
    .skip-notice {
        margin-bottom: 16px;
    }

    .skip-notice p {
        font-size: 0.8rem;
    }

    /* Form Actions */
    .form-actions {
        gap: 10px;
    }
}

@media (max-width: 480px) {

    /* Extra small screens */
    .welcome-line:first-child {
        font-size: 1.5rem;
    }

    .animated-step-title {
        font-size: 1.35rem;
    }

    .animated-step-subtitle {
        font-size: 0.85rem;
        margin-bottom: 28px;
    }

    .modern-step-title {
        font-size: 1.35rem;
    }

    .modern-form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .level-options-modern {
        gap: 8px;
    }

    .preferences-modern-grid {
        grid-template-columns: 1fr;
        max-height: 40vh;
    }
}

/* Extra breakpoint for very small screens like 375px */
@media (max-width: 400px) {

    /* Cube Stage - Better proportions for small screens */
    .cube-stage {
        height: calc(100vh - 60px);
    }

    .cube-question-area {
        height: 70%;
        /* More space for content */
        padding: 16px 12px;
    }

    .cube-visual-area {
        height: 30%;
        /* Less space for cube */
    }

    /* Cube Question Header - Reduce spacing */
    .cube-question-header {
        margin-bottom: 16px;
        /* Reduced from 28px */
    }

    /* Cube Question Title - Smaller for mobile */
    .cube-question-title {
        font-size: 22px;
        /* Reduced from 32px */
        margin: 0 0 6px;
        line-height: 1.2;
    }

    /* Cube Question Subtitle - Smaller for mobile */
    .cube-question-subtitle {
        font-size: 14px;
        /* Reduced from 16px */
        line-height: 1.4;
    }

    /* Cube Answers - Reduce top margin */
    .cube-answers {
        margin-top: 12px;
        /* Reduced from 24px */
        gap: 10px;
        /* Slightly reduced gap */
    }

    /* Answer Pills - Smaller padding and font */
    .cube-answers .answer-pill {
        padding: 10px 16px;
        /* Reduced from 12px 20px */
        font-size: 14px;
        /* Reduced from 16px */
    }

    /* Cube Controls - Reduce margin */
    .cube-controls {
        margin-top: 20px;
        /* Reduced from 32px */
    }

    /* Cube - Smaller size for mobile */
    .cube-wrapper {
        width: 140px;
        /* Reduced from 220px */
        height: 140px;
        transform: translateY(-40px);
        /* Less offset */
    }

    .cube {
        width: 100px;
        /* Reduced from 160px */
        height: 100px;
    }

    .cube-face {
        width: 100px;
        /* Reduced from 160px */
        height: 100px;
    }

    /* Adjust translateZ for smaller cube faces */
    .cube-face-front {
        transform: rotateY(0deg) translateZ(50px);
    }

    /* Was 80px */
    .cube-face-right {
        transform: rotateY(90deg) translateZ(50px);
    }

    .cube-face-back {
        transform: rotateY(180deg) translateZ(50px);
    }

    .cube-face-left {
        transform: rotateY(-90deg) translateZ(50px);
    }

    .cube-face-top {
        transform: rotateX(90deg) translateZ(50px);
    }

    .cube-face-bottom {
        transform: rotateX(-90deg) translateZ(50px);
    }

    /* Back button - Ensure visibility */
    .back-nav-register a {
        top: 12px;
        left: 12px;
        font-size: 13px;
    }

    /* Register container - Better padding */
    .register-container {
        padding: 20px 0px 20px 0px;
    }

    /* Button - Ensure good click target */
    .cube-controls .btn {
        min-width: 140px;
        padding: 12px 28px;
        font-size: 15px;
    }
}