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

/* Responsive Iframe Styles */
.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin: 1rem 0;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f0f6;
    background-image: linear-gradient(135deg, #f8f0f6 0%, #e8d8e3 100%);
}

/* Header and Navigation */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Menu Toggle (Hamburger) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1000;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* Navigation Links */
.nav-links {
    display: flex;
    list-style: none;
    transition: all 0.3s ease;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-links a:hover {
    color: #ffd700;
    transform: translateY(-2px);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4rem;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.hero-content {
    flex: 1;
    padding-right: 2rem;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn.secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn.large {
    padding: 1.5rem 3rem;
    font-size: 1.2rem;
}

.hero-image {
    flex: 1;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Features Section */
.features {
    margin-bottom: 4rem;
}

.features h3 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
}

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

.card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.card h4 {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    margin-bottom: 0.5rem;
    color: #667eea;
}

.card p {
    margin-bottom: 1rem;
    color: #666;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    flex-grow: 1;
}

.card .btn {
    margin-top: auto;
}

/* Testimonials Section */
.testimonials {
    margin-bottom: 4rem;
    padding: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.testimonials h3 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

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

.testimonial {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.testimonial .stars {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.testimonial p {
    font-style: italic;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.testimonial h5 {
    text-align: right;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.testimonial .testimonial-date {
    text-align: right;
    font-size: 0.8rem;
    opacity: 0.8;
    font-style: italic;
}

/* Latest Articles Section */
.latest-articles {
    margin-bottom: 4rem;
}

.latest-articles h3 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
}

.article-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.article {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.article img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    margin-bottom: 1rem;
}

.article h4 {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: #333;
    margin-bottom: 1rem;
}

.article p {
    color: #666;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    display: block;
    padding: 0 1rem 1rem;
    color: #667eea;
    font-weight: bold;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* Video Section */
.video-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    margin: 60px auto;
    max-width: 1200px;
    box-sizing: border-box;
}

.video-section h3 {
    font-size: 32px;
    margin-bottom: 30px;
    color: #333;
}

.video-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.video-container .video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
}

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

/* YouTube Embed Responsive */
.youtube-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin: 1rem 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Map Section Responsive */
.map-section {
    margin: 2rem 0;
    padding: 0 1rem;
}

.map-section h2 {
    margin-bottom: 1rem;
    text-align: center;
    color: #333;
}

.map {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.map iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-container p {
    margin-top: 15px;
    color: #666;
    font-style: italic;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 60px 20px;
    margin: 60px auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    max-width: 1200px;
    box-sizing: border-box;
}

.cta h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: #667eea;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
    color: #888;
}

/* Tool Pages */
.tool-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.tool-container h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.tool-container p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #666;
}

.tool-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Article Pages */
.article-page {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.article-page h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #333;
}

.article-page .meta {
    color: #888;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.article-page img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.article-page p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #333;
}

.article-page h2 {
    color: #667eea;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 2rem;
}

/* Contact Page */
.contact-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.contact-container h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #667eea;
}

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

.contact-item {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.contact-item p {
    color: #666;
}

/* Form styling */
.contact-form .form-group {
    margin-bottom: 20px;
    position: relative;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Form validation states */
.contact-form .form-group.valid input,
.contact-form .form-group.valid select,
.contact-form .form-group.valid textarea {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

.contact-form .form-group.invalid input,
.contact-form .form-group.invalid select,
.contact-form .form-group.invalid textarea {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

/* Yue Lao Fortune Slip Styles */
.fortune-slip-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.fortune-slip-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.fortune-slip-form input[type="text"],
.fortune-slip-form select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.fortune-slip-form input[type="text"]:focus,
.fortune-slip-form select:focus {
    outline: none;
    border-color: #ff6b6b;
}

#draw-fortune {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

#draw-fortune:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

#draw-fortune:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

#fortune-result {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-height: 200px;
}

.fortune-slip {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #fff9c4, #fff3e0);
    border-radius: 12px;
    border: 2px solid #ffd54f;
    position: relative;
}

.fortune-slip:before {
    content: '\002666';
    font-size: 4rem;
    color: #ff6b6b;
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #ffd54f;
}

.fortune-slip h3 {
    margin-top: 2rem;
    color: #333;
    font-size: 1.5rem;
}

.fortune-level {
    display: inline-block;
    margin: 1rem 0;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fortune-text {
    font-size: 1.2rem;
    font-style: italic;
    color: #555;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
}

.fortune-interpretation, .fortune-advice {
    margin: 1.5rem 0;
    text-align: left;
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
}

.fortune-interpretation h4, .fortune-advice h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.fortune-interpretation p, .fortune-advice p {
    color: #555;
    line-height: 1.6;
}

.loading {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    padding: 2rem;
}

.error {
    text-align: center;
    font-size: 1.1rem;
    color: #ff6b6b;
    padding: 2rem;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
    border: 1px solid #ff6b6b;
}

.fortune-image {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive styles for Fortune Slip */
@media (max-width: 768px) {
    .fortune-slip-form,
    #fortune-result {
        padding: 1.5rem;
    }
    
    .fortune-slip {
        padding: 1.5rem;
    }
    
    .fortune-slip:before {
        font-size: 3rem;
        width: 60px;
        height: 60px;
        top: -15px;
    }
    
    .fortune-slip h3 {
        margin-top: 1.5rem;
        font-size: 1.3rem;
    }
}

/* FAQ styles */
.faq-item {
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.faq-item h3 {
    margin: 0;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-item h3:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.faq-item h3::after {
    content: '+';
    font-size: 24px;
    transition: transform 0.3s ease;
}

.faq-item.expanded h3::after {
    transform: rotate(45deg);
}

.faq-item p {
    margin: 0;
    padding: 15px 20px;
    background-color: white;
    color: #333;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 2rem;
    }
    
    /* Mobile Menu */
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-links li {
        margin: 1rem 0;
        margin-left: 0;
    }
    
    .nav-links a {
        font-size: 1.2rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Mobile Menu Animation */
    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Testimonials Section Responsive */
    .testimonials {
        padding: 1.5rem;
    }
    
    .testimonial-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Feature Cards Mobile Responsive - Two Columns */
    .feature-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .card img {
        max-height: 150px;
    }
    
    /* Article Cards Mobile Responsive - Two Columns */
    .article-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .article {
        padding: 1rem;
    }
    
    .article img {
        max-height: 150px;
    }
}