/* =========================================
   1. ตั้งค่าเริ่มต้นหน้าจอ & Global Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', sans-serif;
}

body, html {
    background-color: #0A0F1A;
    color: #ffffff;
    overflow-x: hidden;
}

/* ส่วนพื้นที่หลัก (Hero Section) ดึงภาพพื้นหลัง */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    background-image: url('../assets/bg_template.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* แผ่นฟิล์มสีดำโปร่งแสงทับพื้นหลัง */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.75); 
    z-index: 1;
}

/* กล่องบรรจุเนื้อหาให้อยู่ตรงกลาง */
.content-container {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    padding: 40px;
    max-width: 800px;
}

/* =========================================
   2. โลโก้ & เอฟเฟกต์โต้ตอบ
   ========================================= */
.logo {
    width: 220px;
    margin-bottom: 25px;
    border-radius: 50%; 
    border: 2px solid rgba(255, 255, 255, 0.2); 
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.6),      
        0 0 25px rgba(0, 150, 255, 0.5);     
    cursor: pointer; 
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease, box-shadow 0.3s ease;
}

.logo:hover {
    transform: translateY(-8px) scale(1.05); 
    filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.6));
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.7), 
        0 0 35px rgba(0, 150, 255, 0.8);
}

.logo:active {
    transform: translateY(4px) scale(0.95); 
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.5), 
        0 0 15px rgba(0, 150, 255, 0.4);
}

/* =========================================
   3. หัวข้อและตัวอักษร 3D มิติ
   ========================================= */
.main-title {
    font-size: 3.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 15px;
    color: #FFD700;
    text-shadow: 
        0px 1px 0px #c2a129,
        0px 2px 0px #a88b22,
        0px 3px 0px #8f771d,
        0px 4px 0px #7a6518,
        0px 8px 10px rgba(0, 0, 0, 0.8),
        0px 0px 20px rgba(212, 175, 55, 0.7),
        0px 0px 40px rgba(212, 175, 55, 0.4);
}

.subtitle {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 45px;
    color: #FFFFFF;
    letter-spacing: 1px;
    text-shadow: 
        0px 1px 0px #cccccc,
        0px 2px 0px #a3a3a3,
        0px 3px 0px #7a7a7a,
        0px 6px 10px rgba(0, 0, 0, 0.9),
        0px 0px 15px rgba(255, 255, 255, 0.6),
        0px 0px 30px rgba(0, 150, 255, 0.6);
}

/* =========================================
   4. ระบบปุ่ม 3 มิติ พร้อม Under-glow
   ========================================= */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-3d {
    position: relative;
    border: none;
    padding: 15px 30px;
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.1s ease;
    outline: none;
    margin: 10px;
}

/* ปุ่มสีฟ้า (Cyan / Neon) */
.btn-cyan {
    background: linear-gradient(145deg, #00b3cc, #00e5ff);
    color: #0A0F1A;
    box-shadow: 0 6px 0 #007c91, 0 10px 20px rgba(0, 229, 255, 0.2); 
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}

.btn-cyan:active {
    transform: translateY(6px);
    box-shadow: 0 0px 0 #007c91, 0 0px 30px 10px rgba(0, 229, 255, 0.8);
}

/* ปุ่มสีทอง (Prime / VIP) */
.btn-gold {
    background: linear-gradient(145deg, #c5a030, #ebd074);
    color: #1a1505;
    box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.6),
                inset -3px -3px 5px rgba(0, 0, 0, 0.3),
                0 6px 0 #8a6b18, 
                0 10px 20px rgba(212, 175, 55, 0.2);
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.7),
                inset -3px -3px 5px rgba(0, 0, 0, 0.4),
                0 8px 20px rgba(212, 175, 55, 0.6);
}

.btn-gold:active {
    transform: translateY(6px);
    box-shadow: 0 0px 0 #8a6b18, 0 0px 30px 10px rgba(212, 175, 55, 0.9);
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9rem;
    width: 100%;
}

/* คงชื่อคลาสเดิมไว้เผื่อเรียกใช้ร่วมกัน */
.btn-primary { background-color: #D4AF37; color: #FFFFFF; font-weight: 700; }
.btn-secondary { background-color: transparent; color: #D4AF37; border: 1px solid #D4AF37; }

/* =========================================
   5. เลเซอร์แอนิเมชัน (Laser Sweep)
   ========================================= */
.laser-sweep {
    position: fixed;
    top: 0;
    left: -100vw;
    width: 150vw;
    height: 100vh;
    background: linear-gradient(90deg, 
                rgba(0,0,0,0) 0%, 
                rgba(0, 229, 255, 0.1) 45%, 
                rgba(0, 229, 255, 0.8) 50%, 
                rgba(0, 229, 255, 0.1) 55%, 
                rgba(0,0,0,0) 100%);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transform: skewX(-20deg);
}

.laser-sweep.active {
    animation: sweepEffect 1.2s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

@keyframes sweepEffect {
    0% { left: -100vw; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 100vw; opacity: 0; }
}

/* =========================================
   6. หน้าต่าง AI Dashboard (Chat Modal)
   ========================================= */
.chat-modal {
    display: none;
    flex-direction: column;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 400px;
    height: 550px;
    background-color: rgba(15, 15, 15, 0.85);
    border: 1px solid #D4AF37;
    border-radius: 12px;
    z-index: 1000;
    box-shadow: 0 15px 45px rgba(0,0,0,0.9), 0 0 25px rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(15px);
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-header {
    background: linear-gradient(90deg, #111 0%, #29220b 100%);
    color: #D4AF37;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #D4AF37;
    font-weight: 600;
    letter-spacing: 1.5px;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover { color: #ff4d4d; }

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    padding: 12px 18px;
    border-radius: 8px;
    max-width: 85%;
    line-height: 1.5;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.ai-message {
    background-color: rgba(0, 150, 255, 0.15);
    color: #E0E0E0;
    border-left: 3px solid #0096FF;
    align-self: flex-start;
    box-shadow: 0 2px 10px rgba(0, 150, 255, 0.1);
}

.user-message {
    background-color: rgba(212, 175, 55, 0.15);
    color: #FFD700;
    border-right: 3px solid #D4AF37;
    align-self: flex-end;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.1);
}

.chat-footer {
    padding: 15px;
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    background-color: rgba(0,0,0,0.5);
}

.chat-footer input {
    flex: 1;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #444;
    background-color: #1a1a1a;
    color: #fff;
    outline: none;
    font-family: 'Prompt', sans-serif;
    transition: all 0.3s;
}

.chat-footer input:focus {
    border-color: #D4AF37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.chat-footer button {
    padding: 12px 25px;
    background-color: #D4AF37;
    color: #000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Prompt', sans-serif;
    transition: all 0.3s;
}

/* =========================================
   7. ส่วนตารางราคา (Pricing Section)
   ========================================= */
.pricing-section {
    padding: 80px 20px;
    text-align: center;
    color: #fff;
}

.section-title {
    font-size: 2.5rem;
    color: #D4AF37;
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-shadow: 
        -1px -1px 1px rgba(255, 255, 255, 0.4),
        1px 1px 2px rgba(0, 0, 0, 0.8),
        2px 2px 3px rgba(139, 101, 8, 0.5),
        4px 4px 8px rgba(0, 0, 0, 0.7);
}

.billing-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 50px;
    font-size: 1.1rem;
}

.billing-label { color: #777; transition: color 0.3s; }
.billing-label.active { color: #D4AF37; font-weight: bold; }

.promo-badge {
    background-color: #D4AF37;
    color: #000;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: bold;
    margin-left: 5px;
    vertical-align: middle;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #333;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 26px; width: 26px;
    left: 4px; bottom: 4px;
    background-color: #fff;
    transition: .4s;
}
input:checked + .slider { background-color: #D4AF37; }
input:checked + .slider:before { transform: translateX(26px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

.pricing-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.card {
    background: rgba(15, 15, 15, 0.6);
    border: 1px solid #333;
    border-radius: 15px;
    padding: 40px 30px;
    width: 320px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    border-color: #555;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #aaa;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
}

.price { margin-bottom: 30px; }
.price .currency { font-size: 1.5rem; vertical-align: top; }
.price .amount { 
    font-size: 3.5rem; 
    font-weight: bold; 
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8), 3px 3px 5px rgba(0, 0, 0, 0.9);
}
.price .period { color: #777; font-size: 1rem; }

.features {
    list-style: none;
    padding: 0;
    margin-bottom: 40px;
    text-align: left;
}

.features li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #ccc;
    font-size: 0.95rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}
.features li::before {
    content: "✓";
    color: #D4AF37;
    margin-right: 10px;
    font-weight: bold;
}

.btn-tier {
    width: 100%;
    padding: 15px;
    border: 1px solid #555;
    background: transparent;
    color: #fff;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}
.btn-tier:hover { background: #333; }

/* การ์ด PRIME เรือธง */
.card-prime {
    border: 2px solid #D4AF37;
    transform: scale(1.05);
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.05) 0%, rgba(15, 15, 15, 0.9) 100%);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.15);
}
.card-prime:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.3);
}
.card-prime h3, .card-prime .price .amount { 
    color: #D4AF37; 
    text-shadow: 2px 2px 4px rgba(212, 175, 55, 0.4), 5px 5px 12px rgba(0, 0, 0, 0.8);
}

.ribbon {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #D4AF37;
    color: #000;
    padding: 5px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 1px;
}