/* Mathematics Hub - Turquoise Sky Theme */
@font-face {
    font-family: 'Angsana New';
    src: url('assets/fonts/Angsana New.woff2') format('woff2'),
         url('assets/fonts/Angsana New.woff') format('woff'),
         url('assets/fonts/Angsana New.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-turquoise: #00ced1;
    --secondary-turquoise: #40e0d0;
    --sky-blue: #87ceeb;
    --deep-sky-blue: #00bfff;
    --sun-gold: #ffd700;
    --text-main: #0f172a;
    --text-muted: #334155;
    --card-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Angsana New', 'Sarabun', sans-serif;
    font-size: 24px;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(180deg, #87ceeb 0%, #00ced1 50%, #40e0d0 100%);
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
}

/* Moving Sky Background */
.sky-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    filter: blur(10px);
    animation: moveClouds linear infinite;
}

.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud-1 { width: 200px; height: 60px; top: 10%; left: -250px; animation-duration: 60s; }
.cloud-2 { width: 300px; height: 80px; top: 30%; left: -350px; animation-duration: 90s; animation-delay: -10s; }
.cloud-3 { width: 150px; height: 50px; top: 60%; left: -200px; animation-duration: 75s; animation-delay: -20s; }
.cloud-4 { width: 250px; height: 70px; top: 80%; left: -300px; animation-duration: 110s; animation-delay: -30s; }

@keyframes moveClouds {
    from { transform: translateX(-100px); }
    to { transform: translateX(calc(100vw + 400px)); }
}

.sun {
    position: absolute;
    top: 50px;
    right: 50px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--sun-gold) 0%, rgba(255, 215, 0, 0) 70%);
    border-radius: 50%;
    box-shadow: 0 0 50px var(--sun-gold);
    animation: glow 4s ease-in-out infinite alternate;
}

@keyframes glow {
    from { transform: scale(1); opacity: 0.8; }
    to { transform: scale(1.1); opacity: 1; }
}

/* Main Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Language Toggle */
.lang-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.lang-btn {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.lang-btn:hover {
    background: white;
    transform: translateY(-2px);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 5rem;
    animation: fadeInDown 1s ease-out;
}

.header h1 {
    font-size: 5.5rem;
    color: white;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.header p {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.menu-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 2rem;
    padding: 3.5rem 2rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeInUp 1s ease-out backwards;
}

.menu-card:nth-child(1) { animation-delay: 0.2s; }
.menu-card:nth-child(2) { animation-delay: 0.4s; }
.menu-card:nth-child(3) { animation-delay: 0.6s; }

.menu-card:hover {
    transform: translateY(-15px) scale(1.02);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    color: var(--deep-sky-blue);
    box-shadow: 0 8px 20px rgba(0, 191, 255, 0.2);
    transition: transform 0.5s ease;
}

.menu-card:hover .card-icon {
    transform: rotate(360deg);
}

.menu-card h2 {
    font-size: 2.8rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.menu-card p {
    font-size: 1.5rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem;
    color: white;
    font-size: 1.3rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 { font-size: 3.5rem; }
    .header p { font-size: 1.4rem; }
    .menu-card h2 { font-size: 2.2rem; }
}
