/* assets/css/frontend.css */

.abv2-poster-app {
    display: flex;
    flex-wrap: wrap;
    /* Add flex-wrap for mobile */
    gap: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (max-width: 768px) {
    .abv2-poster-app {
        flex-direction: column;
        padding: 10px;
    }

    .poster-config-panel {
        max-width: 100% !important;
        flex: 1 1 100%;
    }

    .poster-preview-panel {
        flex: 1 1 100%;
        padding: 15px !important;
        overflow-x: auto;
    }

    .capture-area {
        min-width: 100% !important;
        width: 100% !important;
        padding: 20px 15px !important;
    }

    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}

.poster-config-panel {
    flex: 1;
    max-width: 380px;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    height: fit-content;
}

.config-section {
    margin-bottom: 30px;
}

.config-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #1a1a1a;
    border-bottom: 2px solid #07C160;
    padding-bottom: 8px;
}

.field-item {
    margin-bottom: 15px;
}

.field-item label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.field-item input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.qr-upload-box {
    border: 2px dashed #eee;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.qr-upload-box:hover {
    border-color: #07C160;
    background: #f0fdf4;
}

#qr-preview-img {
    max-width: 100px;
    max-height: 100px;
    margin: 0 auto;
}

.field-help {
    font-size: 0.75rem;
    color: #999;
    margin-top: 5px;
}

button {
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    transition: all 0.2s;
}

.button-primary {
    background: #07C160;
    color: #fff;
    width: 100%;
}

.button-primary:hover {
    opacity: 0.9;
}

.button-secondary {
    background: #e3f2fd;
    color: #1976d2;
    width: 100%;
    margin-bottom: 10px;
}

.button-large {
    background: #1a1a1a;
    color: #fff;
    width: 100%;
    padding: 15px;
    font-size: 1rem;
}

.match-checklist-container {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.match-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.match-item-row:last-child {
    border-bottom: none;
}

/* Capture Area Styles - 복제본 */
.poster-preview-panel {
    flex: 1.5;
    background: #e9ecef;
    padding: 40px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    overflow: auto;
    max-height: 90vh;
}

.abv2-poster-app .capture-area {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 800px;
    min-width: 800px;
    margin: 0 auto;
    min-height: 800px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    display: block;
}

.abv2-poster-app #poster-display-title {
    text-align: center;
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #4CAF50;
}

.abv2-poster-app .info-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.abv2-poster-app .info-box h4,
.abv2-poster-app .info-box h3 {
    font-size: 1.2rem;
    color: #343a40;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.abv2-poster-app .info-box p {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.7;
    text-align: justify;
    margin: 0;
}

.abv2-poster-app .text-danger-bold {
    color: #dc3545;
    font-weight: bold;
}

/* 用户自定义文字说明 */
.abv2-poster-app .poster-user-desc {
    background: linear-gradient(135deg, #f0faf4 0%, #e8f5e9 100%);
    border-left: 4px solid #07C160;
    border-radius: 0 8px 8px 0;
    padding: 15px 20px;
    margin-bottom: 25px;
    font-size: 14px;
    color: #2e7d32;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

.abv2-poster-app .char-count {
    color: #999;
    font-size: 12px;
    font-weight: normal;
}

/* === 付费横幅 === */
.abv2-poster-app .premium-banner {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border: 1px solid #f0c36d;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    position: relative;
}

.abv2-poster-app .premium-banner-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.abv2-poster-app .premium-banner-text h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    color: #8b6914;
}

.abv2-poster-app .premium-banner-text p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #6d5a1a;
    line-height: 1.6;
}

.abv2-poster-app .premium-price {
    font-size: 28px !important;
    font-weight: 700;
    color: #d4380d !important;
}

.abv2-poster-app .premium-price span {
    font-size: 14px;
    font-weight: 400;
    color: #999;
}

.abv2-poster-app .premium-buy-btn {
    background: linear-gradient(135deg, #f5a623 0%, #f7931e 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 28px !important;
    border-radius: 25px !important;
    font-size: 15px !important;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    align-self: center;
    transition: transform .2s;
}

.abv2-poster-app .premium-buy-btn:hover {
    transform: scale(1.05);
}

/* 遮罩层 */
.abv2-poster-app .premium-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(1px);
    z-index: 10;
    border-radius: 8px;
    pointer-events: none;
}

/* 到期提示 */
.abv2-poster-app .premium-expire-info {
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 10px;
}

/* config-section 需要 relative 定位以适配 overlay */
.abv2-poster-app .config-section:first-child {
    position: relative;
}

.abv2-poster-app .match-card {
    padding: 25px 0;
    border-bottom: 4px solid #eee;
}

.abv2-poster-app .match-card:last-child {
    border-bottom: none;
}

.abv2-poster-app .match-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.abv2-poster-app .header-content {
    flex: 1;
}

.abv2-poster-app .match-title {
    font-size: 1.6rem;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1.3;
}

.abv2-poster-app .match-meta {
    font-size: 1rem;
    color: #666;
    margin-top: 8px;
}

.abv2-poster-app .tag-group {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.abv2-poster-app .rec-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
}

.abv2-poster-app .rec-high {
    background-color: #fff0f6;
    color: #c0256e;
    border: 1px solid #ffadd2;
}

.abv2-poster-app .rec-med {
    background-color: #fff7e6;
    color: #d46b08;
    border: 1px solid #ffe7ba;
}

.abv2-poster-app .rec-low {
    background-color: #e6f7ff;
    color: #096dd9;
    border: 1px solid #91d5ff;
}

.abv2-poster-app .rec-danger {
    background-color: #2a2a2a;
    color: #ffeb3b;
    border: 1px solid #444;
}

.abv2-poster-app .qr-wrapper {
    width: 110px;
    text-align: center;
    margin-left: 15px;
    flex-shrink: 0;
}

.abv2-poster-app .qr-img {
    width: 110px;
    height: 110px;
    object-fit: contain;
}

.abv2-poster-app .qr-text {
    font-size: 0.75rem;
    color: #999;
    margin-top: 5px;
    line-height: 1.3;
}

.abv2-poster-app .section-title {
    font-size: 1.15rem;
    font-weight: bold;
    color: #333;
    margin: 20px 0 10px 0;
    padding-left: 12px;
    border-left: 5px solid #4CAF50;
    display: flex;
    align-items: center;
    line-height: 1.2;
}

.abv2-poster-app .decision-box {
    background-color: #f1f8e9;
    border-left: 6px solid #8bc34a;
    padding: 18px;
    margin: 15px 0;
    border-radius: 0 6px 6px 0;
}

.abv2-poster-app .possibility-list {
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.6);
    padding: 10px;
    border-radius: 6px;
    border: 1px dashed #c5e1a5;
}

.abv2-poster-app .possibility-item {
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 4px;
    padding-left: 5px;
}

.abv2-poster-app .core-rec-container {
    margin-top: 15px;
    text-align: center;
}

.abv2-poster-app .core-rec {
    display: inline-block;
    font-weight: bold;
    color: #d32f2f;
    font-size: 1.2rem;
    padding: 10px 25px;
    border: 2px dashed #d32f2f;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.1);
}

.abv2-poster-app .pred-container {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 5px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.abv2-poster-app .pred-row-inline {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.abv2-poster-app .pred-row-inline:last-child {
    border-bottom: none;
}

.abv2-poster-app .pred-label {
    font-weight: bold;
    color: #444;
    width: 90px;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.abv2-poster-app .pred-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.abv2-poster-app .pred-badge-item {
    background-color: #f0f0f0;
    color: #333;
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e0e0e0;
}

.abv2-poster-app .pred-badge-item:first-child {
    background-color: #333;
    color: #fff;
    border-color: #333;
    font-weight: bold;
}

.abv2-poster-app .alert-box {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 1rem;
    display: flex;
    align-items: flex-start;
}

.abv2-poster-app .alert-icon {
    font-size: 1.4rem;
    margin-right: 12px;
    line-height: 1;
}

.abv2-poster-app .poster-footer {
    margin-top: auto;
    text-align: center;
    padding-top: 40px;
}

.abv2-poster-app .footer-marker {
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
    padding-top: 25px;
    font-style: italic;
    margin-bottom: 20px;
}

.abv2-poster-app .footer-qr-container img {
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
}

/* Premium & Subscription Styles */
.premium-overlay {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
    filter: grayscale(1);
    user-select: none;
}

.premium-notice {
    background: #fff9c4;
    border: 1px solid #fbc02d;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.premium-notice p {
    margin: 0 0 10px 0;
    color: #856404;
    font-weight: 600;
}

.buy-premium-btn {
    background: #ff9800;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.3);
    border: none;
    cursor: pointer;
    width: 100%;
}

.buy-premium-btn:hover {
    background: #f57c00;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-top: 10px;
    background: #f5f5f5;
}

.poster-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 5rem;
    color: rgba(0, 0, 0, 0.03);
    font-weight: 800;
    pointer-events: none;
}

/* 🛡️ 会员中心响应式菜单修复 */
.yith-wcmap .yith-wcmap-content .yith-wcmap-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: center !important;
}

.yith-wcmap .yith-wcmap-content .yith-wcmap-list li {
    flex: 0 1 auto !important;
    margin: 0 !important;
    width: auto !important;
}

@media (max-width: 480px) {
    .yith-wcmap .yith-wcmap-content .yith-wcmap-list li a {
        padding: 5px 10px !important;
        font-size: 12px !important;
    }
}