* {
            box-sizing: border-box;
            font-family: 'Kanit', 'Noto Sans Thai', Tahoma, sans-serif;
            margin: 0;
            padding: 0;
        }
        body {
            background: linear-gradient(135deg, rgba(15, 12, 27, 0.82), rgba(26, 16, 47, 0.86)), 
                        url('../images/bg_login.jpg') no-repeat center center fixed;
            background-size: cover;
            color: #ffffff;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            width: 100vw;
            overflow: hidden;
        }

        /* --- INTRO SCREEN (SPLASH SCREEN) --- */
        #intro-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #0f0c1b, #1a102f, #2d1235);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 999;
            transition: opacity 0.8s ease, visibility 0.8s ease;
        }

        .intro-logo {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, #ff2a75, #9d4edd 55%, #00f5d4);
            border-radius: 24px;
            display: flex;
            justify-content: center;
            align-items: center;
            box-shadow: 0 10px 30px rgba(255, 42, 117, 0.35);
            animation: pulseLogo 1.5s infinite alternate;
        }

        .intro-logo img {
            width: 100%;
            height: 100%;
            display: block;
            border-radius: 24px;
        }
        .intro-title {
            margin-top: 20px;
            font-size: 28px;
            font-weight: 600;
            letter-spacing: 1px;
            opacity: 0;
            animation: fadeInText 1s ease forwards 0.3s;
        }

        .intro-title span {
            color: #ff4b72;
        }

        .intro-sub {
            font-size: 13px;
            color: #a09ab0;
            margin-top: 5px;
            opacity: 0;
            animation: fadeInText 1s ease forwards 0.5s;
        }

        @keyframes pulseLogo {
            0% { transform: scale(1); box-shadow: 0 10px 20px rgba(157, 78, 221, 0.35); }
            100% { transform: scale(1.08); box-shadow: 0 15px 35px rgba(255, 42, 117, 0.55); }
        }

        @keyframes fadeInText {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .fade-out {
            opacity: 0;
            visibility: hidden;
        }

        /* --- LOGIN CARD (MAIN CONTENT) --- */
        .login-card {
            background: rgba(22, 17, 35, 0.82);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            padding: 35px 30px;
            width: 100%;
            max-width: 410px;
            border-radius: 24px;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(255, 75, 114, 0.2);
            opacity: 0;
            transform: translateY(15px);
            transition: all 0.8s ease 0.4s;
        }

        .login-card.show {
            opacity: 1;
            transform: translateY(0);
        }
        
        @media screen and (max-width: 480px) {
            body {
                background: linear-gradient(180deg, rgba(15, 12, 27, 0.9), rgba(26, 16, 47, 0.94)), url('../images/bg_login.jpg') no-repeat center center fixed;
            }
            .login-card {
                height: 100vh;
                max-width: 100%;
                border-radius: 24px 24px 0 0;
                border: none;
                display: flex;
                flex-direction: column;
                justify-content: center;
                padding: 40px 20px;
                box-shadow: none;
                background: rgba(22, 17, 35, 0.96);
            }
        }

        .logo-container {
            text-align: center;
            margin-bottom: 25px;
        }
        .logo-icon {
            width: 55px;
            height: 55px;
            background: linear-gradient(135deg, #ff2a75, #9d4edd 55%, #00f5d4);
            border-radius: 16px;
            display: inline-flex;
            justify-content: center;
            align-items: center;
            box-shadow: 0 8px 20px rgba(255, 42, 117, 0.35);
            margin-bottom: 10px;
        }
        .logo-icon img {
            width: 100%;
            height: 100%;
            display: block;
            border-radius: 16px;
        }
        .login-card h2 {
            color: #ffffff;
            font-size: 24px;
            font-weight: 700;
        }
        .login-card h2 span {
            color: #ff4b72;
        }
        .login-card p {
            text-align: center;
            font-size: 13px;
            color: #a09ab0;
            margin-top: 5px;
            margin-bottom: 25px;
        }
        .form-group {
            margin-bottom: 18px;
        }
        .form-group label {
            display: block;
            margin-bottom: 6px;
            font-size: 13px;
            color: #d1cbdc;
        }
        .form-group input {
            width: 100%;
            padding: 14px 16px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            background-color: rgba(20, 16, 33, 0.6);
            color: #fff;
            font-size: 16px;
            outline: none;
            transition: all 0.3s;
        }
        .form-group input:focus {
            border-color: #ff4b72;
            box-shadow: 0 0 0 3px rgba(255, 75, 114, 0.2);
            background-color: rgba(20, 16, 33, 0.9);
        }
        .btn-submit {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #ff4b72, #ff758c);
            border: none;
            border-radius: 12px;
            color: white;
            font-weight: 600;
            font-size: 16px;
            cursor: pointer;
            margin-top: 10px;
            box-shadow: 0 4px 15px rgba(255, 75, 114, 0.3);
            transition: transform 0.2s;
        }
        .btn-submit:hover {
            transform: translateY(-1px);
            opacity: 0.95;
        }
        .alert-error {
            background-color: rgba(239, 68, 68, 0.2);
            border: 1px solid rgba(239, 68, 68, 0.4);
            color: #fca5a5;
            padding: 10px 14px;
            border-radius: 10px;
            font-size: 13px;
            text-align: center;
            margin-bottom: 18px;
        }
        .divider {
            display: flex;
            align-items: center;
            text-align: center;
            margin: 22px 0;
            color: #6b637b;
            font-size: 12px;
        }
        .divider::before, .divider::after {
            content: '';
            flex: 1;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }
        .divider::before { margin-right: 12px; }
        .divider::after { margin-left: 12px; }
        
        .social-container {
            display: flex;
            gap: 12px;
        }
        .social-btn {
            flex: 1;
            padding: 12px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            background-color: rgba(255, 255, 255, 0.03);
            color: white;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 13px;
            text-decoration: none;
            transition: background 0.2s;
        }
        .social-btn:hover {
            background-color: rgba(255, 255, 255, 0.08);
        }
        .social-btn svg {
            width: 18px;
            height: 18px;
        }
        .extra-links {
            display: flex;
            justify-content: space-between;
            font-size: 13px;
            margin-top: 16px;
        }
        .extra-links a {
            color: #b3a7d4;
            text-decoration: none;
        }
        .extra-links a:hover {
            color: #ff4b72;
            text-decoration: underline;
        }

        /* --- ปุ่ม Social เป็น <a> จริง (OAuth) --- */
        .social-btn {
            text-decoration: none;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
        }
        .social-btn:hover {
            background-color: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.16);
            transform: translateY(-1px);
        }
        .social-btn:focus-visible {
            outline: 2px solid #ff2a75;
            outline-offset: 2px;
        }
        .social-btn svg {
            flex: 0 0 auto;
        }

        /* --- แถวลิงก์สมัครสมาชิกด้วย Social --- */
        .social-register {
            margin-top: 14px;
            text-align: center;
            font-size: 12px;
            color: #8d84a6;
        }
        .social-register a {
            color: #b3a7d4;
            text-decoration: none;
            font-weight: 500;
        }
        .social-register a:hover {
            color: #ff4b72;
            text-decoration: underline;
        }
        .social-register .dot {
            margin: 0 6px;
            opacity: .5;
        }

        /* --- ปุ่มที่ยังไม่ได้ตั้งค่า (ยังกดได้ แต่จะขึ้นข้อความแนะนำ) --- */
        .social-btn--off {
            opacity: .55;
        }
        .social-btn--off:hover {
            opacity: .8;
        }

        /* --- ข้อความแจ้งว่ายังต้องตั้งค่า --- */
        .social-hint {
            margin-top: 12px;
            padding: 8px 12px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: #8d84a6;
            font-size: 11px;
            line-height: 1.6;
            text-align: center;
        }
        .social-hint i {
            margin-right: 4px;
        }
        .social-hint .ico {
            width: 14px;
            height: 14px;
            vertical-align: -2px;
            margin-right: 4px;
        }

        /* --- ข้อความ "ออกจากระบบแล้ว" --- */
        .alert-success {
            background-color: rgba(34, 197, 94, 0.15);
            border: 1px solid rgba(34, 197, 94, 0.4);
            color: #86efac;
            padding: 10px 14px;
            border-radius: 10px;
            font-size: 13px;
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .alert-success .ico {
            width: 16px;
            height: 16px;
            flex: 0 0 auto;
        }
