:root {
    --primary-color: #2c3e50;
    --secondary-color: #8e44ad;
    --accent-color: #3498db;
    --text-color: #333;
    --light-bg: #f9f9f9;
    --calm-bg: #e8f5e9;
    --meditation-bg: #f5f5f5;
    --meditation-color: #666;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    position: relative;
    overflow-x: hidden;
}

/* Maple Leaf Animation */
.leaf {
    position: absolute;
    width: 30px;
    height: 30px;
    background: #e41e26;
    border-radius: 50% 0 50% 50%;
    transform-origin: 50% 0;
    animation: fall 10s infinite;
    z-index: 1000;
}

.leaf::before,
.leaf::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
}

.leaf::before {
    left: -25%;
    transform: rotate(45deg);
}

.leaf::after {
    right: -25%;
    transform: rotate(-45deg);
}

/* Different leaf animations */
.leaf-1 { animation: fall 10s 1s infinite; }
.leaf-2 { animation: fall 10s 2s infinite; }
.leaf-3 { animation: fall 10s 3s infinite; }
.leaf-4 { animation: fall 10s 4s infinite; }
.leaf-5 { animation: fall 10s 5s infinite; }

@keyframes fall {
    0% {
        transform: rotate(0deg) translate(0, -100vh);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: rotate(360deg) translate(100vw, 100vh);
        opacity: 0;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--light-bg);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://source.unsplash.com/1600x900/?calm');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    padding-top: 60px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: url('images/slogan-bak.png');
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, 
        #ff0000 0%,
        #ff4000 10%,
        #ff8000 15%,
        #ffbf00 20%,
        #ffff00 25%,
        #bfff00 30%,
        #80ff00 35%,
        #40ff00 40%,
        #00ff00 45%,
        #00ff40 50%,
        #00ff80 55%,
        #00ffbf 60%,
        #00ffff 65%,
        #00bfff 70%,
        #0080ff 75%,
        #0040ff 80%,
        #0000ff 85%,
        #4000ff 90%,
        #8000ff 95%,
        #bf00ff 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-text-fill-color: transparent;
    animation: rainbow 10s infinite linear;
    background-size: 400% 400%;
    display: inline-block;
    padding: 0 5px;
}

@keyframes rainbow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cta-button.secondary {
    background: var(--primary-color);
    color: white;
}

/* Meditation Section */
.meditation {
    padding: 5rem 0;
    background: var(--meditation-bg);
}

.meditation-header {
    text-align: center;
    margin-bottom: 3rem;
}

.meditation-header h2 {
    color: var(--secondary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.meditation-subtitle {
    color: var(--meditation-color);
    font-size: 1.2rem;
}

.meditation-content {
    background: white;
    padding: 4rem;
    border-radius: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.meditation-visual {
    text-align: center;
}

.breathing-circle {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    background: linear-gradient(45deg, #e8f5e9, #f5f5f5);
    animation: pulse 5s infinite;
}

.circle-inner {
    width: 180px;
    height: 180px;
    position: absolute;
    top: 10px;
    left: 10px;
    border-radius: 50%;
    background: white;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.meditation-instructions {
    margin-top: 2rem;
    color: var(--meditation-color);
    font-size: 1.1rem;
}

.music-controls {
    margin-top: 2rem;
    text-align: center;
}

.music-selection {
    position: relative;
}

.music-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-top: 1rem;
    z-index: 10;
}

.music-options.active {
    display: block;
}

.music-option {
    display: block;
    width: 100%;
    padding: 1rem;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--meditation-color);
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.music-option:hover {
    background: var(--light-bg);
}

.music-option.active {
    color: var(--secondary-color);
    font-weight: bold;
}

.music-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.music-button:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

.music-button i {
    font-size: 1.5rem;
}

.music-button.active {
    background: #4CAF50;
}

.music-button.active i {
    color: #fff;
}

.meditation-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.timer-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.timer-button {
    padding: 1rem 2rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.timer-button:hover {
    transform: scale(1.05);
    background: var(--primary-color);
}

.timer-display {
    font-size: 3rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-top: 2rem;
    background: rgba(255,255,255,0.1);
    padding: 1rem 2rem;
    border-radius: 20px;
}

/* Featured Section */
.gallery-section {
    padding: 80px 0;
    background: #fff;
}

.video-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.nav-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

.nav-button:hover {
    background: var(--secondary-color);
}

.nav-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.video-gallery {
    flex: 1;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px;
    scroll-snap-type: x mandatory;
    background: #f0f0f0; /* Debug background color */
    min-height: 400px; /* Ensure minimum height */
    border: 2px solid #ccc; /* Debug border */
}

.video-item {
    flex: 0 0 auto;
    min-width: 300px;
    width: 300px;
    height: 300px; /* Fixed height */
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.video-item iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

.video-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.gallery-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.error-message {
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: #dc3545;
    text-align: center;
    font-size: 1.1rem;
}

.featured {
    padding: 5rem 0;
    background: var(--light-bg);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.gallery-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.gallery-item h3, .gallery-item p {
    padding: 1rem;
}

/* About Section */
.about {
    padding: 5rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 10px;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: var(--light-bg);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

input, textarea {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

textarea {
    height: 150px;
    resize: vertical;
}

/* Buttons */
.cta-button, .submit-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover, .submit-button:hover {
    background: var(--primary-color);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
}
