/* Global Styles & Variables */
:root {
    --primary-color: #0A2463;
    --secondary-color: #F8F9FA;
    --accent-color: #D83F31;
    --text-color: #343A40;
    --bg-color: #E9ECEF;
    --light-bg: #fff;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    background: 
        linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
        url('https://i.pinimg.com/originals/ce/c8/16/cec81666c85e2b4f971c26f63f5b7c7b.jpg') no-repeat center center/cover;
    color: var(--text-color);
    background-attachment: fixed;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--light-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

header nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

header nav a {
    font-weight: 600;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    height: 60vh;
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1547891654-e66ed7ebb968?q=80&w=2070&auto-format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
}

@keyframes pan-down {
    from {
        background-position: center top;
    }
    to {
        background-position: center bottom;
    }
}

/* K-pop Demon Hunters Hero Section */
.hero-k-pop {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://lh3.google.com/u/0/d/1oMIS_bIVfE2nbEolZci-0jx-ivfh_OSF=w958-h894-iv1?auditContext=prefetch') no-repeat center center/cover;
    position: relative;
    animation: pan-down 20s linear infinite alternate;
}

.hero-k-pop .hero-content {
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

.hero-k-pop h1 {
    font-family: 'Georgia', serif; /* More dramatic font */
    font-size: 4.5rem; /* Slightly larger */
    color: #fff;
    font-weight: bold;
}

.hero-k-pop p {
    font-size: 1.5rem;
    color: #f0f0f0;
    font-weight: 500;
}

.cta-button {
    display: inline-block;
    background-color: transparent;
    color: rgba(255, 255, 255, 0.7); /* Lighter white text */
    padding: 10px 20px; /* Slightly smaller padding */
    margin-top: 20px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.4); /* Very subtle white border */
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    box-shadow: none;
    font-size: 0.9rem; /* Slightly smaller font */
}

.cta-button:hover {
    background-color: rgba(255, 255, 255, 0.05); /* Very slight white fill on hover */
    border-color: rgba(255, 255, 255, 0.7); /* Border becomes more defined */
    color: white; /* Text becomes pure white */
}

/* Main Content */
main {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.content-section {
    padding: 3rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    border-radius: 10px;
}

.content-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

/* K-Food Gallery */
.k-food-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.food-item {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.food-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

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

.food-item h3 {
    padding: 1.5rem;
    font-size: 1.2rem;
    text-align: center;
}

.food-item p {
    padding: 0 1.5rem 1.5rem;
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--primary-color);
    color: #fff;
    position: relative;
    z-index: 1;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: #fff;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Link wrapper for food items */
.food-item-link {
    text-decoration: none;
    color: inherit;
}

/* Styles for the detail pages */
.detail-page {
    padding: 2rem;
    max-width: 800px;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.recipe-title-header {
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    border-radius: 8px 8px 0 0;
    margin-bottom: 2rem;
}

.recipe-title-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px 8px 0 0;
}

.recipe-title-header h1 {
    position: relative;
    z-index: 1;
    font-size: 3.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.food-detail h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.food-detail h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 0.5rem;
}

.food-detail ul, .food-detail ol {
    padding-left: 25px;
    line-height: 1.8;
}

.food-detail p {
    line-height: 1.8;
}

.more-info-link {
    text-align: right;
    margin-bottom: 1.5rem;
}

.more-info-link a {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.more-info-link a:hover {
    color: var(--accent-color);
}

/* Test List Styles */
.test-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.test-item-link {
    text-decoration: none;
    color: inherit;
}

.test-item {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 2rem;
    text-align: center;
}

.test-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

.test-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.test-item p {
    font-size: 1rem;
}

/* Test Container Styles */
.test-container {
    padding: 2rem;
    text-align: center;
    max-width: 600px;
    margin: auto;
}

.upload-area {
    margin: 2rem 0;
}

.upload-label {
    display: inline-block;
    cursor: pointer;
    border: 2px dashed var(--primary-color);
    border-radius: 10px;
    padding: 1rem;
    width: 100%;
    max-width: 400px;
    margin: auto;
    transition: background-color 0.3s ease;
}

.upload-label:hover {
    background-color: rgba(10, 36, 99, 0.1);
}

#image-preview {
    width: 100%;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
}

#image-preview span {
    font-size: 4rem;
    line-height: 1;
}

#image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.test-btn {
    background-color: var(--primary-color);
    color: #fff;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.test-btn:hover {
    background-color: var(--accent-color);
}

.test-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#result-container {
    margin-top: 2rem;
}

/* Learn Hangeul Page */
.progress-container {
    background-color: var(--bg-color);
    border-radius: 5px;
    margin-bottom: 2rem;
    padding: 0.5rem;
    text-align: center;
    font-weight: bold;
}

.progress-bar {
    background-color: var(--primary-color);
    height: 20px;
    border-radius: 3px;
    transition: width 0.5s ease-in-out;
}

.lesson-section {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    margin-bottom: 2rem;
}

.lesson-section h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hangeul-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.hangeul-image {
    display: block; /* To center the image using margin auto */
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem auto; /* Center it and give some vertical margin */
    box-shadow: 0 8px 15px rgba(0,0,0,0.1); /* Subtle shadow for depth */
}

/* Contact Form */
.contact-form {
    margin-top: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(10, 36, 99, 0.2);
}
