:root {
    --bg-color: #f0f2f5;
    --container-bg: #ffffff;
    --text-color: #333;
    --number-bg: #4a90e2;
    --btn-bg: #50e3c2;
    --btn-hover: #48d1b3;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-color: #ddd;
    --card-bg: #f8f9fa;
    --accent-color: #ff6b6b;
}

body.dark-mode {
    --bg-color: #1a1a1a;
    --container-bg: #2d2d2d;
    --text-color: #f0f2f5;
    --number-bg: #61dafb;
    --btn-bg: #bb86fc;
    --btn-hover: #9b65de;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --border-color: #444;
    --card-bg: #3a3a3a;
    --accent-color: #ff8a8a;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    padding: 20px 0;
    line-height: 1.6;
}

.theme-switch-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    z-index: 1000;
    background: var(--container-bg);
    padding: 10px 15px;
    border-radius: 25px;
    box-shadow: 0 2px 10px var(--shadow-color);
    flex-wrap: wrap;
    gap: 8px;
}

#theme-toggle {
    background: none;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.container {
    text-align: center;
    padding: 40px;
    border-radius: 12px;
    background-color: var(--container-bg);
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: transform 0.3s ease, background-color 0.3s;
    width: 90%;
    max-width: 500px;
    margin-top: 60px;
}

.main-container {
    max-width: 900px;
}

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

h1 {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 2.5rem;
}

h2 {
    color: var(--number-bg);
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 15px;
}

h3 {
    color: var(--text-color);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

h4 {
    color: var(--number-bg);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

/* Hero Section */
.hero-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    margin: 0;
}

/* Content Sections */
.content-section {
    text-align: left;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.content-section:last-of-type {
    border-bottom: none;
}

.content-section p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.content-section ul, .content-section ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.content-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Cuisine Grid */
.cuisine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cuisine-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--btn-bg);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cuisine-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.cuisine-card h3 {
    margin-top: 0;
    color: var(--number-bg);
}

.cuisine-card p {
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.cuisine-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.cuisine-card ul li {
    padding: 5px 0;
    border-top: 1px solid var(--border-color);
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tip-item {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border-top: 4px solid var(--accent-color);
}

.tip-item h4 {
    margin-top: 0;
    color: var(--accent-color);
}

.tip-item p {
    font-size: 0.95rem;
    margin: 0;
}

/* Seasonal Grid */
.seasonal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.season-card {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.season-card h4 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.season-card p {
    font-size: 0.9rem;
    margin: 0;
}

.season-card.spring {
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8b0 100%);
    color: #2d5a45;
}

.season-card.summer {
    background: linear-gradient(135deg, #ffd93d 0%, #ffb347 100%);
    color: #5a4a2d;
}

.season-card.fall {
    background: linear-gradient(135deg, #ffb347 0%, #ff8c42 100%);
    color: #5a3d2d;
}

.season-card.winter {
    background: linear-gradient(135deg, #a8d8ea 0%, #88c4d8 100%);
    color: #2d4a5a;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-box {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s;
}

.feature-box:hover {
    transform: translateY(-3px);
}

.feature-box h4 {
    margin-top: 0;
}

.feature-box p {
    font-size: 0.9rem;
    margin: 0;
}

/* Steps List */
.steps-list {
    background: var(--card-bg);
    padding: 25px 25px 25px 45px;
    border-radius: 12px;
    margin-top: 20px;
}

.steps-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.steps-list li:last-child {
    border-bottom: none;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    background: var(--btn-bg);
    color: white;
    transition: transform 0.2s, background-color 0.2s;
}

.cta-btn:hover {
    transform: translateY(-2px);
    background: var(--btn-hover);
}

.cta-btn.secondary {
    background: var(--number-bg);
}

.cta-btn.secondary:hover {
    opacity: 0.9;
}

/* Result Container */
.result-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    min-height: 80px;
}

.menu-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 40px;
    border-radius: 50px;
    background-color: var(--number-bg);
    color: #ffffff;
    font-size: 2rem;
    font-weight: bold;
    box-shadow: 0 4px 10px var(--shadow-color);
    transition: transform 0.3s ease, background-color 0.3s ease;
    animation: pop-in 0.5s ease forwards;
    white-space: nowrap;
    margin-bottom: 20px;
}

.menu-image {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    border-radius: 12px;
    box-shadow: 0 4px 10px var(--shadow-color);
    animation: pop-in 0.5s ease forwards;
    object-fit: cover;
}

@keyframes pop-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#generate-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    background-color: var(--btn-bg);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px var(--shadow-color);
    width: 100%;
    max-width: 300px;
}

#generate-btn:hover {
    background-color: var(--btn-hover);
    transform: translateY(-2px);
}

#generate-btn:active {
    transform: translateY(0);
}

/* Contact Section */
.contact-section {
    margin-top: 40px;
    text-align: left;
}

.contact-section hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.contact-section h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.contact-section > p {
    margin-bottom: 20px;
    opacity: 0.8;
}

.contact-section form {
    display: flex;
    flex-direction: column;
}

.contact-section input,
.contact-section textarea {
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--container-bg);
    color: var(--text-color);
    font-family: inherit;
}

.contact-section textarea {
    height: 100px;
    resize: none;
}

#submit-btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: var(--number-bg);
    color: #ffffff;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

#submit-btn:hover {
    opacity: 0.8;
}

/* Comments Section */
.comments-section {
    margin-top: 40px;
    text-align: left;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.comments-section h3 {
    margin-bottom: 10px;
}

.comments-section > p {
    margin-bottom: 15px;
    opacity: 0.8;
}

/* Language Link */
.lang-link {
    margin-right: 10px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
    font-size: 0.9rem;
}

.lang-link:hover {
    border-color: var(--text-color);
}

/* Footer */
.site-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-copyright {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-bottom: 5px;
}

.footer-info {
    font-size: 0.75rem;
    opacity: 0.4;
    margin: 0;
}

/* Site Description */
.site-description {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.6;
}

/* About Page Styles */
.about-content {
    text-align: left;
    line-height: 1.8;
}

.about-content h2 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--number-bg);
}

.about-content p {
    margin-bottom: 15px;
    opacity: 0.9;
}

.feature-list {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.feature-item {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--btn-bg);
}

.feature-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
}

.feature-item p {
    margin: 0;
    font-size: 0.95rem;
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.back-link:hover {
    opacity: 1;
}

/* FAQ Styles */
.faq-list {
    margin-top: 20px;
}

.faq-item {
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    background: none;
    border: none;
    width: 100%;
    padding: 20px;
    text-align: left;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.faq-question:hover {
    background: var(--border-color);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 20px 20px;
    line-height: 1.8;
}

/* Blog/Tips Article Styles */
.article-list {
    margin-top: 20px;
}

.article-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 4px solid var(--number-bg);
}

.article-card h3 {
    margin-top: 0;
    color: var(--number-bg);
}

.article-card p {
    margin-bottom: 10px;
    line-height: 1.8;
}

.article-meta {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-top: 15px;
}

/* Animal Test Styles */
.test-section {
    text-align: left;
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin: 20px 0;
    transition: border-color 0.3s, background-color 0.3s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--btn-bg);
    background: var(--card-bg);
}

.upload-area p {
    margin: 0;
    opacity: 0.7;
}

/* Privacy Policy Styles */
.privacy-content {
    text-align: left;
    line-height: 1.8;
}

.privacy-content h2 {
    color: var(--number-bg);
    font-size: 1.4rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

.privacy-content p {
    margin-bottom: 15px;
}

.privacy-content ul {
    padding-left: 25px;
    margin-bottom: 20px;
}

.privacy-content li {
    margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin-top: 80px;
    }

    .main-container {
        max-width: 100%;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .menu-item {
        font-size: 1.5rem;
        padding: 10px 30px;
    }

    #generate-btn {
        font-size: 1rem;
        padding: 12px 24px;
    }

    .theme-switch-wrapper {
        position: fixed;
        top: 10px;
        right: 10px;
        left: 10px;
        justify-content: center;
        padding: 8px 12px;
    }

    .lang-link {
        font-size: 0.8rem;
        margin-right: 8px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .cuisine-grid,
    .tips-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .seasonal-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-btn {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .seasonal-grid {
        grid-template-columns: 1fr;
    }

    .theme-switch-wrapper {
        flex-wrap: wrap;
        gap: 5px;
    }

    .lang-link {
        font-size: 0.75rem;
    }

    #theme-toggle {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* SNS Share Buttons */
.share-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.share-section h4 {
    margin-bottom: 15px;
    font-size: 1rem;
    opacity: 0.8;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    text-decoration: none;
    color: white;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.share-btn:active {
    transform: translateY(-1px);
}

.share-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.share-btn.kakao {
    background: #FEE500;
    color: #3C1E1E;
}

.share-btn.twitter {
    background: #000000;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.copy-link {
    background: var(--number-bg);
}

.share-btn.copy-link.copied {
    background: #4CAF50;
}

/* Result Share Box */
.result-share-box {
    margin-top: 20px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 16px;
    text-align: center;
}

.result-share-box .share-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-color);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: bold;
    z-index: 10000;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

/* Floating Share Button */
.floating-share {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.floating-share-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--btn-bg), var(--number-bg));
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.floating-share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px var(--shadow-color);
}

.floating-share-btn svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.floating-share-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--container-bg);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 5px 25px var(--shadow-color);
    display: none;
    flex-direction: column;
    gap: 10px;
    min-width: 180px;
}

.floating-share-menu.show {
    display: flex;
    animation: slideUp 0.3s ease;
}

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

.floating-share-menu .share-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 15px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .share-buttons {
        gap: 8px;
    }

    .share-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .share-btn span {
        display: none;
    }

    .share-btn svg {
        width: 24px;
        height: 24px;
    }

    .floating-share {
        bottom: 20px;
        right: 20px;
    }

    .floating-share-btn {
        width: 50px;
        height: 50px;
    }
}
