/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #ffffff; /* Light theme background */
    color: #0f1419; /* Default dark text for light theme */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main Container */
.main-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: row;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Login Section (Left side) */
.login-section {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 600px;
}

.login-section h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 3rem;
    letter-spacing: -1.5px;
}

/* Buttons */
.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 300px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.7rem 2rem;
    border-radius: 9999px; /* Pill shape */
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    border: none;
    background: transparent;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.btn img, .btn svg {
    margin-right: 8px;
}

.btn-outline {
    border: 1px solid #cfd9de;
    background-color: #ffffff;
    color: #0f1419;
}

.btn-outline:hover {
    background-color: #e7e7e8;
}

.btn-primary {
    background-color: #0f1419;
    color: #ffffff;
    margin-top: 1.5rem;
}

.btn-primary:hover {
    background-color: #272c30;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #536471;
    margin: 1.5rem 0;
    max-width: 300px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #cfd9de;
}

.divider span {
    padding: 0 10px;
    font-size: 0.9rem;
}

/* Form */
.login-form {
    max-width: 300px;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
    transform: translate3d(0, 0, 0);
}

.input-group input {
    width: 100%;
    padding: 1.5rem 0.5rem 0.5rem 0.5rem;
    font-size: 1rem;
    border: 1px solid #cfd9de;
    border-radius: 4px;
    outline: none;
    background-color: transparent;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-group input:focus {
    border-color: #1d9bf0;
    box-shadow: 0 0 0 1px #1d9bf0;
}

.input-group label {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%) scale(1);
    transform-origin: left top;
    font-size: 1rem;
    color: #536471;
    transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), color 0.18s ease;
    pointer-events: none;
    backface-visibility: hidden;
}

/* Floating label effect: GPU accelerated translation and scaling instead of animating 'top' layout property */
.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    transform: translateY(-90%) scale(0.8);
    color: #1d9bf0;
}
.input-group input:not(:placeholder-shown):not(:focus) + label {
    color: #536471;
}

/* Terms */
.terms {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #536471;
    max-width: 300px;
    line-height: 1.4;
}

.terms a {
    color: #1d9bf0;
    text-decoration: none;
}

.terms a:hover {
    text-decoration: underline;
}

/* Logo Section (Right side) */
.logo-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* VIBLY Outline Text */
.vibly-logo {
    font-size: 15rem; /* Massive size */
    font-weight: 900;
    font-family: Arial, sans-serif;
    color: transparent; /* Makes text fill transparent */
    -webkit-text-stroke: 4px #0f1419; /* The black outline */
    letter-spacing: -5px;
    transform: scaleY(1.1) translate3d(0, 0, 0); /* Force GPU acceleration */
    user-select: none;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.35s ease, text-shadow 0.35s ease;
    cursor: pointer;
    will-change: transform, color;
    backface-visibility: hidden;
}

.vibly-logo:hover {
    color: #0f1419; /* Fills with solid black */
    transform: scale(1.05) scaleY(1.1) translate3d(0, 0, 0); /* Slightly enlarges */
    text-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); /* Adds a 3D depth shadow */
}

/* Footer */
.footer {
    padding: 1rem 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer a, .footer span {
    font-size: 0.8rem;
    color: #536471;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-wrapper {
        flex-direction: column-reverse; /* Put logo on top for smaller screens */
        align-items: center;
        justify-content: center;
        padding-top: 2rem;
    }
    
    .logo-section {
        flex: none;
        padding: 0;
        margin-bottom: 2rem;
    }

    .vibly-logo {
        font-size: 8rem;
        -webkit-text-stroke: 2px #0f1419;
    }
    
    .login-section {
        padding: 1rem;
        width: 100%;
        max-width: 400px;
    }
    
    .login-section h1 {
        font-size: 3rem;
    }
}

/* Modal Overlay */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    will-change: opacity;
}

/* Modal Content */
.modal-content {
    background-color: #ffffff;
    width: 100%;
    max-width: 600px;
    border-radius: 16px;
    padding: 1rem 2rem 2rem 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    min-height: 500px; /* Make it a bit taller to match screenshot */
    transform: translate3d(0, 0, 0);
    animation: slideUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.back-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    transition: background-color 0.2s;
    color: #0f1419;
}

.back-btn:hover { background-color: #e7e7e8; }

.modal-logo {
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -1px;
    color: #0f1419;
}

.header-spacer { width: 36px; }

/* Modal Body */
.modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 2rem;
}

.modal-body h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

/* DOB Selectors */
.dob-selectors {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.select-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
}

.select-group:nth-child(2) {
    flex: 2; /* Month is wider */
}

.select-group label {
    position: absolute;
    top: 8px;
    left: 10px;
    font-size: 0.8rem;
    color: #536471;
    pointer-events: none;
}

.select-group select {
    padding: 1.5rem 1rem 0.5rem 10px;
    border: 1px solid #cfd9de;
    border-radius: 4px;
    font-size: 1.1rem;
    outline: none;
    background-color: transparent;
    cursor: pointer;
    appearance: none; /* remove default arrow to replace with custom if needed */
    -webkit-appearance: none;
    color: #0f1419;
}

.select-group::after {
    content: "▼";
    font-size: 0.8rem;
    color: #536471;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.select-group select:focus {
    border-color: #1d9bf0;
    box-shadow: 0 0 0 1px #1d9bf0;
}

.select-group select:focus + label {
    color: #1d9bf0;
}

/* Disclaimer text */
.dob-disclaimer {
    font-size: 0.9rem;
    color: #536471;
    line-height: 1.4;
    margin-bottom: 2rem;
}

/* Modal Footer */
.modal-footer {
    padding: 0 2rem;
    margin-top: auto;
}

.modal-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 9999px;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cfd9de;
    transition: .4s;
    border-radius: 24px;
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .slider {
    background-color: #1d9bf0;
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(20px);
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* Dashboard light mode styles */
#dashboard-container {
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    color: #0f1419;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 5;
    display: none;
    justify-content: flex-start;
    align-items: stretch;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.dash-sidebar {
    width: 275px;
    height: 100%;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    flex-shrink: 0;
}

.dash-nav {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    gap: 4px;
}

.dash-nav-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 9999px;
    font-size: 20px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.2s;
    width: fit-content;
}

.dash-nav-item:hover {
    background-color: rgba(15, 20, 25, 0.1);
}

.dash-nav-item svg {
    margin-right: 20px;
}

.dash-main {
    flex: 1;
    min-width: 600px;
    border-left: 1px solid #eff3f4;
    border-right: 1px solid #eff3f4;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dash-header {
    height: 53px;
    border-bottom: 1px solid #eff3f4;
    display: flex;
}

.dash-tab {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    color: #71767b;
}

.dash-tab:hover {
    background-color: rgba(15, 20, 25, 0.1);
}

.dash-tab.active {
    color: #0f1419;
}

.dash-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    height: 4px;
    width: 56px;
    background-color: #1d9bf0;
    border-radius: 9999px;
}

.dash-post-box {
    padding: 16px;
    border-bottom: 1px solid #eff3f4;
    display: flex;
    gap: 12px;
}

.dash-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #cfd9de;
    flex-shrink: 0;
}

.dash-post-input {
    background: transparent;
    border: none;
    color: #0f1419;
    font-size: 20px;
    outline: none;
    width: 100%;
    margin-top: 8px;
}

.dash-post {
    padding: 16px;
    border-bottom: 1px solid #eff3f4;
    display: flex;
    gap: 12px;
}

.dash-post-content {
    flex: 1;
}

.dash-post-header {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

.dash-name {
    font-weight: bold;
}

.dash-handle {
    color: #71767b;
}

.dash-right {
    width: 380px;
    padding: 12px 24px;
    height: 100%;
    flex-shrink: 0;
}

.dash-search {
    background-color: #eff3f4;
    border-radius: 9999px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #536471;
    margin-bottom: 16px;
}

.dash-box {
    background-color: #f7f9f9;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.dash-box h2 {
    margin: 0 0 12px 0;
    font-size: 20px;
}

/* Modal Step 5 Enhanced Light Mode */
.interest-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.interest-pill {
    padding: 12px 24px;
    border-radius: 9999px;
    border: 1px solid #cfd9de;
    background-color: #ffffff;
    color: #0f1419;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.interest-pill:hover {
    background-color: #eff3f4;
    transform: translateY(-1px) translate3d(0, 0, 0);
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
}

.interest-pill.selected {
    background-color: #1d9bf0;
    color: #ffffff;
    border-color: #1d9bf0;
    box-shadow: 0 4px 12px rgba(29, 155, 240, 0.3);
    transform: scale(1.02) translate3d(0, 0, 0);
}

.btn-white {
    background-color: #0f1419;
    color: #ffffff;
}
.btn-white:hover {
    background-color: #272c30;
}
.btn-white:disabled {
    background-color: #0f1419;
    opacity: 0.5;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Profile Upload */
.profile-upload-area {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.profile-upload-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background-color: #eff3f4;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: filter 0.2s;
}

.profile-upload-circle:hover {
    filter: brightness(0.95);
}

.add-photo-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: #0f1419;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid #ffffff;
}

/* Settings View Styles */
#dash-settings {
    display: none;
    flex: 1;
    height: 100vh;
    overflow: hidden;
    background-color: #ffffff;
}

.settings-nav-col::-webkit-scrollbar,
.settings-detail-col::-webkit-scrollbar {
    width: 6px;
}

.settings-nav-col::-webkit-scrollbar-thumb,
.settings-detail-col::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 9999px;
}

.settings-nav-col::-webkit-scrollbar-track,
.settings-detail-col::-webkit-scrollbar-track {
    background-color: transparent;
}

.settings-nav-item {
    transition: background-color 0.18s ease;
}

.settings-nav-item.active {
    background-color: rgba(15, 20, 25, 0.03) !important;
    border-right: 2px solid #1d9bf0 !important;
}

.settings-nav-item.active span {
    font-weight: 700 !important;
}

.settings-option-card {
    transition: background-color 0.18s ease;
}
