/* ============================================
   Preview页面 - 暗黑风格 + 黄色手绘风格
   ============================================ */

/* 暗黑主题变量 */
:root {
    --dark-bg: #0a0a0a;
    --dark-card: #1a1a1a;
    --dark-border: #2a2a2a;
    --yellow: #FFD700;
    --yellow-dark: #FFA500;
    --yellow-bright: #FFED4E;
    --text-light: #f5f5f5;
    --text-muted: #a0a0a0;
}

/* 全局暗黑背景 */
body {
    background: var(--dark-bg) !important;
    color: var(--text-light) !important;
}

/* 主页容器 */
.homepage {
    background: var(--dark-bg) !important;
}

/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 手绘背景 - 暗黑版本 */
.hand-drawn-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
    background-image:
        radial-gradient(circle at 20% 30%, var(--yellow) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, var(--yellow-dark) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    background-size: 100% 100%;
}

/* 导航栏 - 暗黑手绘风格 */
.navbar {
    background: var(--dark-card) !important;
    border-bottom: 3px solid var(--yellow) !important;
    box-shadow: 0 4px 0 rgba(255, 215, 0, 0.3), 0 8px 16px rgba(0, 0, 0, 0.5) !important;
}

.navbar .logo {
    color: var(--yellow) !important;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.navbar .nav-link {
    background: var(--dark-card) !important;
    border: 2px solid var(--yellow) !important;
    color: var(--yellow) !important;
    box-shadow: 4px 4px 0 rgba(255, 215, 0, 0.3);
    transform: rotate(-1deg);
    transition: all 0.3s ease;
}

.navbar .nav-link:hover {
    background: var(--yellow) !important;
    color: var(--dark-bg) !important;
    transform: rotate(1deg) scale(1.05);
    box-shadow: 6px 6px 0 rgba(255, 215, 0, 0.5);
}

.navbar .nav-link.active {
    background: var(--yellow) !important;
    color: var(--dark-bg) !important;
    border-color: var(--yellow) !important;
    box-shadow: 6px 6px 0 rgba(255, 215, 0, 0.5);
    transform: rotate(0deg);
}

.navbar .mobile-menu-toggle span {
    background: var(--yellow) !important;
}

/* Features Showcase - 暗黑手绘风格 */
.features-showcase {
    background: var(--dark-bg) !important;
    padding: 5rem 0;
    position: relative;
}

.feature-showcase-item {
    background: var(--dark-card);
    border: 3px solid var(--yellow);
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 4rem;
    box-shadow: 8px 8px 0 rgba(255, 215, 0, 0.2),
        0 0 0 1px rgba(255, 215, 0, 0.1) inset;
    position: relative;
    transform: rotate(-0.5deg);
    transition: all 0.3s ease;
}

.feature-showcase-item:nth-child(even) {
    transform: rotate(0.5deg);
}

.feature-showcase-item:hover {
    transform: rotate(0deg) translateY(-5px);
    box-shadow: 12px 12px 0 rgba(255, 215, 0, 0.3),
        0 0 0 2px rgba(255, 215, 0, 0.2) inset;
    border-color: var(--yellow-bright);
}

/* 手绘风格装饰线 */
.feature-showcase-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px dashed var(--yellow);
    border-radius: 16px;
    opacity: 0.3;
    pointer-events: none;
}

/* 图片包装器 - 手绘风格 */
.feature-image-wrapper {
    background: var(--dark-card);
    border: 3px solid var(--yellow);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 6px 6px 0 rgba(255, 215, 0, 0.2),
        inset 0 0 20px rgba(255, 215, 0, 0.05);
    transform: rotate(-2deg);
    transition: all 0.3s ease;
}

.feature-showcase-item:nth-child(even) .feature-image-wrapper {
    transform: rotate(2deg);
}

.feature-image-wrapper:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 8px 8px 0 rgba(255, 215, 0, 0.3),
        inset 0 0 30px rgba(255, 215, 0, 0.1);
    border-color: var(--yellow-bright);
}

.feature-image-wrapper img {
    border-radius: 8px;
    filter: brightness(1.1) contrast(1.05);
}

/* 内容区域 */
.feature-content-wrapper {
    padding: 2rem;
}

.feature-title {
    color: var(--yellow) !important;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 215, 0, 0.3);
    position: relative;
    display: inline-block;
    transform: rotate(-1deg);
}

.feature-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--yellow);
    transform: skew(-10deg);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
}

.feature-description {
    color: var(--text-light) !important;
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    color: var(--text-light) !important;
    padding: 0.75rem 0;
    font-size: 1.125rem;
    position: relative;
    padding-left: 2.5rem;
}

.feature-list li::before {
    content: '✎';
    position: absolute;
    left: 0;
    color: var(--yellow);
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    transform: rotate(-15deg);
}

/* Business Section - 暗黑手绘风格 */
.business-section {
    background: var(--dark-card) !important;
    padding: 80px 0;
    border-top: 3px solid var(--yellow);
    border-bottom: 3px solid var(--yellow);
    position: relative;
}

.business-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(255, 215, 0, 0.03) 10px,
            rgba(255, 215, 0, 0.03) 20px);
    pointer-events: none;
}

.business-section .section-title {
    color: var(--yellow) !important;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 215, 0, 0.3);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    transform: rotate(-1deg);
}

.business-section .section-subtitle {
    color: var(--text-muted) !important;
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 3rem;
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.business-card {
    background: var(--dark-card) !important;
    padding: 32px;
    border-radius: 16px;
    border: 3px solid var(--yellow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 6px 6px 0 rgba(255, 215, 0, 0.2),
        0 0 0 1px rgba(255, 215, 0, 0.1) inset;
    position: relative;
    transform: rotate(-0.5deg);
}

.business-card:nth-child(2) {
    transform: rotate(0.5deg);
}

.business-card:nth-child(3) {
    transform: rotate(-0.3deg);
}

.business-card:hover {
    transform: rotate(0deg) translateY(-5px);
    box-shadow: 10px 10px 0 rgba(255, 215, 0, 0.3),
        0 0 0 2px rgba(255, 215, 0, 0.2) inset;
    border-color: var(--yellow-bright);
}

.business-card .card-icon {
    font-size: 3rem;
    color: var(--yellow);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.business-card h3 {
    /* color: var(--text-light); */
    font-size: 1.5rem;
    COLOR: #000;
    margin-bottom: 1rem;
    font-weight: 700;
}

.business-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.business-card .card-link {
    color: var(--yellow);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.business-card .card-link:hover {
    color: var(--yellow-bright);
    gap: 0.8rem;
}

/* 愿望列表 - 暗黑手绘风格 */
.wish-pool-section {
    background: var(--dark-bg) !important;
    padding: 80px 0;
}

.wish-pool-section .section-title {
    text-align: center;
    color: var(--yellow);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.3);
}

.wish-pool-section .section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.25rem;
    margin-bottom: 3rem;
}

.wish-list-title {
    text-align: center;
    color: var(--yellow);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.wish-form-card,
.wish-list-card {
    background: var(--dark-card);
    border: 3px solid var(--yellow);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 6px 6px 0 rgba(255, 215, 0, 0.2);
    margin-bottom: 2rem;
    transform: none !important;
}

.wish-form-card {
    width: 50%;
    margin: 0 auto 2rem auto;
    text-align: center;
}

.wish-list-card {
    /* transform removed */
}

.wish-form-group input,
.wish-form-group textarea,
.wish-form-group select {
    background: var(--dark-bg);
    border: 2px solid var(--dark-border);
    color: var(--text-light);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    width: 100%;
    transition: all 0.3s ease;
}

.wish-form-group input:focus,
.wish-form-group textarea:focus,
.wish-form-group select:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
    outline: none;
}

.wish-form {
    width: 100%;
}

.wish-submit-btn {
    background: var(--yellow);
    color: var(--dark-bg);
    border: 2px solid var(--yellow);
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    transform: rotate(-1deg);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

.wish-submit-btn:hover {
    background: var(--yellow-bright);
    transform: rotate(0deg) translateY(-2px);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.4);
}

/* ============================================
   登录/注册弹窗 - 暗黑手绘风格 (从 preview-dark.css 移植)
   ============================================ */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal-overlay:not(.hidden) {
    opacity: 1;
}

.auth-modal-overlay.hidden {
    display: none;
}

.auth-modal-content {
    background: var(--dark-card);
    border: 3px solid var(--yellow);
    border-radius: 12px;
    padding: 1rem;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 8px 8px 0 rgba(255, 215, 0, 0.3),
        0 0 0 2px rgba(255, 215, 0, 0.1) inset,
        0 0 30px rgba(255, 215, 0, 0.15);
    transform: none;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
    pointer-events: auto;
    z-index: 10001;
}

@keyframes modalFadeIn {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.auth-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--yellow);
    color: var(--dark-bg);
    border: 2px solid var(--yellow);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    transform: rotate(-15deg);
}

.auth-modal-close:hover {
    background: var(--yellow-bright);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
}

.auth-view {
    display: block;
}

.auth-view.hidden {
    display: none;
}

.auth-title {
    color: var(--yellow) !important;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.8rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* 两列布局样式 */
.auth-form-row {
    display: flex;
    gap: 0.6rem;
}

.auth-form-row .auth-form-group {
    flex: 1;
}

/* 注册提示文字 */
.auth-register-hint {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid var(--yellow);
    border-radius: 6px;
    padding: 0.6rem;
    margin-bottom: 0.6rem;
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    box-shadow: 2px 2px 0 rgba(255, 215, 0, 0.2);
}

.auth-input {
    background: var(--dark-bg);
    border: 2px solid var(--dark-border);
    color: var(--text-light);
    -webkit-text-fill-color: var(--text-light);
    caret-color: var(--text-light);
    color-scheme: dark;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    width: 100%;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.auth-input:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.1);
    transform: translateY(-1px);
}

.auth-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

#auth-modal-overlay input.auth-input:-webkit-autofill,
#auth-modal-overlay input.auth-input:-webkit-autofill:hover,
#auth-modal-overlay input.auth-input:-webkit-autofill:focus,
#auth-modal-overlay input.auth-input:-webkit-autofill:active,
#auth-modal-overlay input.auth-input:autofill,
#auth-modal-overlay input.auth-input:-moz-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--dark-bg) inset;
    box-shadow: 0 0 0 1000px var(--dark-bg) inset;
    background-color: var(--dark-bg);
    background: var(--dark-bg);
    -webkit-text-fill-color: var(--text-light);
    caret-color: var(--text-light);
    transition: background-color 5000s ease-in-out 0s;
}

.auth-captcha-wrapper {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.auth-captcha-wrapper-style {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.auth-captcha-input {
    flex: 1;
}

.auth-captcha-img {
    width: 80px;
    height: 32px;
    background: var(--dark-bg);
    border: 2px solid var(--yellow);
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 2px 2px 0 rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
    transform: rotate(2deg);
    object-fit: contain;
    object-position: center;
}

.auth-captcha-img-style {
    height: 38px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--yellow);
    flex: 0 0 auto;
    transform: none;
    width: auto;
    display: block;
    object-fit: contain;
    object-position: center;
}

.auth-captcha-img:hover,
.auth-captcha-img-style:hover {
    transform: scale(1.05);
    box-shadow: 3px 3px 0 rgba(255, 215, 0, 0.3);
    border-color: var(--yellow-bright);
}

.auth-submit-btn {
    background: var(--yellow) !important;
    color: var(--dark-bg) !important;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    border: 2px solid var(--yellow);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3),
        0 0 0 1px var(--yellow) inset;
    transform: rotate(-1deg);
    transition: all 0.3s ease;
    margin-top: 0.2rem;
}

.auth-submit-btn:hover {
    transform: rotate(0deg) translateY(-2px);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4),
        0 0 0 2px var(--yellow-bright) inset;
    background: var(--yellow-bright) !important;
}

.auth-submit-btn:active {
    transform: rotate(0deg) translateY(0);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.auth-switch {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--text-muted) !important;
    font-size: 12px;
}

.auth-switch-link {
    color: var(--yellow) !important;
    text-decoration: none;
    font-weight: 700;
    margin-left: 0.5rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    display: inline-block;
}

.auth-switch-link:hover {
    color: var(--yellow-bright) !important;
    transform: translateY(-2px);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

/* ============================================
   通用弹窗样式 (Confirm & Profile)
   ============================================ */
.d-none {
    display: none !important;
}

.preview-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 11000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.preview-confirm-overlay:not(.d-none) {
    opacity: 1;
    pointer-events: auto;
}

.preview-confirm-dialog {
    background: var(--dark-card);
    border: 3px solid var(--yellow);
    border-radius: 12px;
    padding: 1.5rem;
    width: var(--width, 90%);
    max-width: var(--max-width, 400px);
    box-shadow: 8px 8px 0 rgba(255, 215, 0, 0.3),
        0 0 0 2px rgba(255, 215, 0, 0.1) inset;
    animation: modalFadeIn 0.3s ease-out;
    position: relative;
}

.preview-confirm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px dashed rgba(255, 215, 0, 0.3);
    padding-bottom: 0.8rem;
}

.preview-confirm-title {
    color: var(--yellow);
    font-size: 1.25rem;
    font-weight: 700;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.preview-confirm-body {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
}

.preview-confirm-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.preview-confirm-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.preview-confirm-btn-cancel {
    background: transparent;
    border-color: var(--text-muted);
    color: var(--text-muted);
}

.preview-confirm-btn-cancel:hover {
    border-color: var(--text-light);
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.05);
}

.preview-confirm-btn-ok {
    background: var(--yellow);
    color: var(--dark-bg);
    border-color: var(--yellow);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

.preview-confirm-btn-ok:hover {
    background: var(--yellow-bright);
    border-color: var(--yellow-bright);
    transform: translateY(-2px);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4);
}

.auth-form-group label {
    color: var(--yellow);
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {

    .wish-form-container,
    .wish-list-container {
        padding: 0 1rem;
    }

    .wish-form-card {
        padding: 1.5rem;
        width: 100%;
    }

    .wish-form {
        width: 100% !important;
    }

    .business-grid {
        grid-template-columns: 1fr;
    }
}

/* Image Modal Fixes */
.hidden-invisible {
    display: none !important;
}

#preview-modal-image {
    transition: none !important;
    /* Ensure smooth drag/zoom */
}
