/* common.css - 통합 스타일 시트 */

/* [1] 초기화 및 공통 스타일 */
* { box-sizing: border-box; }

body {
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    background-color: #fdf8fa;
    color: #5a4a58;
    margin: 0;
}

/* [2] index.html 전용 레이아웃 */
.gallery-body {
    padding: 30px 10px;
    text-align: center;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 760px;
    margin: 0 auto 25px auto;
}

.type-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.type-btn {
    background-color: #ffffff;
    color: #8c7a8b;
    border: 2px solid #f0e4ed;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 182, 193, 0.1);
}

.type-btn:hover {
    background-color: #faf0f4;
    transform: translateY(-2px);
}

.type-btn.active {
    background: linear-gradient(135deg, #ffd3e0, #d4e0f7);
    border-color: transparent;
    color: #5a4a58;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(212, 224, 247, 0.5);
}

.request-btn {
    background: linear-gradient(135deg, #d88ca1, #b59fce);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(216, 140, 161, 0.3);
    text-decoration: none;
    white-space: nowrap;
}

.request-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(216, 140, 161, 0.5);
    background: linear-gradient(135deg, #c77b90, #a48ebd);
}

.menu-info {
    background-color: #ffffff;
    border: 1px solid #f0e4ed;
    border-radius: 16px;
    padding: 20px 25px;
    max-width: 760px;
    margin: 0 auto 25px auto;
    text-align: left;
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.1);
}

.menu-info-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #fdf8fa;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.menu-info-title {
    font-size: 20px;
    font-weight: 800;
    color: #5a4a58;
}

.menu-info-meta {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    gap: 10px;
}

.menu-info-meta span {
    background-color: #faf0f4;
    padding: 6px 14px;
    border-radius: 20px;
    color: #d88ca1;
}

.menu-info-oneline {
    font-size: 16px;
    font-weight: 700;
    color: #5a4a58;
    margin-bottom: 8px;
}

.menu-info-detail {
    font-size: 14px;
    line-height: 1.6;
    color: #8c7a8b;
}

.gallery-wrapper {
    background-color: #ffffff;
    border: 1px solid #f0e4ed;
    border-radius: 16px;
    padding: 20px;
    max-width: 760px;
    margin: 0 auto 30px auto;
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.1);
}

.gallery {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.thumbnail {
    width: 160px;
    aspect-ratio: 16 / 9;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fdf8fa;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbnail:hover { opacity: 0.9; transform: translateY(-3px); box-shadow: 0 6px 15px rgba(255, 182, 193, 0.3); }
.thumbnail.active { opacity: 1; border-color: #ffb6c1; transform: translateY(0); }

.layout-container {
    display: flex;
    justify-content: center;
    max-width: 760px; 
    margin: 0 auto;
}

.player-wrapper { 
    width: 100%; 
    max-width: 760px;
}

iframe {
    width: 100%; 
    aspect-ratio: 16 / 9; 
    border: none; 
    border-radius: 16px;
    background-color: #e8e2e6; 
    box-shadow: 0 10px 30px rgba(180, 160, 175, 0.2);
}

/* [3] artmug.html 전용 레이아웃 */
.poster-body {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.poster-container {
    background-color: #ffffff;
    border: 1.5px solid #f0e4ed;
    border-radius: 16px;
    width: 100%;
    max-width: 760px;
    padding: 40px 45px;
    box-shadow: 0 15px 40px rgba(180, 160, 175, 0.15);
    text-align: left;
}

.poster-title {
    font-size: 24px;
    font-weight: 800;
    color: #d88ca1;
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poster-title::before,
.poster-title::after {
    content: "";
    flex: 1;
    border-bottom: 1.5px dashed #f0e4ed;
    margin: 0 20px;
}

.bottom-notice {
    text-align: center;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px dashed #f0e4ed;
    font-size: 13.5px;
    color: #a493c9;
    font-weight: 700;
    letter-spacing: -0.2px;
}

/* [4] 공통 안내사항 섹션 및 툴팁 스타일 */
.guidelines-container {
    border: 1.5px solid #f0e4ed;
    border-radius: 12px;
    background-color: #ffffff;
    margin-bottom: 25px; 
    transition: all 0.3s ease;
}

.guidelines-header {
    background-color: #fdf8fa;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: #d88ca1;
    user-select: none;
    transition: background-color 0.2s;
    border-radius: 11px 11px 0 0;
}

.guidelines-header:hover {
    background-color: #faf0f4;
}

.guidelines-icon {
    font-size: 14px;
    transition: transform 0.3s;
}

.guidelines-content {
    padding: 15px 20px;
    border-top: 1px dashed #f0e4ed;
    color: #5a4a58;
}

.guidelines-section {
    margin-bottom: 25px;
}

.guidelines-section:last-child {
    margin-bottom: 0;
}

.guidelines-h3 {
    font-size: 14.5px; 
    font-weight: 800;
    color: #8c7a8b;
    margin: 0 0 10px 0;
    background-color: #f0e4ed;
    display: inline-block;
    padding: 5px 13px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.guidelines-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    font-size: 13.5px;
    line-height: 1.6; 
    color: #635361;
}

.guidelines-list li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 8px; 
    word-break: keep-all;
}

.guidelines-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: #d88ca1;
    font-weight: 700;
    font-size: 12px;
    top: 1px;
}

.guidelines-list li:last-child { margin-bottom: 0; }

.highlight-text { 
    color: #d88ca1; 
    font-weight: 800; 
    background: linear-gradient(180deg, rgba(255,255,255,0) 60%, #ffe8ee 40%);
}

.sub-desc {
    font-size: 12px;
    color: #a493c9;
    margin-top: 3px;
    display: block;
}

.tooltip-container {
    position: relative;
    cursor: help;
    border-bottom: 1.5px dotted #d88ca1;
    padding-bottom: 1px;
}

.tooltip-container::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #5a4a58;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: pre-wrap; 
    width: max-content;
    max-width: 320px;
    text-align: center;
    line-height: 1.5;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.tooltip-container::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #5a4a58;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 100;
}

.tooltip-container:hover::after,
.tooltip-container:hover::before {
    opacity: 1;
    bottom: calc(100% + 5px); 
}

.tooltip-container:hover::after {
    bottom: calc(100% + 11px);
}

/* [5] 모달 및 폼 관련 스타일 (index.html 전용) */
.modal-overlay {
    display: none; 
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(90, 74, 88, 0.7);
    z-index: 999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.modal-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 760px;
    max-height: 75vh; 
    overflow-y: auto; 
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    scroll-behavior: smooth; 
}

.modal-content::-webkit-scrollbar { width: 8px; }
.modal-content::-webkit-scrollbar-track { background: #fdf8fa; border-radius: 16px; margin: 10px 0; }
.modal-content::-webkit-scrollbar-thumb { background: #e3d0dd; border-radius: 8px; }
.modal-content::-webkit-scrollbar-thumb:hover { background: #d88ca1; }

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    font-size: 30px;
    color: #8c7a8b;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
    z-index: 10;
}

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

.form-container {
    padding: 35px 45px 40px 45px;
    text-align: left;
}

.modal-main-title {
    font-size: 24px;
    font-weight: 800;
    color: #5a4a58;
    text-align: center;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.agree-wrap {
    padding: 12px 20px; 
    background-color: #ffffff;
    border: 1px solid transparent;
    border-top: 1px solid #f0e4ed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    border-radius: 0 0 11px 11px;
}

.agree-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #d88ca1;
}

.agree-wrap label {
    font-size: 14px;
    font-weight: 700;
    color: #5a4a58;
    cursor: pointer;
    user-select: none;
}

.highlight-error {
    background-color: #fff0f0;
    border-color: #ff6b6b !important;
    border-radius: 0 0 11px 11px;
    animation: pulseError 1.2s infinite;
}

@keyframes pulseError {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(255, 107, 107, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

.form-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #d88ca1;
    margin: 25px 0 15px 0;
    text-align: center;
    letter-spacing: 1px;
}

.form-section-title::before,
.form-section-title::after {
    content: "";
    flex: 1;
    border-bottom: 1.5px dashed #f0e4ed;
    margin: 0 15px;
}

.form-section-title:first-child { margin-top: 0; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px; 
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 13.5px;
    font-weight: 700;
    color: #5a4a58;
    margin-bottom: 6px; 
}

.form-group input {
    font-family: inherit;
    padding: 12px 14px; 
    border: 1px solid #e3d0dd;
    border-radius: 8px;
    background-color: #fdf8fa;
    color: #5a4a58;
    font-size: 14px;
    transition: all 0.3s;
    outline: none;
}

.form-group input:focus {
    border-color: #d88ca1;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(216, 140, 161, 0.1);
}

.form-group input::placeholder {
    color: #dfd4dd;
    font-weight: 400;
}

.copy-btn-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #f0e4ed;
    text-align: center;
}

.save-notice {
    font-size: 13.5px;
    font-weight: 700;
    color: #b59fce;
    margin: 0 0 12px 0;
    animation: floating 2s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

.copy-btn-wrap {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.reset-btn {
    background-color: #ffffff;
    color: #8c7a8b;
    border: 2px solid #f0e4ed;
    padding: 12px 25px; 
    font-size: 14.5px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background-color: #faf0f4;
    color: #d88ca1;
    border-color: #f0e4ed;
}

.copy-btn {
    background: linear-gradient(135deg, #d88ca1, #b59fce);
    color: #ffffff;
    border: none;
    padding: 12px 40px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(216, 140, 161, 0.4);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(216, 140, 161, 0.6);
    background: linear-gradient(135deg, #c77b90, #a48ebd);
}

.confirm-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(90, 74, 88, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.confirm-box {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 30px 25px;
    width: 320px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.confirm-box p {
    color: #5a4a58;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 25px 0;
}

.confirm-btns {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.confirm-btns button {
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-cancel {
    background-color: #fdf8fa;
    color: #8c7a8b;
    border: 1px solid #f0e4ed !important;
}

.btn-cancel:hover {
    background-color: #f0e4ed;
    color: #5a4a58;
}

.btn-confirm {
    background: linear-gradient(135deg, #d88ca1, #b59fce);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(216, 140, 161, 0.3);
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #c77b90, #a48ebd);
    box-shadow: 0 4px 15px rgba(216, 140, 161, 0.5);
    transform: translateY(-1px);
}

.toast {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #5a4a58;
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10000;
    pointer-events: none;
}

.toast.show {
    bottom: 40px;
}