/*
****************************************************************************************************
****************************************************************************************************
****************************************************************************************************
🌞 라이트 테마 - main-light.css 공통 시작
header, footer, title, contact
*/

body {
    font-family: 'Pretendard', sans-serif;
    background-color: #f5f5f5;
    color: #222;
    margin: 0;
    padding-top: 60px;
    line-height: 1.7;
}

/* ===== 헤더 ===== */
.binary-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    color: #4682B4;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4682B4;
    text-decoration: none;
    transition: color 0.3s;
}
.site-logo:hover {
    color: #315f7c;
}

/* ===== 네비게이션 ===== */
.nav-links {
    display: flex;
    gap: 1.5rem;
}
.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}
.nav-links a:hover {
    color: #4682B4;
}

/* 햄버거 + 테마 버튼 */
.header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}
.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 25px;
    height: 3px;
    background: #4682B4;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger::before { transform: translateY(-8px); }
.hamburger::after { transform: translateY(5px); }
.nav-toggle.active .hamburger { background: transparent; }
.nav-toggle.active .hamburger::before { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle.active .hamburger::after { transform: rotate(-45deg) translate(5px,-5px); }

.theme-btn {
    background: none;
    border: 1px solid #4682B4;
    color: #4682B4;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s;
}
.theme-btn:hover {
    background-color: #4682B4;
    color: #fff;
}

/* ===== 페이지 제목 ===== */
.page-title {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
    background: linear-gradient(135deg, #ffffff, #f0f4f8);
    border-bottom: 1px solid #4682B4;
    margin-bottom: 1rem;
    animation: fadeInDown 0.5s ease-in-out;
}
.page-title h1 {
    font-size: 2.2rem;
    margin: 0;
    color: #4682B4;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.5px;
}
.page-title p {
    font-size: 1.1rem;
    color: #333;
    font-weight: 400;
    margin-top: 0.5rem;
}

/* ===== 페이지 공통 영역 ===== */
.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    color: #333;
}
.page-content h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #222;
}
.page-content p {
    font-size: 1rem;
    margin-bottom: 1rem;
}
.contact-email {
    color: #4682B4;
    text-decoration: none;
}
.contact-email:hover {
    color: #315f7c;
}

/* ===== 푸터 ===== */
.site-footer {
    background-color: #f2f2f2;
    color: #666;
    text-align: center;
    font-size: 0.9rem;
    padding: 1.5rem 1rem;
    border-top: 1px solid #ddd;
    margin-top: 4rem;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}
.footer-right a,
.footer-email,
.contact-email {
    color: #4682B4;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.2s;
}
.footer-right a:hover,
.footer-email:hover,
.contact-email:hover {
    color: #315f7c;
}


.icon-container {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.link-icon {
    width: 42px;
    height: 42px;
    display: inline-block;
    background-size: cover;
    border-radius: 50%;
    transition: transform 0.3s, opacity 0.3s;
    opacity: 0.9;
}

.link-icon:hover {
    transform: scale(1.1);
    opacity: 1;
}

.link-icon.twitter { background-image: url(../img/icon-twitter.png); }
.link-icon.facebook { background-image: url(../img/icon-facebook.png); }
.link-icon.kakao { background-image: url(../img/icon-kakao.png); }

/* ===== 방명록 ===== */
.guestbook {
    max-width: 800px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    padding: 2rem 1rem;
    margin: 0 auto;
}

.guestbook h2 {
    text-align: center;
    color: #4682B4;
    margin-bottom: 1rem;
}

.guestbook-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.guestbook-form input,
.guestbook-form textarea {
    font-size: 1rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
}

.guestbook-form textarea {
    height: 100px;
}

.guestbook-submit {
    background-color: #4682B4;
    color: #fff;
    padding: 0.6rem;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}
.guestbook-submit:hover {
    background-color: #315f7c;
}

/* ===== 댓글 목록 ===== */
.guestbook-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guestbook-item {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.guestbook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.guestbook-name {
    color: #4682B4;
    font-weight: 600;
}

.guestbook-date {
    font-size: 0.85rem;
    color: #999;
}

.guestbook-content {
    margin: 0.5rem 0;
    color: #333;
    white-space: pre-wrap;
    line-height: 1.5;
}

.guestbook-delete {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: transparent;
    border: 1px solid #ccc;
    color: #999;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}
.guestbook-delete:hover {
    background-color: #ffdddd;
    border-color: #ff9999;
    color: #c00;
}

.guestbook-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.guestbook-pagination button {
    padding: 0.4rem 1rem;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f0f0f0;
    cursor: pointer;
}

.guestbook-pagination button:disabled {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

/* ===== 반응형 ===== */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: rgba(255, 255, 255, 0.97);
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        gap: 1rem;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    .nav-links.open {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
    }
    .nav-links a {
        font-size: 1.1rem;
        padding: 0.5rem 0;
    }
    .theme-btn {
        font-size: 0.95rem;
        padding: 5px 10px;
    }
    .site-footer {
        font-size: 0.85rem;
        padding: 1rem 0.5rem;
    }
    .page-content {
        padding: 1rem 0.5rem;
    }
    .page-content h1 {
        font-size: 1.5rem;
    }
    .page-content p {
        font-size: 0.95rem;
    }

    .guestbook {
        padding: 1rem;
    }

    .guestbook-form input,
    .guestbook-form textarea {
        font-size: 0.95rem;
    }

    .guestbook-submit {
        font-size: 0.95rem;
    }

    .guestbook-delete {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .guestbook-pagination {
        gap: 0.5rem;
    }

    .guestbook-pagination button {
        padding: 0.3rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* ===== 애니메이션 ===== */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/*
****************************************************************************************************
****************************************************************************************************
****************************************************************************************************
🌞 라이트 테마 - main-light.css 공통 끝
*/






.container-face {
    max-width: 800px;
    margin: 0 auto;
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.8s ease;
    text-align: center;
    margin-bottom: 30px;
}

/* =============== 업로드 버튼 =============== */
.upload-button {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.upload-button:hover {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    transform: scale(1.03);
}

input[type="file"] {
    display: none;
}

/* =============== 예시 버튼 =============== */
.example-images ul {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.example-images li a {
    background: #e0e7ff;
    color: #3730a3;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}

.example-images li a:hover {
    background: #c7d2fe;
    transform: translateY(-2px);
}

/* =============== 미리보기 이미지 =============== */
.preview-container {
    margin-top: 20px;
    text-align: center;       /* 추가 */
}

.image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    animation: zoomIn 0.5s ease;
    display: block;
    margin: 0 auto;
}

/* =============== 로딩 스피너 =============== */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    width: 100%;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
    display: block;
}

.loading-spinner p {
    margin-top: 10px;
    font-size: 0.95rem;
    color: #1e3a8a;
    text-align: center;
}

/* =============== 공유 아이콘 =============== */
.icon-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 18px 0;
}

.link-icon {
    width: 38px;
    height: 38px;
    background-size: cover;
    transition: transform 0.2s ease;
}

.link-icon:hover {
    transform: scale(1.1);
}

.link-icon.twitter { background-image: url('../img/icon-twitter.png'); }
.link-icon.facebook { background-image: url('../img/icon-facebook.png'); }
.link-icon.kakao { background-image: url('../img/icon-kakao.png'); }

/* =============== 잔액 표시 =============== */
.balance-container {
    font-size: 0.95rem;
    color: #334155;
    margin-top: 8px;
}

/* =============== 메시지 =============== */
.loading-message {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 4px;
}

/* =============== 모달 =============== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.65);
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    background: white;
    margin: 60px auto;
    padding: 20px 20px 30px 20px;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    animation: fadeIn 0.4s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.modal-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 15px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 28px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #111;
}

.custom-alert {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;                  /* ✅ 이 부분 */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* =============== 결과 표시 =============== */
.result-content {
    background: #f0f9ff;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-top: 15px;
}

.result-nickname,
.result-evaluation,
.result-celebrity,
.result-score {
    margin: 8px 0;
    font-size: 0.98rem;
    font-weight: 500;
    color: #0f172a;
}

.score-text {
    font-size: 1.4rem;
    font-weight: bold;
    color: #f59e0b;
    animation: pulse 2s infinite ease-in-out;
}

/* =============== 애니메이션 =============== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

/* =============== 모바일 대응 =============== */
@media (max-width: 480px) {
    .container-face {
        padding: 20px 15px;
    }

    .upload-button {
        font-size: 0.95rem;
        padding: 10px 20px;
    }

    .example-images li a {
        font-size: 0.9rem;
        padding: 7px 12px;
    }

    .modal-content {
        margin: 50px auto;
        padding: 16px 16px 24px 16px;
    }

    .close-btn {
        font-size: 24px;
        top: 8px;
        right: 10px;
    }

    .result-nickname,
    .result-evaluation,
    .result-celebrity,
    .result-score {
        font-size: 0.9rem;
    }

    .score-text {
        font-size: 1.2rem;
    }
}