@tailwind base;
@tailwind components;
@tailwind utilities;

/* Import Kanit font */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');

/* Custom CSS variables for Tailwind v4 */
:root {
    --color-primary: 30 64 175; /* #1e40af */
    --color-secondary: 59 130 246; /* #3b82f6 */
    --color-accent: 96 165 250; /* #60a5fa */
    --color-dark: 30 41 59; /* #1e293b */
    --color-light: 248 250 252; /* #f8fafc */
}

body { 
    font-family: 'Kanit', sans-serif; 
}

/* Color utility classes */
.text-primary { color: rgb(var(--color-primary)); }
.text-secondary { color: rgb(var(--color-secondary)); }
.text-accent { color: rgb(var(--color-accent)); }
.text-dark { color: rgb(var(--color-dark)); }
.text-light { color: rgb(var(--color-light)); }

/* Background effects */
.gradient-bg {
    background: linear-gradient(135deg, 
        rgb(var(--color-primary)) 0%, 
        rgb(var(--color-secondary)) 50%, 
        rgb(var(--color-accent)) 100%);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hover effects */
.hover-lift,
.card-hover {
    transition: all 0.3s ease;
}

.hover-lift:hover,
.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.table-row {
    transition: all 0.3s ease;
}

.table-row:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(147, 197, 253, 0.1));
    transform: scale(1.02);
}

/* Animation effects */
.typing-animation {
    overflow: hidden;
    border-right: 2px solid rgb(var(--color-accent));
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

.floating,
.floating-animation {
    animation: float 6s ease-in-out infinite;
}

.pulse-ring {
    animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

.pulse-glow {
    animation: pulseGlow 2s infinite;
}

.popular-badge {
    background: linear-gradient(45deg, #f59e0b, #f97316);
    animation: bounce 2s infinite;
}

.feature-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hamburger menu */
.hamburger-menu {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: currentColor;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu-item {
    transform: translateX(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-menu-item.show {
    transform: translateX(0);
    opacity: 1;
}

/* Keyframes */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: rgb(var(--color-accent)); }
}

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

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.5); }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-10px); }
    70% { transform: translateY(-5px); }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .typing-animation {
        white-space: normal;
        overflow: visible;
        width: auto;
        display: inline;
        border-right: none;
        animation: none;
    }
    
    .fixed-top-spacing {
        margin-top: 120px;
    }
}