/*
****************************************************************************************************
🌑 다크 테마 - main-dark.css (공통용)
header, footer, title, contact
****************************************************************************************************
*/

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

/* ========== Header ========== */
.binary-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(18, 18, 18, 0.95);
    color: #fff;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    font-family: 'Pretendard', sans-serif;
}

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

/* Site Logo */
.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s;
}
.site-logo:hover {
    color: #90CAF9;
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 1.5rem;
}
.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}
.nav-links a:hover {
    color: #ffffff;
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}
.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 25px;
    height: 3px;
    background: #ffffff;
    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 Button */
.theme-btn {
    background: none;
    border: 1px solid #ffffff;
    color: #ffffff;
    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: #ffffff;
    color: #121212;
}

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

/* ========== Page Content ========== */
.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    color: #dddddd;
}

.page-content h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.page-content p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* ========== Footer ========== */
.site-footer {
    background-color: #181818;
    color: #999;
    text-align: center;
    font-size: 0.9rem;
    padding: 1.5rem 1rem;
    border-top: 1px solid #303030;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-right a,
.footer-email,
.contact-email {
    color: #bbbbbb;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.2s;
}
.footer-right a:hover,
.footer-email:hover,
.contact-email:hover {
    color: #ffffff;
}

.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: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    padding: 2rem 1rem;
    margin: 0 auto;
}

.guestbook h2 {
    text-align: center;
    color: #87cefa;
    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;
    background-color: #2c2c2c;
    color: #f0f0f0;
    border: 1px solid #555;
    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: #2b2b2b;
    border: 1px solid #444;
    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: #87cefa;
    font-weight: 600;
}

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

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

.guestbook-delete {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: transparent;
    border: 1px solid #666;
    color: #aaa;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}
.guestbook-delete:hover {
    background-color: #552222;
    border-color: #aa4444;
    color: #ff6b6b;
}

.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 #555;
    border-radius: 6px;
    background-color: #3a3a3a;
    color: #e0e0e0;
    cursor: pointer;
}

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

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: #181818;
        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;
        pointer-events: auto;
    }
    .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;
    }
}

/* ========== Animation ========== */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/*
****************************************************************************************************
🌑 다크 테마 - main-dark.css (공통용) 끝
****************************************************************************************************
*/






.container-face {
    max-width: 800px;
    margin: 0 auto;
    padding: 25px 20px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.8s ease;
    text-align: center;
    color: #e5e5e5;
    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.4);
}

.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: #1f2937;
    color: #d1d5db;
    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: #374151;
    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.5);
    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 #374151;
    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: #cbd5e1;
    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;
    filter: brightness(0.9);
}

.link-icon:hover {
    transform: scale(1.1);
    filter: brightness(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: #cbd5e1;
    margin-top: 8px;
}

/* =============== 메시지 =============== */
.loading-message {
    font-size: 0.85rem;
    color: #94a3b8;
    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.7);
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    background: #1f2937;
    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.5);
    text-align: center;
    color: #f3f4f6;
}

.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: #d1d5db;
    cursor: pointer;
    transition: color 0.2s;
}

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

/* =============== 커스텀 알림 =============== */
.custom-alert {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.custom-alert-content {
    background: #1f2937;
    padding: 20px 30px;
    border-radius: 12px;
    color: #f3f4f6;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.custom-alert-content button {
    margin-top: 15px;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.custom-alert-content button:hover {
    background: #2563eb;
}

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

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

.score-text {
    font-size: 1.4rem;
    font-weight: bold;
    color: #facc15;
    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;
    }
}