/* ========== หน้าเข้าสู่ระบบ / สมัครสมาชิก ========== */
.member-auth-page {
    width: 100%;
    max-width: 1040px;
    margin: 1.25rem auto 3rem;
    padding: 0 clamp(0.75rem, 3vw, 1.5rem);
    box-sizing: border-box;
}

.member-auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: min(640px, calc(100vh - var(--main-offset-top, 96px) - 4rem));
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(103, 232, 255, 0.2);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.4),
        0 24px 48px rgba(0, 0, 0, 0.45),
        0 0 80px rgba(43, 140, 255, 0.08);
}

.member-auth-promo {
    position: relative;
    background:
        linear-gradient(145deg, rgba(43, 140, 255, 0.22) 0%, transparent 45%),
        linear-gradient(220deg, rgba(180, 20, 30, 0.35) 0%, transparent 50%),
        linear-gradient(180deg, #0d1520 0%, #1a0a0c 100%);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    display: flex;
    align-items: center;
}

.member-auth-promo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 20% 20%, rgba(103, 232, 255, 0.12), transparent);
    pointer-events: none;
}

.member-auth-promo-inner {
    position: relative;
    z-index: 1;
}

.member-auth-promo-badge {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8df7ff;
    background: rgba(43, 140, 255, 0.2);
    border: 1px solid rgba(103, 232, 255, 0.35);
    border-radius: 999px;
}

.member-auth-promo-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    line-height: 1.25;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.member-auth-promo-lead {
    margin: 0 0 1.75rem;
    font-size: 1rem;
    color: #a8b8cc;
}

.member-auth-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.member-auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #c5d0de;
}

.member-auth-features strong {
    color: #e8f0fa;
    font-weight: 600;
}

.member-auth-feature-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.member-auth-panel {
    background: linear-gradient(180deg, rgba(18, 22, 32, 0.98) 0%, rgba(12, 10, 14, 0.99) 100%);
    padding: clamp(1.25rem, 3vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-auth-card {
    width: 100%;
    max-width: 400px;
}

.member-auth-brand {
    text-align: center;
    margin-bottom: 1.25rem;
}

.member-auth-logo {
    max-width: 200px;
    height: auto;
    opacity: 0.95;
}

.member-auth-tabs {
    display: flex;
    gap: 0.35rem;
    padding: 0.35rem;
    margin-bottom: 1.25rem;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.member-auth-tab {
    flex: 1;
    text-align: center;
    padding: 0.65rem 0.5rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #8b98ab;
    text-decoration: none;
    border-radius: 9px;
    transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.member-auth-tab:hover {
    color: #dce6f2;
    background: rgba(255, 255, 255, 0.05);
}

.member-auth-tab.is-active {
    color: #06111d;
    background: linear-gradient(135deg, #67e8ff 0%, #2b8cff 100%);
    box-shadow: 0 4px 14px rgba(43, 140, 255, 0.35);
}

.member-auth-title--sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.member-auth-alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.member-auth-alert--warn {
    color: #fde68a;
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.35);
}

.member-form {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.member-field {
    margin-bottom: 1rem;
}

.member-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #b8c5d6;
}

.member-label-optional {
    font-weight: 400;
    color: #6b7a8f;
    font-size: 0.82rem;
}

.member-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: #f1f5f9;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.member-input::placeholder {
    color: #5c6b7f;
}

.member-input:hover {
    border-color: rgba(103, 232, 255, 0.25);
}

.member-input:focus {
    border-color: rgba(103, 232, 255, 0.55);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(43, 140, 255, 0.15);
}

.member-submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.9rem 1.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.member-submit span {
    display: block;
}

.member-submit--primary {
    color: #06111d;
    background: linear-gradient(135deg, #67e8ff 0%, #2b8cff 55%, #1d6fd4 100%);
    box-shadow: 0 6px 20px rgba(43, 140, 255, 0.4);
}

.member-submit--signup {
    color: #04210f;
    background: linear-gradient(135deg, #86efac 0%, #22c55e 55%, #16a34a 100%);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
}

.member-submit:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.member-submit:active {
    transform: translateY(0);
}

.member-auth-foot {
    margin: 1.25rem 0 0;
    text-align: center;
    font-size: 0.92rem;
    color: #8b98ab;
}

.member-auth-foot a {
    color: #67e8ff;
    font-weight: 600;
    text-decoration: none;
}

.member-auth-foot a:hover {
    color: #a5f3fc;
    text-decoration: underline;
}

.member-auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    margin-bottom: 0.25rem;
    padding: 0.85rem 1rem;
    font-size: 0.98rem;
    font-weight: 600;
    font-family: inherit;
    color: #e8edf4;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.member-auth-google-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(148, 163, 184, 0.55);
    transform: translateY(-1px);
}

.member-auth-google-icon {
    display: flex;
    flex-shrink: 0;
    line-height: 0;
}

.member-auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0 1.1rem;
    color: #6b7a8f;
    font-size: 0.82rem;
    text-align: center;
}

.member-auth-divider::before,
.member-auth-divider::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: rgba(148, 163, 184, 0.22);
}

.member-auth-divider span {
    flex-shrink: 0;
}

@media (max-width: 860px) {
    .member-auth-layout {
        grid-template-columns: 1fr;
        min-height: unset;
    }

    .member-auth-promo {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .member-auth-promo-title br {
        display: none;
    }

    .member-auth-features {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
    }

    .member-auth-features li {
        font-size: 0.8rem;
        flex-direction: column;
        gap: 0.35rem;
        text-align: center;
    }

    .member-auth-feature-icon {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .member-auth-page {
        margin-top: 0.75rem;
    }

    .member-auth-layout {
        border-radius: 14px;
    }

    .member-auth-features {
        grid-template-columns: 1fr;
    }

    .member-auth-features li {
        flex-direction: row;
        text-align: left;
    }

    .member-auth-feature-icon {
        margin: 0;
    }
}

/* ========== หน้าบัญชีสมาชิก (/สมาชิก) ========== */
.member-dash-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 3rem;
    padding: 0 clamp(0.75rem, 3vw, 1.25rem);
    box-sizing: border-box;
}

.member-dash-welcome {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18) 0%, rgba(43, 140, 255, 0.12) 100%);
    border: 1px solid rgba(74, 222, 128, 0.35);
    animation: member-dash-fade-in 0.5s ease;
}

.member-dash-welcome-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #04210f;
    background: linear-gradient(135deg, #86efac, #22c55e);
    border-radius: 50%;
}

.member-dash-welcome strong {
    display: block;
    color: #e8f0fa;
    margin-bottom: 0.2rem;
}

.member-dash-welcome span {
    font-size: 0.9rem;
    color: #a8b8cc;
}

.member-dash-hero {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: auto;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1rem;
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(43, 140, 255, 0.2) 0%, transparent 50%),
        linear-gradient(220deg, rgba(120, 20, 30, 0.4) 0%, transparent 55%),
        linear-gradient(180deg, rgba(14, 20, 32, 0.95) 0%, rgba(10, 8, 12, 0.98) 100%);
    border: 1px solid rgba(103, 232, 255, 0.22);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.member-dash-hero-main {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.member-dash-avatar {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #06111d;
    text-transform: uppercase;
    background: linear-gradient(135deg, #67e8ff 0%, #2b8cff 100%);
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(43, 140, 255, 0.35);
}

.member-dash-greeting {
    margin: 0;
    font-size: 0.85rem;
    color: #8b98ab;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.member-dash-name {
    margin: 0.15rem 0 0.35rem;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    color: #fff;
}

.member-dash-meta {
    margin: 0;
    font-size: 0.9rem;
    color: #9aa8bc;
}

.member-dash-badge {
    display: inline-block;
    padding: 0.12rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #8df7ff;
    background: rgba(43, 140, 255, 0.25);
    border: 1px solid rgba(103, 232, 255, 0.35);
    border-radius: 999px;
    vertical-align: middle;
}

.member-dash-logout {
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
    color: #b8c5d6;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.member-dash-logout:hover {
    color: #fff;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

.member-dash-nav {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.member-dash-benefits {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.15rem;
}

.member-dash-benefit {
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem;
    color: #c5d0de;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    white-space: nowrap;
}

button.member-dash-benefit {
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

button.member-dash-benefit:hover,
button.member-dash-benefit:focus-visible {
    color: #e8eef5;
    background: rgba(255, 255, 255, 0.08);
}

.member-dash-benefit--static {
    cursor: default;
}

.member-dash-benefit--vip {
    color: #f0c4d8;
    border-color: rgba(236, 72, 153, 0.35);
    background: rgba(236, 72, 153, 0.1);
}

.member-dash-benefit--vip.is-on {
    color: #ffe4f0;
    border-color: rgba(244, 114, 182, 0.65);
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.35) 0%, rgba(168, 85, 247, 0.25) 100%);
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.25);
}

.member-dash-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.member-dash-setting-info {
    flex: 1;
    min-width: 0;
}

.member-dash-setting-info strong {
    display: block;
    font-size: 0.95rem;
    color: #e8eef5;
    margin-bottom: 0.35rem;
}

.member-dash-setting-info span {
    display: block;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #8b98ab;
}

.member-dash-toggle {
    position: relative;
    flex-shrink: 0;
    width: 3rem;
    height: 1.65rem;
    cursor: pointer;
}

.member-dash-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.member-dash-toggle-track {
    display: block;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    transition: background 0.25s;
}

.member-dash-toggle-track::after {
    content: '';
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    width: 1.25rem;
    height: 1.25rem;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s;
}

.member-dash-toggle input:checked + .member-dash-toggle-track {
    background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
}

.member-dash-toggle input:checked + .member-dash-toggle-track::after {
    transform: translateX(1.35rem);
}

.member-dash-toggle input:focus-visible + .member-dash-toggle-track {
    outline: 2px solid #67e8ff;
    outline-offset: 2px;
}

.member-dash-settings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.member-dash-settings-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
}

.member-dash-settings-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1.1rem 1.15rem 0.5rem;
}

.member-dash-settings-card-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.15rem;
    border-radius: 12px;
    line-height: 1;
}

.member-dash-settings-card-icon--vip {
    background: rgba(236, 72, 153, 0.15);
    border: 1px solid rgba(236, 72, 153, 0.25);
}

.member-dash-settings-card-icon--pwd {
    background: rgba(43, 140, 255, 0.12);
    border: 1px solid rgba(43, 140, 255, 0.22);
}

.member-dash-settings-card-title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: #e8eef5;
    line-height: 1.3;
}

.member-dash-settings-card-desc {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #8b98ab;
}

.member-dash-setting-row--inline {
    margin: 0 1.1rem 1.1rem;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.member-dash-password-form {
    max-width: none;
    padding: 0 1.15rem 1.15rem;
}

.member-dash-password-fields {
    display: grid;
    gap: 0.85rem;
}

.member-field--dash {
    margin: 0;
}

.member-field--dash .member-label {
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    color: #a8b4c4;
}

.member-input--dash {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #e8eef5;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.member-input--dash::placeholder {
    color: #5c6b7f;
}

.member-input--dash:focus {
    outline: none;
    border-color: rgba(103, 232, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(43, 140, 255, 0.15);
}

.member-dash-password-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.member-submit--compact {
    width: auto;
    min-width: 11rem;
    padding: 0.65rem 1.35rem;
    font-size: 0.88rem;
}

@media (min-width: 560px) {
    .member-dash-password-fields {
        grid-template-columns: 1fr 1fr;
    }

    .member-dash-password-fields .member-field--dash:first-child {
        grid-column: 1 / -1;
    }
}

.member-vip-swal-hint {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

.member-dash-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 0.35rem;
    margin-bottom: 0;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.member-dash-tabs::-webkit-scrollbar {
    display: none;
}

.member-dash-tab {
    flex: 1 0 auto;
    min-width: max-content;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1rem;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: #8b98ab;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.member-dash-tab:hover {
    color: #dce6f2;
    background: rgba(255, 255, 255, 0.05);
}

.member-dash-tab.is-active {
    color: #06111d;
    background: linear-gradient(135deg, #67e8ff 0%, #2b8cff 100%);
    box-shadow: 0 4px 12px rgba(43, 140, 255, 0.3);
}

.member-dash-tab-icon-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.member-dash-tab-icon {
    font-size: 1rem;
    line-height: 1;
}

.member-dash-tab-count {
    position: absolute;
    top: -0.4rem;
    right: -0.5rem;
    z-index: 2;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.15rem;
    text-align: center;
    color: #fff;
    background: #ef4444;
    border-radius: 999px;
    box-shadow: 0 0 0 2px rgba(12, 14, 22, 0.9);
    pointer-events: none;
}

.member-dash-tab.is-active .member-dash-tab-count {
    color: #ef4444;
    background: #fff;
}

.member-dash-panels {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(12, 14, 22, 0.85);
    overflow: hidden;
}

.member-dash-panel {
    padding: clamp(1.1rem, 3vw, 1.5rem);
    animation: member-dash-fade-in 0.35s ease;
}

.member-dash-panel-head {
    margin-bottom: 1.25rem;
}

.member-dash-panel-head--row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.member-dash-panel-head h2 {
    margin: 0 0 0.25rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #f1f5f9;
}

.member-dash-panel-head p {
    margin: 0;
    font-size: 0.88rem;
    color: #8b98ab;
}

.member-dash-btn-ghost {
    padding: 0.45rem 0.85rem;
    font-family: inherit;
    font-size: 0.82rem;
    color: #67e8ff;
    background: transparent;
    border: 1px solid rgba(103, 232, 255, 0.35);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.member-dash-btn-ghost:hover {
    background: rgba(43, 140, 255, 0.12);
}

.member-dash-cards-wrap {
    width: 100%;
    overflow: hidden;
}

.member-dash-cards-wrap .member-dash-movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 1rem 0.75rem;
    justify-content: stretch;
    justify-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0.35rem 0 0.5rem;
    box-sizing: border-box;
}

.member-dash-movie-grid .new_movie-card {
    position: relative;
    float: none;
    width: 100%;
    max-width: 180px;
    height: auto;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.member-dash-movie-grid .new_movie-card-full-link {
    position: absolute;
    inset: 0;
    z-index: 8;
    border-radius: 12px;
    text-decoration: none;
}

.member-dash-movie-grid .new_movie-card_movie-name-bg,
.member-dash-movie-grid .new_movie-card_movie-name,
.member-dash-movie-grid .new_movie-card_view,
.member-dash-movie-grid .movie-card-quality-badge,
.member-dash-movie-grid .new_movie-card_play {
    pointer-events: none;
}

.member-dash-movie-grid .new_movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(103, 232, 255, 0.35);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

.member-dash-movie-grid .new_movie-card_poster {
    position: relative;
    width: 100%;
    aspect-ratio: 45 / 64;
    height: auto;
    min-height: 0;
    overflow: hidden;
    background: #141820;
}

.member-dash-movie-grid .new_movie-card_poster-img,
.member-dash-movie-grid .new_movie-card_poster > img.position-absolute,
.member-dash-movie-grid .new_movie-card_poster > img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: center top;
}

.member-dash-movie-grid .new_movie-card_movie-name-bg {
    z-index: 2;
}

.member-dash-movie-grid .new_movie-card_movie-name {
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 8px 8px;
    font-size: 0.72rem;
    line-height: 1.35;
    max-height: 3.2em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.member-dash-movie-grid .new_movie-card_view {
    z-index: 4;
    font-size: 0.68rem;
    margin: 6px;
}

.member-dash-movie-grid .movie-card-quality-badge {
    z-index: 5;
    top: 0.35rem;
    right: 0.35rem;
    font-size: 0.58rem;
    padding: 0.18rem 0.42rem;
}

.member-dash-movie-grid .member-card-episode-alert {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    z-index: 7;
    max-width: calc(100% - 5.5rem);
    padding: 0.28rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-dash-movie-grid .member-card-episode-alert--new {
    background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
    animation: member-episode-alert-pulse 2s ease-in-out infinite;
}

.member-dash-movie-grid .member-card-episode-alert--unwatched {
    background: linear-gradient(135deg, #2b8cff 0%, #1d6fd4 100%);
}

@keyframes member-episode-alert-pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(236, 72, 153, 0.35);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.35), 0 2px 10px rgba(0, 0, 0, 0.4);
    }
}

.member-dash-hint-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 4px;
    vertical-align: middle;
}

.member-dash-hint-badge--new {
    color: #fff;
    background: linear-gradient(135deg, #ec4899 0%, #a855f7 100%);
}

.member-dash-hint-badge--unwatched {
    color: #fff;
    background: linear-gradient(135deg, #2b8cff 0%, #1d6fd4 100%);
}

.member-dash-movie-grid .member-card-episode-alert--unwatched {
    animation: member-episode-alert-pulse-blue 2.2s ease-in-out infinite;
}

@keyframes member-episode-alert-pulse-blue {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(43, 140, 255, 0.35);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(43, 140, 255, 0.35), 0 2px 10px rgba(0, 0, 0, 0.4);
    }
}

.member-dash-movie-grid .new_movie-card_play {
    z-index: 6;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.member-dash-movie-grid .new_movie-card:hover .new_movie-card_play {
    opacity: 1;
}

.member-dash-movie-grid .new_movie-card:hover .new_movie-card_poster > img {
    filter: brightness(70%);
}

@media (min-width: 640px) {
    .member-dash-cards-wrap .member-dash-movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1.1rem 0.9rem;
    }
}

@media (min-width: 1024px) {
    .member-dash-cards-wrap .member-dash-movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    }
}

.member-dash-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #8b98ab;
}

.member-dash-empty--in-panel {
    padding: 2rem 1rem;
}

.member-dash-empty--compact {
    padding: 1.5rem 1rem;
}

.member-dash-empty-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.7;
}

.member-dash-empty p {
    margin: 0;
    font-size: 1rem;
    color: #b8c5d6;
}

.member-dash-empty-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: #6b7a8f;
}

.member-dash-notif-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.member-dash-notif-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

.member-dash-btn-ghost--danger {
    color: #f5a8a8;
    border-color: rgba(245, 168, 168, 0.35);
}

.member-dash-btn-ghost--danger:hover {
    color: #fff;
    background: rgba(220, 80, 80, 0.2);
    border-color: rgba(245, 168, 168, 0.55);
}

.member-dash-notif {
    display: flex;
    align-items: stretch;
    border-radius: 12px;
    background: rgba(43, 140, 255, 0.1);
    border: 1px solid rgba(103, 232, 255, 0.2);
    transition: transform 0.15s, border-color 0.2s;
}

.member-dash-notif:hover {
    border-color: rgba(103, 232, 255, 0.4);
    transform: translateX(2px);
}

.member-dash-notif.is-read {
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

.member-dash-notif-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
    padding: 1rem 1.1rem;
    color: inherit;
    text-decoration: none;
}

.member-dash-notif-delete {
    flex-shrink: 0;
    align-self: center;
    margin-right: 0.65rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #9aa8bc;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.member-dash-notif-delete:hover {
    background: rgba(220, 80, 80, 0.25);
    color: #f5c4c4;
}

.member-dash-notif-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #67e8ff;
    box-shadow: 0 0 8px rgba(103, 232, 255, 0.8);
}

.member-dash-notif-body {
    flex: 1;
    min-width: 0;
}

.member-dash-notif-body strong {
    display: block;
    font-size: 0.95rem;
    color: #e8f0fa;
}

.member-dash-notif-body span {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.88rem;
    color: #9aa8bc;
    line-height: 1.4;
}

.member-dash-notif-body time {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #6b7a8f;
}

.member-dash-notif-arrow {
    flex-shrink: 0;
    font-size: 1.25rem;
    color: #67e8ff;
    opacity: 0.7;
}

.member-dash-support-form {
    max-width: 520px;
    margin-bottom: 1.75rem;
    padding: 1.25rem;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.member-input--area {
    min-height: 100px;
    resize: vertical;
}

.member-dash-subtitle {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #9aa8bc;
}

.member-dash-ticket-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.member-dash-ticket {
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.member-dash-ticket-subject {
    display: block;
    margin: 0.4rem 0 0.25rem;
    font-size: 1rem;
    color: #e2e8f0;
}

.member-dash-ticket time {
    font-size: 0.8rem;
    color: #6b7a8f;
}

.member-dash-ticket-status {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    color: #fde68a;
    background: rgba(234, 179, 8, 0.2);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.member-dash-ticket-status--answered {
    color: #86efac;
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.35);
}

.member-dash-ticket-status--closed {
    color: #94a3b8;
    background: rgba(100, 116, 139, 0.2);
    border-color: rgba(100, 116, 139, 0.35);
}

@keyframes member-dash-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767px) {
    .member-dash-nav {
        gap: 0.5rem;
    }

    .member-dash-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow: visible;
        scroll-snap-type: none;
        padding: 0.4rem;
        gap: 0.35rem;
    }

    .member-dash-tab {
        flex: unset;
        min-width: 0;
        width: 100%;
        scroll-snap-align: unset;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        padding: 0.55rem 0.35rem 0.45rem;
        font-size: 0.72rem;
        line-height: 1.2;
        text-align: center;
        white-space: normal;
        min-height: 3.1rem;
        overflow: visible;
    }

    .member-dash-tab-icon {
        font-size: 1.1rem;
    }

    .member-dash-tab-icon-wrap .member-dash-tab-count {
        top: -0.35rem;
        right: -0.55rem;
        min-width: 1rem;
        height: 1rem;
        line-height: 1rem;
        font-size: 0.62rem;
    }

    .member-dash-tab-label {
        display: block;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .member-dash-benefits {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
        padding: 0;
    }

    .member-dash-benefit {
        justify-content: center;
        text-align: center;
        white-space: normal;
        font-size: 0.72rem;
        line-height: 1.25;
        padding: 0.45rem 0.5rem;
    }
}

@media (max-width: 600px) {
    .member-dash-hero {
        padding: 1.15rem;
    }

    .member-dash-logout {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 400px) {
    .member-dash-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .member-dash-tab:nth-child(5) {
        grid-column: 1 / -1;
        max-width: 12rem;
        justify-self: center;
    }
}

.header-member-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.header-member-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    text-decoration: none;
    border: 1px solid rgba(103, 232, 255, 0.45);
    color: #e8fdff;
    background: rgba(43, 140, 255, 0.15);
}

.header-member-btn:hover {
    color: #fff;
    background: rgba(43, 140, 255, 0.35);
}

.header-member-btn--signup {
    border-color: rgba(74, 222, 128, 0.5);
    background: rgba(34, 197, 94, 0.12);
}

.header-member-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    min-width: 1.1rem;
    height: 1.1rem;
    line-height: 1.1rem;
    text-align: center;
    border-radius: 50%;
    padding: 0 0.25rem;
}

/* ปุ่มสมาชิกบนหน้าเล่น — สไตล์หลักอยู่ใน movie-play-1.0.0.css (#movie-play-main) */

@media (max-width: 768px) {
    .header-member-label {
        display: none;
    }
}
