/*
Theme Name: Swiipe
Author: Swiipe
Description: A social connection WordPress theme.
Version: 1.1
*/

/* --- Global Styles from index.php --- */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: #0F0C29;
    background: -webkit-linear-gradient(to right, #24243e, #302b63, #0f0c29);
    background: linear-gradient(to right, #24243e, #302b63, #0f0c29);
    touch-action: manipulation;
}
* {
    touch-action: manipulation;
}
input, textarea, select {
    -webkit-user-select: text;
    user-select: text;
}
#social-auth-app-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
.social-app-header {
    position: absolute;
    top: 0; left: 0; right: 0; height: 60px;
    background: #0F0C29;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; z-index: 1000; box-sizing: border-box;
}
.social-app-content {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 80px 20px 100px; overflow-y: auto; box-sizing: border-box; min-height: 0;
}
.social-app-footer {
    position: absolute;
    bottom: 0; left: 0; right: 0; height: 80px;
    background: #0F0C29;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex; align-items: center; justify-content: space-around;
    z-index: 1000; padding: 0; box-sizing: border-box;
}
.social-app-header[style*="display: none"] + .social-app-content { padding-top: 20px; }
.social-app-content:has(+ .social-app-footer[style*="display: none"]),
.social-app-content:last-child { padding-bottom: 20px; }
.header-btn {
    width: 40px; height: 40px; background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 12px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: all 0.3s ease; color: white; text-decoration: none;
}
.header-btn:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.05); }
.site-logo { color: white; font-size: 20px; font-weight: bold; text-align: center; flex: 1; }
.footer-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s ease; color: rgba(255, 255, 255, 0.6);
    text-decoration: none; padding: 8px; border-radius: 12px; margin: 0 4px;
}
.footer-tab:hover, .footer-tab.active { color: white; background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }
.tab-icon { font-size: 20px; margin-bottom: 4px; }
.tab-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
#social-main-content { max-width: 500px; width: 100%; margin: 0 auto; }
.loading-spinner {
    display: inline-block; width: 40px; height: 40px; border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%; border-top-color: rgba(255, 255, 255, 0.8);
    animation: spin 1s linear infinite; margin: 0 auto 15px;
}
.loading-container {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 300px; color: white; font-size: 16px; background: rgba(255, 255, 255, 0.1);
    border-radius: 25px; backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}
.loading-text { color: rgba(255, 255, 255, 0.8); font-size: 16px; font-weight: 300; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Unified Container Styles for Login/Signup and Profile Steps --- */
#social-auth-container,
#profile-steps-container {
    max-width: 500px;
    width: 100%;
    height: 500px;
    margin: 0 auto;
    padding: 30px;
    background: #1e1b34;
    border-radius: 25px;
    box-shadow: 0 0 30px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease-in-out;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

#social-auth-container.profile-setup-active {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

#social-auth-container.profile-setup-active #profile-setup-wrapper,
#social-auth-container.profile-setup-active #profile-steps-container {
    height: 100%;
}

/* --- Unified Form Container Styles --- */
.form-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
    min-height: 0;
}

.scrollable-content,
.steps-content-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 15px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0 -20px 15px -20px;
    padding: 0 20px;
}

.form-content-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

.button-container,
.step-navigation {
    flex-shrink: 0;
    display: flex;
    margin-top: auto;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.button-container {
    flex-direction: column;
    gap: 10px;
}

.step-navigation {
    justify-content: space-between;
    gap: 15px;
}

.button-container .btn-primary,
.button-container .btn-secondary {
    width: 100%;
    margin-top: 0;
}

.step-navigation .btn-primary {
    flex: 1;
}

.step-navigation .btn-secondary {
    width: 50px;
    flex-shrink: 0;
}

.scrollable-content::-webkit-scrollbar,
.steps-content-wrapper::-webkit-scrollbar {
    width: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scrollable-content:hover::-webkit-scrollbar,
.scrollable-content:active::-webkit-scrollbar,
.steps-content-wrapper:hover::-webkit-scrollbar,
.steps-content-wrapper:active::-webkit-scrollbar {
    opacity: 1;
}

.scrollable-content::-webkit-scrollbar-track,
.steps-content-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.scrollable-content::-webkit-scrollbar-thumb,
.steps-content-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover,
.steps-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* --- Login/Signup Form Specific Styles --- */
.auth-tabs {
    display: flex;
    margin: 0 auto 30px auto;
    flex-shrink: 0;
    background-color: #27243e;
    border-radius: 25px;
    padding: 4px;
    border: 1px solid #3c3958;
    max-width: 350px;
    width: 100%;
    box-sizing: border-box;
}

.tab-button {
    padding: 10px 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease-in-out;
    border-radius: 22px;
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

.tab-button:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.tab-button.active {
    color: white;
    font-weight: 600;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.2);
}

#auth-forms-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

.auth-form {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.auth-form .scrollable-content {
    justify-content: center;
}
.auth-form .form-content-wrapper {
    padding-top: 0;
}


.auth-form h2 {
    color: white !important;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 400;
    flex-shrink: 0;
    font-size: 24px !important;
}

.help-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
    font-style: italic;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 350px;
}

.auth-form .form-group {
    width: 95%;
}

.form-group.disabled-field {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

.input-wrapper {
    position: relative;
    width: 100%;
    border-radius: 25px;
    padding: 2px;
    background: transparent;
    transition: all 0.3s ease;
    margin: 4px 2px; /* Increased margin to prevent gradient clipping */
}

.input-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 25px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.input-wrapper:focus-within::before {
    opacity: 1;
}

.form-group input,
.password-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #3c3958;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s;
    background: #27243e;
    color: white;
    box-sizing: border-box;
    text-align: center;
    direction: ltr;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: transparent;
    background: #27243e;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    text-align: center !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.password-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    max-width: 350px;
    padding: 0;
    background: transparent;
    border: none;
}

.password-wrapper input {
    width: 100%;
    padding: 15px 45px !important;
    text-align: center !important;
    border: 2px solid #3c3958;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s;
    background: #27243e;
    color: white;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.password-wrapper input:focus {
    outline: none;
    border-color: transparent;
    background: #27243e;
}

.password-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    text-align: center !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.monkey-eye {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s;
    user-select: none;
    z-index: 2;
    pointer-events: all;
}

.monkey-eye:hover {
    color: rgba(255, 255, 255, 0.8);
}

.login-options {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.forgot-password {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: white;
    text-decoration: underline;
}

/* --- Profile Steps Specific Styles --- */
.progress-container {
    margin-bottom: 20px;
    text-align: center;
    flex-shrink: 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 16.67%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.step-content {
    display: none;
    animation: fadeIn 0.3s ease;
    padding: 15px 20px;
}

.step-content:first-child {
    margin-top: -15px;
}

.step-content:last-child {
    margin-bottom: -15px;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-header {
    text-align: center;
    margin-bottom: 25px;
}

.step-header h2 {
    color: white;
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 8px;
}

.step-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

#profile-steps-container .form-group {
    margin-bottom: 20px;
    width: 100%;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

#profile-steps-container .form-group label {
    display: block;
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    text-align: center;
}

.form-group label .label-note {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

#profile-steps-container .input-wrapper {
    position: relative;
    width: 100%;
    border-radius: 25px;
    padding: 2px;
    background: transparent;
    transition: all 0.3s ease;
    margin: 4px 2px; /* Increased margin to prevent gradient clipping */
}

#profile-steps-container .input-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 25px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#profile-steps-container .input-wrapper:focus-within::before {
    opacity: 1;
}

#profile-steps-container .form-group input[type="text"],
#profile-steps-container .form-group textarea,
#profile-steps-container .glass-select,
#profile-steps-container .selector-display,
#profile-steps-container .country-display {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #3c3958;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s;
    background: #27243e;
    color: white;
    box-sizing: border-box;
    text-align: center;
    height: 54px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#profile-steps-container .form-group input[type="text"],
#profile-steps-container .selector-display,
#profile-steps-container .country-display {
    display: flex;
    align-items: center;
    justify-content: center;
}

#profile-steps-container .selector-display {
    cursor: pointer;
}

#profile-steps-container .selector-display span {
    color: rgba(255, 255, 255, 0.5);
}

#profile-steps-container .selector-display span.has-value {
    color: white;
}

#profile-steps-container .input-wrapper:focus-within input,
#profile-steps-container .input-wrapper:focus-within textarea,
#profile-steps-container .input-wrapper:focus-within .glass-select,
#profile-steps-container .input-wrapper:focus-within .selector-display,
#profile-steps-container .input-wrapper:focus-within .country-display {
    outline: none;
    border-color: transparent;
    background: #27243e;
}

#profile-steps-container .form-group input::placeholder,
#profile-steps-container .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
    text-align: center !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.glass-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    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='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 15px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
    text-align-last: center;
}

.glass-select:invalid {
    color: rgba(255, 255, 255, 0.5);
}

.glass-select option {
    background: #27243e;
    color: white;
    text-align: center;
}

.glass-select option[disabled] {
    display: none !important;
}

.country-icon,
.country-text,
#age-value {
    line-height: 1;
}

.detected-country {
    gap: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.country-icon {
    font-size: 18px;
}

.country-text {
    font-size: 14px;
}

#profile-steps-container .form-group textarea {
    min-height: 100px;
    height: auto;
    resize: vertical;
    display: block;
    max-height: 150px;
}

.char-count {
    text-align: right;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-top: 5px;
    width: 100%;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

.checkbox-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    color: white;
    position: relative;
    padding-left: 30px;
    font-size: 14px;
    -webkit-tap-highlight-color: transparent;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-label span {
    position: relative;
}

.checkbox-label span::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: #504e63;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.2s;
}

.checkbox-label input[type="checkbox"]:checked + span::after {
    content: '';
    position: absolute;
    left: -24px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    transition: all 0.2s;
}

.checkbox-label input[type="checkbox"]:checked + span::before {
    border-color: #764ba2;
    background-color: #667eea;
}

.checkbox-label:hover span::before {
    border-color: rgba(255, 255, 255, 0.8);
}

.interests-container {
    max-width: 350px;
    margin: 0 auto 20px auto;
    box-sizing: border-box;
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
}

.interest-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    background: #504e63;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-size: 12px;
    height: 32px;
    word-break: break-word;
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.interest-tag:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.interest-tag input[type="checkbox"] {
    display: none;
}

.interest-tag:has(input[type="checkbox"]:checked) {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.02);
}

.interest-counter {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-top: 0;
}

.photo-upload-container {
    margin-bottom: 15px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.photo-slot {
    aspect-ratio: 4/5;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #504e63;
}

.photo-slot .photo-upload-spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15); 
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 5;
    pointer-events: none;
}

.photo-slot .photo-upload-spinner::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.photo-slot .zoom-controls {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 15;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.photo-slot:hover .zoom-controls {
    opacity: 1;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.zoom-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

.photo-slot.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.main-photo {
    grid-column: span 2;
    grid-row: span 2;
}

.upload-area {
    width: 100%;
    height: 100%;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    background: transparent;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.upload-area:hover:not(.disabled) {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

.upload-area.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.upload-icon {
    font-size: 20px;
    margin-bottom: 6px;
}

.upload-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    text-align: center;
}

/* ================== AMENDMENT START: Fix Photo Uploader Gap ================== */
.draggable-image {
    position: absolute;
    max-width: none;
    max-height: none;
    cursor: grab;
    will-change: transform;
    transform-origin: center center;
    /* These properties provide a base "cover" effect to prevent gaps */
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* =================== AMENDMENT END =================== */


.photo-slot.dragging {
    opacity: 0.5;
}

.photo-slot.drag-over {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.5);
}

.delete-photo-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    line-height: 1;
    font-weight: normal;
    padding: 0;
    text-shadow: 0 0 5px rgba(0,0,0,0.7);
}

.delete-photo-btn:hover {
    transform: scale(1.1);
    box-shadow: none;
    color: #ff6b6b;
}

.photo-requirements {
    background: #504e63;
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 15px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
    font-size: 12px;
}

.requirement-item:last-child {
    margin-bottom: 0;
}

.requirement-item.warning {
    color: #ffcc00;
}

.profile-review {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-section {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 10px 20px;
    margin-bottom: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.review-section h4 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    margin-top: 0;
    padding-bottom: 0;
    border-bottom: none;
    text-align: center;
}

.review-item {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.review-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    flex-shrink: 0;
}

.review-value {
    color: white;
    font-size: 12px;
    font-weight: 500;
    flex: 0 1 auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.review-about {
    color: white;
    font-size: 12px;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 12px;
    border-radius: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    text-align: center;
}

.review-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.review-interests .interest-tag-small {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 10px;
    text-transform: capitalize;
}

.review-photos {
    width: 100%;
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

.review-photos::-webkit-scrollbar {
    height: 4px;
}
.review-photos::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}
.review-photos::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

#step-6 .review-photo-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: -moz-fit-content;
    width: fit-content;
    min-width: 100%;
    flex-wrap: nowrap;
    padding: 0 5px;
    box-sizing: border-box;
}

#step-6 .review-photo-item {
    width: 80px;
    flex-shrink: 0;
    aspect-ratio: 4/5;
    border-radius: 8px;
    overflow: hidden;
    background-color: #27243e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative; /* Crucial for positioning the img child */
}

#step-6 .review-photo-item img {
    /* These properties are now set by JS, but this acts as a fallback/base */
    position: absolute;
    max-width: none;
    max-height: none;
    will-change: transform;
}


.no-photos {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    font-size: 12px;
}

.btn-arrow {
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 50px;
}

#profile-steps-container .btn-primary,
#profile-steps-container .btn-secondary {
    height: 50px;
    padding: 15px 25px;
}

#profile-steps-container .btn-secondary {
    background: #3c3958;
    color: white;
    border: none;
}

#profile-steps-container .btn-secondary:hover:not(:disabled) {
    background: #504e63;
    transform: translateY(-2px);
}

/* --- Universal Button Styles --- */
.btn-primary, .btn-secondary {
    padding: 15px 25px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: none;
    letter-spacing: 0;
}

.btn-primary {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled),
.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4);
}

.btn-secondary:disabled,
.btn-primary:disabled {
    background: #3c3958;
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(14, 11, 40, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    animation: modalFadeIn 0.3s ease-out;
    display: none; align-items: center; justify-content: center;
    padding: 15px; box-sizing: border-box;
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    min-width: 300px; max-width: 100%;
    animation: modalSlideIn 0.3s ease-out;
    margin: auto; position: relative; transform: none;
}

.modal-header {
    display: flex;
    justify-content: flex-end;
    padding: 15px 20px 0;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 0 20px 20px;
    text-align: center;
}

.modal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
}

.modal-icon.success {
    background: rgba(81, 207, 102, 0.2);
    border: 2px solid rgba(81, 207, 102, 0.4);
    color: #51cf66;
}

.modal-icon.success::before {
    content: "✓";
}

.modal-icon.error {
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
}

.modal-icon.error::before {
    content: "✕";
}

.modal-icon.spinner {
    background: none;
    border: none;
}

.modal-icon .key-icon {
    width: 30px;
    height: 30px;
    color: rgba(255, 255, 255, 0.8);
}

.modal-message {
    color: white;
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 20px;
}

.modal-footer {
    padding: 0 20px 20px;
    text-align: center;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
}

.modal-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.modal-btn.primary {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.modal-btn.primary:hover {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(255, 255, 255, 0.5);
}

.reset-link-btn {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    padding: 15px 25px;
    transition: all 0.3s;
    text-transform: none;
    letter-spacing: 0;
}

.reset-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4);
}

#forgot-password-modal .modal-content {
    max-width: 400px;
}

#forgot-password-modal .modal-icon {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

#forgot-password-modal .form-group {
    margin-bottom: 20px;
    text-align: left;
}

#forgot-password-modal input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s;
    background: #27243e;
    color: white;
    box-sizing: border-box;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#forgot-password-modal input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#forgot-password-modal input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    background: #27243e;
}

/* --- Generic & Age Popup Styles --- */
.age-popup-content,
.generic-popup-content {
    max-width: 500px;
    width: 90%;
    max-height: 500px;
}

#age-popup .modal-header,
#gender-popup .modal-header,
#orientation-popup .modal-header {
    justify-content: center;
    position: relative;
    padding: 20px 10px 10px 10px;
}

#age-popup .modal-header h3,
#gender-popup .modal-header h3,
#orientation-popup .modal-header h3 {
    color: white;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    flex: 1;
    text-align: center;
}

#age-popup .modal-close,
#gender-popup .modal-close,
#orientation-popup .modal-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.age-picker-container,
.generic-picker-container {
    max-height: 300px;
    overflow-y: auto;
    margin: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.age-picker-container::-webkit-scrollbar,
.generic-picker-container::-webkit-scrollbar {
    display: none;
}

.age-list,
.generic-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 15px 0;
}

.age-option,
.generic-option {
    padding: 12px 20px;
    color: white;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.3s;
    text-align: center;
    font-size: 16px;
}

.age-option:hover,
.generic-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.age-option.selected,
.generic-option.selected {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.select-age-btn,
.select-generic-btn {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.select-age-btn:hover,
.select-generic-btn:hover {
    background: linear-gradient(90deg, #5a6fd8 0%, #6a4190 100%) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* --- Animation Keyframes --- */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-overlay.show {
    display: flex;
}

.modal-loader {
    margin-top: 10px;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* --- User Dashboard Styles --- */
#user-dashboard-container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    box-shadow: 0 0 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dashboard-welcome {
    text-align: center;
    color: white;
}

.dashboard-welcome h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.profile-summary {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 25px;
    margin: 25px 0;
}

#user-dashboard-container .photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin: 20px auto 0;
    max-width: 400px;
}
#user-dashboard-container .photos-grid img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 8px;
    background-color: #27243e;
}

.dashboard-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 30px;
}

.action-btn {
    padding: 15px 20px;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
}

.action-btn.primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.action-btn.logout {
    background: rgba(255, 107, 107, 0.2);
    color: white;
}

/* --- Mobile Responsive Styles --- */
@media (max-width: 768px) {
    .scrollable-content,
    .steps-content-wrapper {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .scrollable-content::-webkit-scrollbar,
    .steps-content-wrapper::-webkit-scrollbar {
        display: none;
    }
    .login-options {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .scrollable-content {
        padding-top: 5px;
    }

    .auth-form h2 {
        margin-bottom: 10px;
        font-size: 20px !important;
    }
}

/* --- Small Mobile Specific Styles --- */
@media (max-width: 480px) {
    .social-app-header { height: 50px; padding: 0 15px; }
    .social-app-footer { height: 70px; }
    .header-btn { width: 35px; height: 35px; }
    .site-logo { font-size: 18px; }
    .tab-icon { font-size: 18px; }
    .tab-label { font-size: 10px; }

    /* Default mobile content padding (for logged-in views) */
    .social-app-content { 
        padding: 70px 15px 90px; 
    }
    
    /* ================== AMENDMENT START: Mobile Viewport Sizing & Centering ================== */
    /* Override padding from the main content area on auth screens to allow full viewport control */
    .social-app-content:has(#social-auth-container),
    .social-app-content:has(#profile-steps-container) {
        padding: 0;
    }

    /* Use the direct parent of the auth container to perform the centering */
    #social-main-content:has(#social-auth-container),
    #social-main-content:has(#profile-steps-container) {
        display: flex;
        align-items: center; /* This provides the vertical centering */
        justify-content: center;
        height: 100%;
        width: 100%;
    }

    /* Set the auth container to 80% of the viewport height */
    #social-auth-container,
    #profile-steps-container {
        height: 80vh;
        max-height: 650px; /* Cap the height for very tall screens */
        width: 90vw;
        max-width: 400px; /* Cap the width */
        padding: 20px;
        border-radius: 20px;
    }
     /* =================== AMENDMENT END =================== */

    .modal-content {
        min-width: 280px;
        margin: 20px;
    }
    .modal-footer {
        flex-direction: column;
    }
    .modal-btn {
        flex: none;
    }
    .auth-tabs {
        gap: 5px;
    }
    .tab-button {
        padding: 10px 15px;
        font-size: 14px;
    }
    .auth-form h2 {
        margin-bottom: 8px;
        font-size: 18px !important;
    }
    .interests-grid {
        gap: 6px;
        padding: 0 1px;
    }
    .interest-tag {
        font-size: 11px;
        padding: 8px 6px;
        min-height: 36px;
    }
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .main-photo {
        grid-column: span 2;
        grid-row: span 1;
    }
    .step-navigation {
        flex-direction: row;
        gap: 10px;
    }
}

.draggable-image:active {
    cursor: grabbing;
}

body.is-panning-photo {
    cursor: grabbing !important;
    user-select: none;
    -webkit-user-select: none;
}

