/* 
   CHATAIPORN.PW STYLES
   Modern design with teal/blue gradient theme
*/

:root {
    /* Main Colors - Teal to Blue/Purple Gradient */
    --primary-light: #5EFCE8;
    --primary-dark: #736EFE;
    --text-dark: #1A1A2E;
    --text-light: #FFFFFF;
    --text-muted: #8E8EA0;
    --bg-dark: #1A1A2E;
    --bg-darker: #0F0F1B;
    --card-bg: #23233C;
    --border-color: rgba(94, 252, 232, 0.2);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--bg-darker), var(--bg-dark));
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.1;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
}

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

section {
    padding: var(--spacing-xl) 0;
}

/* Utility Classes */
.gradient-text {
    background: linear-gradient(90deg, var(--primary-light), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-dark));
    border-radius: var(--radius-full);
}

/* Buttons */
.cta-button {
    display: inline-block;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-dark));
    color: var(--text-dark);
    padding: 0.8rem 2.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: all var(--transition-medium);
    box-shadow: 0 4px 10px rgba(94, 252, 232, 0.3);
    position: relative;
    z-index: 1;
    border: none;
    cursor: pointer;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-light));
    border-radius: var(--radius-full);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-medium);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(94, 252, 232, 0.4);
    color: var(--text-dark);
}

.cta-button:hover::before {
    opacity: 1;
}

/* Header */
header {
    padding: var(--spacing-sm) 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.logo {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-dark));
    transition: width var(--transition-medium);
}

.nav-links a:hover {
    color: var(--primary-light);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding-top: 120px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(94, 252, 232, 0.1), transparent 60%);
    z-index: -1;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.hero-content {
    max-width: 550px;
}

.hero-content p {
    font-size: 1.1rem;
    margin: var(--spacing-md) 0 var(--spacing-lg);
    opacity: 0.9;
}

.hero-image {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Features Section */
.features {
    background: linear-gradient(180deg, var(--bg-darker), var(--bg-dark));
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(115, 110, 254, 0.1), transparent 70%);
    z-index: 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.feature-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    transition: transform var(--transition-medium);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(94, 252, 232, 0.3);
}

.feature-icon {
    margin-bottom: var(--spacing-sm);
}

.feature-card h3 {
    color: var(--primary-light);
    margin-bottom: var(--spacing-sm);
}

.feature-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.8);
}

/* Chat Demo Section */
.chat-demo {
    background: var(--bg-darker);
    position: relative;
    overflow: hidden;
}

.chat-demo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(94, 252, 232, 0.1), transparent 70%);
    z-index: 0;
}

.chat-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.chat-header {
    padding: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
    background: rgba(35, 35, 60, 0.95);
}

.chat-header span {
    font-weight: 500;
}

.chat-messages {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-height: 350px;
    overflow-y: auto;
}

.message {
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    max-width: 80%;
}

.message p {
    margin-bottom: 0;
}

.message.ai {
    background: linear-gradient(135deg, rgba(94, 252, 232, 0.1), rgba(115, 110, 254, 0.1));
    border-left: 3px solid var(--primary-light);
    align-self: flex-start;
}

.message.user {
    background: rgba(255, 255, 255, 0.05);
    border-right: 3px solid var(--primary-dark);
    align-self: flex-end;
}

.chat-input {
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

/* Experience Section */
.experience {
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.experience::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 30%;
    background: radial-gradient(circle, rgba(94, 252, 232, 0.1), transparent 70%);
    z-index: 0;
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.experience-item {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-medium);
}

.experience-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.experience-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: var(--spacing-xs);
    opacity: 0.8;
}

.experience-item h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
}

.experience-cta {
    text-align: center;
    margin-top: var(--spacing-lg);
}

.experience-cta p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

/* FAQ Section */
.faq {
    background: linear-gradient(135deg, var(--bg-darker), var(--bg-dark));
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: var(--spacing-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.faq-question {
    padding: var(--spacing-md);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    padding-right: 40px;
    transition: all var(--transition-fast);
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary-light);
    transition: transform var(--transition-medium);
}

.faq-item.active .faq-question {
    background: rgba(94, 252, 232, 0.05);
}

.faq-item.active .faq-question::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-medium);
}

.faq-answer p {
    padding: 0 var(--spacing-md) var(--spacing-md);
    opacity: 0.9;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-light));
    color: var(--text-dark);
    text-align: center;
    padding: var(--spacing-lg) 0;
}

.cta-section h2 {
    font-size: 2.2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.cta-section p {
    margin-bottom: var(--spacing-md);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.8;
}

.cta-section .cta-button {
    background: var(--text-dark);
    color: var(--text-light);
}

.cta-section .cta-button::before {
    background: var(--bg-darker);
}

/* Footer */
footer {
    background: var(--bg-darker);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-logo {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-favicon {
    margin-top: var(--spacing-xs);
}

.footer-links {
    display: flex;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.footer-col h4 {
    color: var(--primary-light);
    margin-bottom: var(--spacing-sm);
    font-size: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.footer-col ul li a:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    font-size: 0.9rem;
    opacity: 0.6;
    margin-bottom: 0;
}

/* Media Queries */
@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        order: 1;
    }
    
    .hero-image {
        order: 0;
        margin-bottom: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-darker);
        flex-direction: column;
        justify-content: center;
        transition: all var(--transition-medium);
        z-index: 99;
    }
    
    .nav-links.active {
        right: 0;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .nav-links li {
        margin: var(--spacing-sm) 0;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .footer-main {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    :root {
        --spacing-xl: 3rem;
    }
    
    .feature-grid,
    .experience-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--spacing-md);
    }
}
