/* =================== 기본 설정 =================== */
:root {
    /* 건강/AI 테마 색상 */
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --secondary-color: #3b82f6;
    --secondary-dark: #2563eb;
    --accent-color: #8b5cf6;
    --text-color: #1e293b;
    --text-light: #64748b;
    --light-bg: #f8fafc;
    --dark-bg: #1e293b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --error-color: #ef4444;

    /* 그라데이션 */
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);

    --container-width: 1200px;
    --header-height: 70px;
    --footer-height: 350px;
    --border-radius: 12px;
    --box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    margin-left: -15px;
    margin-right: -15px;
}

/* =================== 헤더 스타일 =================== */
.site-header {
    background-color: white;
    box-shadow: 0 2px 15px rgba(16, 185, 129, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    transition: all 0.3s ease;
}

.navbar {
    padding: 0;
}

.navbar-brand {
    padding: 0;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand img {
    height: 42px;
}

.navbar-nav .nav-link {
    color: var(--text-color);
    font-weight: 600;
    padding: 12px 20px;
    margin: 0 4px;
    border-radius: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    color: white;
    background: var(--gradient-primary);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.navbar-nav .nav-link.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.download-buttons {
    display: flex;
    gap: 10px;
}

.btn-download {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    background-color: var(--light-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-download i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.btn-download.android:hover {
    background-color: #a4c639;
    color: white;
    border-color: #a4c639;
}

.btn-download.ios:hover {
    background-color: #000;
    color: white;
    border-color: #000;
}

/* =================== 메인 콘텐츠 영역 =================== */
.main-content {
    flex: 1;
}

/* =================== 푸터 스타일 =================== */
.site-footer {
    background-color: var(--dark-bg);
    color: white;
    padding: 50px 0 20px;
}

.footer-logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo {
    width: 50px;
    flex-shrink: 0;
}

.footer-fitchy-intro {
    flex: 1;
}

.fitchy-message {
    margin: 0;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
}

.footer-links {
    padding: 0;
    margin-bottom: 30px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-download {
    display: flex;
    flex-direction: column;
}

.btn-download-footer {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 50px;
    margin-bottom: 12px;
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-download-footer i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.btn-download-footer:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
}

.social-links {
    display: flex;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 15px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.social-links a:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* 모바일 다운로드 FAB (Floating Action Button) */
.mobile-download-fab {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

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

.btn-download-fab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 100px;
    border: none;
    font-weight: 700;
    font-size: 15px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow:
        0 4px 14px rgba(16, 185, 129, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
}

.btn-download-fab:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 8px 24px rgba(16, 185, 129, 0.5),
        0 4px 10px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-download-fab:active {
    transform: translateY(0) scale(0.98);
    box-shadow:
        0 2px 8px rgba(16, 185, 129, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

.fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 12px;
    animation: bounce-down 2s infinite;
}

.fab-text {
    letter-spacing: 0.02em;
}

@keyframes bounce-down {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(3px);
    }
    60% {
        transform: translateY(2px);
    }
}

/* 구 버튼 호환성 (legacy) */
.mobile-download-btn {
    display: none;
}

.btn-download-mobile {
    display: none;
}

/* 다운로드 모달 */
.app-download-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-modal-download {
    display: flex;
    align-items: center;
    padding: 16px 28px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-modal-download i {
    margin-right: 16px;
    font-size: 28px;
}

.btn-modal-download.android {
    background-color: #a4c639;
    color: white;
    border: 2px solid #a4c639;
}

.btn-modal-download.ios {
    background-color: #000;
    color: white;
    border: 2px solid #000;
}

.btn-modal-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* 광고 배너 컨테이너 */
.ad-banner-container {
    padding: 20px 0;
    background-color: var(--light-bg);
}

.ad-banner {
    background-color: #f5f5f5;
    border-radius: var(--border-radius);
    padding: 10px;
    text-align: center;
    overflow: hidden;
    min-height: 100px;
}

/* 공유 모달 */
.modal-content {
    border-radius: 15px;
    overflow: hidden;
}

.modal-header {
    border-bottom: none;
    padding: 20px 25px 10px;
}

.modal-body {
    padding: 10px 25px 25px;
}

.share-link-container {
    display: flex;
    margin-bottom: 20px;
}

.share-link-container input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex: 1;
}

.share-link-container button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.social-share-buttons {
    display: flex;
    justify-content: space-between;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 5px;
    border: none;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    margin: 0 5px;
}

.btn-social i {
    margin-right: 8px;
}

#shareX {
    background-color: #000000;
}

#shareFacebook {
    background-color: #4267B2;
}

#shareKakao {
    background-color: #FEE500;
    color: #000;
}

.btn-social:hover {
    opacity: 0.9;
}

/* =================== 반응형 디자인 =================== */
@media (max-width: 992px) {
    .download-buttons {
        margin-top: 15px;
    }

    .btn-download {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .download-buttons {
        display: none;
    }

    .mobile-download-fab {
        display: block;
    }

    .footer-bottom {
        flex-direction: column;
    }

    .copyright {
        margin-bottom: 15px;
    }

    .social-links {
        justify-content: center;
    }

    .social-links a {
        margin: 0 8px;
    }
}


/* 언어 선택기 스타일 */
.language-selector {
    position: relative;
    display: inline-block;
}

.language-selector select {
    padding: 10px 16px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background-color: white;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.language-selector select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.language-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.language-selector::after {
    content: "🌐";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 1.1rem;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .language-selector {
        margin-bottom: 15px;
        display: block;
        text-align: center;
    }

    .language-selector select {
        width: 100%;
    }

    .footer-logo-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .fitchy-message {
        font-size: 0.9rem;
    }
}
