/* --- Global Variables --- */
:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #06b6d4;
    --accent-color: #10b981;
    --bg-start: #f8fafc;
    --bg-end: #e0e7ff;
    --text-color: #334155;
    --label-color: #475569;
    --border-color: #cbd5e1;
    --white: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --border-radius: 16px;
    --border-radius-sm: 8px;
}

/* --- Global Resets & Body --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Sarabun', sans-serif;
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
    background-attachment: fixed;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
}

/* --- Layout & Containers --- */
.container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    flex-grow: 1;
    padding: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Header & Navigation --- */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(79, 70, 229, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.main-nav ul {
    display: flex;
    align-items: center; /* จัดแนวให้อยู่กึ่งกลางในแนวตั้ง */
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin-right: 20px; /* ระยะห่างระหว่างเมนู */
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
}

.main-nav a:hover {
    color: #007bff;
}

.main-nav a:not(.nav-button):not(.nav-button-logout):hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

.nav-button, .nav-button-logout {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white) !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    font-weight: 600;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
}

.nav-button-logout {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.nav-button-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

/* --- Footer --- */
.main-footer {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: #e5e7eb;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
    position: relative;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-color) 50%, transparent 100%);
}

/* --- Forms & General Components --- */
.form-wrapper, .page-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    transition: all 0.3s ease;
}

.form-wrapper:hover, .page-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.06);
}

h1, h2 {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--label-color);
}

input[type=text], input[type=email], input[type=password], textarea, select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.8);
}

input:focus, textarea:focus, select:focus {
    outline: 0;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background: var(--white);
    transform: translateY(-1px);
}

button[type="submit"] {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    width: 100%;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
    position: relative;
    overflow: hidden;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

button[type="submit"]:active {
    transform: translateY(0);
}

.message {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius-sm);
    text-align: center;
    font-weight: 500;
    border: 1px solid;
}

.message.success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border-color: #22c55e;
}

.message.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-color: #ef4444;
}

/* --- Page Specific --- */
.register-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: start;
    max-width: 1200px;
    width: 100%;
}

.plan-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plan-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
}

.plan-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.06);
}

.plan-price {
    text-align: center;
    margin: 2rem 0;
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-price span {
    font-size: 1rem;
    font-weight: 400;
    color: #6b7280;
    display: block;
    margin-top: 0.5rem;
}

.plan-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(79, 70, 229, 0.1);
    transition: all 0.2s ease;
}

.plan-feature-list li:hover {
    background: rgba(79, 70, 229, 0.02);
    padding-left: 0.5rem;
    margin: 0 -0.5rem;
    border-radius: var(--border-radius-sm);
}

.plan-feature-list li:last-child {
    border-bottom: none;
}

/* --- Service Details Section --- */
.service-details {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.service-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
}

.service-details h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.service-details ul {
    list-style: none;
    padding: 0;
}

.service-details ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(79, 70, 229, 0.1);
    line-height: 1.6;
}

.service-details ul li:last-child {
    border-bottom: none;
}

.service-details ul li strong {
    color: var(--primary-color);
    font-weight: 600;
}

.honeypot-field {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
    pointer-events: none;
}

.info-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
    line-height: 1.8;
}

.info-grid strong {
    font-weight: 500;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1px solid;
}

.status-pending { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); color: #92400e; border-color: #f59e0b; }
.status-active { background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%); color: #166534; border-color: #22c55e; }
.status-suspended { background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); color: #991b1b; border-color: #ef4444; }
.status-cancelled { background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%); color: #4b5563; border-color: #9ca3af; }

/* --- Footer Links & Cookie Banner --- */
.terms-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    color: var(--primary-color);
}

.terms-content ul {
    list-style-position: inside;
    padding-left: 1rem;
    line-height: 1.8;
}

.terms-content ul li {
    margin-bottom: 0.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.footer-links a:hover {
    color: var(--white);
    background: rgba(79, 70, 229, 0.2);
}

.footer-links span {
    color: #6b7280;
}

/* --- Cookie Consent Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(12px);
    color: #f9fafb;
    padding: 1.5rem;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid rgba(79, 70, 229, 0.3);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1.5rem;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-banner a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cookie-banner a:hover {
    color: #bfdbfe;
    text-decoration: underline;
}

.cookie-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Sarabun', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.cookie-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .register-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .plan-container {
        order: -1;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .main-nav ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .container {
        width: 95%;
        padding: 0 0.5rem;
    }
    
    .form-wrapper, .page-box, .plan-container, .service-details {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .plan-price {
        font-size: 2.5rem;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem 0;
    }
    
    .form-wrapper, .page-box, .plan-container, .service-details {
        padding: 1rem;
    }
    
    .plan-feature-list li {
        padding: 0.75rem 0;
        font-size: 0.9rem;
    }
    
    button[type="submit"] {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }
}

/* --- Animation & Micro-interactions --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-wrapper, .plan-container, .service-details {
    animation: fadeInUp 0.6s ease-out;
}

.plan-container {
    animation-delay: 0.2s;
}

.service-details {
    animation-delay: 0.4s;
}
/* เพิ่มส่วนนี้ลงในไฟล์ style.css ที่มีอยู่ */

/* Hero Section */
.hero-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="%234f46e5" opacity="0.03" d="M0,0 L100,0 L100,100 L0,100 Z" /></svg>') no-repeat;
    background-size: cover;
    z-index: -1;
}

.hero-section h1 {
    font-size: 2.75rem;
    margin-bottom: 1.5rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem 2rem;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    min-width: 120px;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Tech Stack */
.tech-stack {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.tech-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.tech-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.3s ease;
}

.tech-item:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

.tech-item span {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.75rem 1.5rem;
        min-width: 100px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .tech-grid {
        gap: 1.5rem;
    }
    
    .tech-item img {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2.5rem 0;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .tech-grid {
        gap: 1rem;
        grid-template-columns: repeat(2, 1fr);
    }
}
/* สไตล์สำหรับ Google Translate Widget */
#google_translate_element {
    display: inline-block;
    vertical-align: middle;
}

.goog-te-combo {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
    color: #333;
    font-family: 'Sarabun', sans-serif; /* ใช้ฟอนต์เดียวกับเมนู */
}

.goog-te-combo:focus {
    outline: none;
    border-color: #007bff;
}

/* ปรับให้ responsive */
@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column; /* เปลี่ยนเป็นแนวตั้งในหน้าจอเล็ก */
        align-items: flex-start;
    }

    .main-nav li {
        margin: 10px 0;
    }

    #google_translate_element {
        width: 100%;
    }

    .goog-te-combo {
        width: 100%;
        box-sizing: border-box;
    }
}