.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.auth-overlay.active {
    display: flex;
    opacity: 1;
}

.auth-overlay .close-btn {
    position: fixed;
    top: 25px;
    right: 25px;
    background: transparent;
    border: none;
    font-size: 38px;
    cursor: pointer;
    color: #333;
    z-index: 2001;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.auth-overlay .close-btn:hover {
    transform: rotate(90deg);
    color: #666;
}

.overlay-view {
    display: none;
    width: 100%;
    max-width: 500px;
    padding: 0;
    animation: fadeIn 0.4s ease;
}

.overlay-view.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    min-height: auto;
    justify-content: center;
    padding: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

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

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

/* Styling for forms inside overlay view */
.overlay-view.active .form-container {
    box-shadow: none;
    border-radius: 0;
    margin: 0;
    padding: 50px 40px;
    width: 100%;
}

.overlay-view.active .form-container.wide {
    padding: 50px 40px;
}

/* Menu View Styles - HIDDEN */
#menu-view {
    display: none;
}

.logo-large {
    margin-bottom: 40px;
    margin-top: 20px;
    text-align: center;
}

.logo-large h2 {
    font-size: 38px;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0;
}

.logo-large span {
    color: var(--secondary-color);
}

.auth-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 80px;
    width: 100%;
    flex-wrap: nowrap;
    max-width: 700px;
    padding: 0 20px;
}

.btn-auth {
    flex: 1;
    min-width: 140px;
    max-width: 320px;
    padding: 14px 35px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 2.5px solid var(--primary-color);
}

.btn-auth.btn-outline {
    background: transparent;
    color: var(--primary-color);
}

.btn-auth.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-auth.btn-filled {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-auth.btn-filled:hover {
    background: #1f2a37;
    border-color: #1f2a37;
}

.overlay-nav {
    width: 100%;
    max-width: 600px;
    text-align: center;
    padding: 0 20px;
}

.overlay-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.overlay-nav li {
    margin: 28px 0;
    padding: 8px 0;
}

.overlay-nav a {
    font-size: 18px;
    font-weight: 600;
    color: #2c2c2c;
    text-decoration: none;
    display: block;
    transition: 0.3s;
    letter-spacing: 0.5px;
}

.overlay-nav a:hover {
    color: var(--secondary-color);
    font-weight: 700;
}

/* Form Container Styles */
.form-container {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: left;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 100px auto;
}

.form-container.wide {
    max-width: 650px;
    margin: 0 auto 100px auto;
}

.form-container h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 24px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 13px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.3s;
    font-family: inherit;
}

.form-group input:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

.label-row {
    display: flex;
    justify-content: space-between;
}

.forgot-pass {
    font-size: 13px;
    color: var(--secondary-color);
    transition: 0.3s;
}

.forgot-pass:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 15px;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    background: #1f2a37;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.form-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #666;
}

.form-footer a {
    color: var(--secondary-color);
    font-weight: 700;
    transition: 0.3s;
}

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

/* Register Specifics */
.register-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.swift-badge {
    background: #2ecc71;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.info-box {
    background: #e1f5fe;
    color: #0277bd;
    padding: 15px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group.col-6 {
    flex: 1;
}

.phone-input {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.phone-input .flag {
    padding: 0 15px;
    background: #f8f9fa;
    border-right: 1px solid #ddd;
    display: flex;
    align-items: center;
    height: 45px;
    /* Match input height roughly */
    font-size: 14px;
    color: #555;
    white-space: nowrap;
}

.phone-input .flag img {
    margin-right: 5px;
}

.phone-input input {
    border: none;
    border-radius: 0;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-check input {
    width: auto;
    margin-right: 10px;
}

.form-check label {
    font-size: 13px;
    color: #555;
}

.btn-icon-user {
    background: #eef2ff;
    color: #5b73e8;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    margin: 10px 0;
    font-size: 16px;
}

.register-logo-area {
    text-align: center;
    margin-top: 30px;
    opacity: 0.7;
}

.logo-small h2 {
    font-size: 24px;
    margin: 0;
}

/* Hide original top links on mobile or generally if we switch fully */
#menu-btn {
    cursor: pointer;
    font-weight: bold;
}