/*
Theme Name: Sea AI
Theme URI: https://example.com/sea-ai
Author: Sea AI Team
Author URI: https://example.com
Description: A WordPress theme for AI image generation, integrating RunningHub API. Features include image retouching and hairstyle transfer.
Version: 1.0.212
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sea-ai
Tags: ai, image-generation, runninghub, custom-theme
*/

:root {
    --primary-color: #000000;
    --secondary-color: #333333;
    --accent-color: #ff90e9; /* Orange accent from screenshot */
    --bg-color: #ffffff;
    --panel-bg: #ffffff;
    --text-main: #1f1f1f;
    --text-light: #888888;
    --border-color: #eeeeee;
    --bg-light: #fef18b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header.site-header,
footer {
    display: flex;
    justify-content: center;
    background: #ffffff;
    color: var(--text-main); 
    height: 72px;
    box-shadow: none; 
    border-bottom: 1px solid var(--border-color);
}

.header-container,
.footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    max-width: 2800px;
    padding-left: 40px;
    padding-right: 40px;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo-icon {
    font-size: 1.6rem;
    color: var(--accent-color);
    background: #ffecd9; /* Light orange circle bg */
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.logo-image {
    height: 26px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: #000;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-upgrade {
    background: #000;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-upgrade:hover {
    opacity: 0.8;
}

.user-profile {
    position: relative;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.login-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
}

/* Main Content */
.site-main {
    flex: 1;
    width: 100%; 
    max-width: 2800px;
    margin: 0 auto;
    padding: 0px 40px;
}

/* Workspace Grid */
.workspace {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: start;
}

/* Panels */
.panel {
    height: 100%;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

/* Left Panel */
.left-panel {
    display: block;
    gap: 20px; 
}

.options-area {
    margin-top: 46px;  
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.option-item {
    display: flex;
    flex-direction: column; 
}

.option-item input[type="number"],
.option-item input[type="text"],
.option-item .seaai-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.option-item input[type="number"]:focus,
.option-item input[type="text"]:focus,
.option-item .seaai-select:focus  {
    outline: none;
    border-color: var(--accent-color);
}

.option-item input[type="color"] {
    width: 40px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.option-item textarea,
.seaai-textarea,
.seaai-zutu-prompt-textarea {
    width: 100%;
    min-height: 150px;
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    background-color: #fafafa;
    color: var(--text-light);
}

.option-item textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.seaai-select, .seaai-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-main);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.upload-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 14px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Image Upload Box */
.image-box {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background-color: #fafafa;
    transition: all 0.2s ease;
}

.image-box:hover {
    border-color: #bbb;
    background-color: #f5f5f5;
}

.image-box.drag-over {
    border-color: var(--accent-color);
    background-color: #fff8f0;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-box .placeholder-content {
    text-align: center;
    color: #999;
}

.image-box .icon-plus {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
    color: #ccc;
}

/* Uploading State */
.image-box.uploading::after {
    content: "上传中...";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: var(--accent-color);
    z-index: 10;
}

/* Lightbox Close Button */
.lightbox-close,
.seaai-lightbox-close {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 26px;
    height: 26px;
    padding-bottom: 3px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    color:#000;
    background: #fff;
    border-radius: 5px;
}

.admin-bar .seaai-lightbox-close,
.admin-bar .lightbox-close{
    top:40px;
}

.seaai-lightbox-close > svg {
    width: 12px;
    height: 12px;
    margin-top: 3px;
}

/* Settings Area */
.settings-area {
    margin-top: auto;
    background: #f9f9f9;
    padding: 16px;
    border-radius: 12px;
}

.setting-item {
    margin-bottom: 12px;
}

.setting-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 6px;
}

.setting-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 0.9rem;
}

/* Action Button */
.action-area {
    margin-top: 50px;
}

.btn-generate {
    width: 100%;
    padding: 14px; 
    color: #fff;
    border: none; 
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px; 
}

.btn-generate:hover {
    transform: scale(1.02); 
}

.btn-generate:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.seaai-points-cost {
    margin-left: 10px;
    font-weight: 400;
    font-size: 0.85rem;
    opacity: 0.9; 
}

/* Right Panel Content */
.right-panel {
    position: relative;
    background-color: #fff;
}

.result-container,.seaai-zutu-history-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;  
    min-height: 400px;
    position: relative;
    overflow: hidden;
    margin: 0 0 0 40px;
}

.result-header {
    justify-content: space-between; 
    align-items: center; 
    margin-top: 80px;
    order:2;
}

.result-more-btn {
    text-decoration: none; 
    color: var(--text-link); 
    font-size: 14px;
}

.result-placeholder {
    text-align: center;
    color: #ccc;
}

.result-container img#result-img {
  display: none;
}

.result-container img.show {
    display: block;
}

.result-grid,
.seaai-result-grid,
.seaai-zutu-result-grid {
    display:grid;
    width: 100%;
    min-height: 250px; 
    gap: 20px;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 900px) {
    .mobile-menu-panel {
        display: none;
    }
}

@media (min-width: 1200px) {
  .result-grid,
  .seaai-result-grid,
  .seaai-zutu-result-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1600px) {
  .result-grid,
  .seaai-result-grid,
  .seaai-zutu-result-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
  }
}

@media (min-width: 2200px) {
  .result-grid,
  .seaai-result-grid,
  .seaai-zutu-result-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
  }
}

.result-item,
.seaai-zutu-result-item {
    position:relative;
    border-radius: 18px;
}

.result-image,
.seaai-zutu-result-item img {
    width:100%;
    border-radius:18px;
    display:block;
    max-width: 100%; 
    object-fit: contain;
    box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.06);
    cursor: pointer;
}

.result-item-video {
    aspect-ratio: 3 / 4;
    cursor: pointer;
}

.result-item-video .result-image {
    cursor: pointer;
}

.result-item-video .result-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 18px;
    object-fit: cover; 
    transition: opacity 0.2s;
}

.result-item-video:hover .result-video {
    opacity: 1;
}

.result-item-video:hover .result-image {
    opacity: 0;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 18px;
    opacity: 0;
    transition: opacity 0.2s;
}

.result-item-video:hover .video-play-overlay {
    opacity: 1;
}

.video-play-overlay svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

#studio-lightbox-video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
}

.result-img-container {
    display: block;
    width: 30%; 
    min-width: 300px;
    aspect-ratio:1.75;
    border: 2px dotted #ccc;
    border-radius: 18px;
}

#result-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.result-prompt-text {
    width: 100%;
    height: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px dotted #ccc;
    border-radius: 18px;
}

.result-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.progress-bar-container {
    width: 200px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 16px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffa3fd, #d369d7);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 8px;
}

.result-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* Result Download Icon */
.result-download-icon,
.seaai-download-small-btn,
.seaai-download-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    padding: 10px 13px; 
    border-radius: 5px;
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 10;
} 

.result-download-icon,
.seaai-download-small-btn, 
.seaai-download-btn {
    display: block; 
    font-size: 0;
    border: 0;
    cursor: pointer;
    padding: 0;
    color: var(--primary-color);
}

.result-download-icon,.seaai-download-small-btn {
    display: none;
    padding: 5px;
    background-color: var(--bg-color);
}

.result-download-icon:hover > svg,
.seaai-download-small-btn:hover svg {
    color: var(--accent-color);
}

.seaai-delete-history-btn:hover svg,
.result-delete-icon:hover {
    color: red;
}

.result-container>div>div:hover .result-download-icon,
.seaai-result-item:hover .seaai-download-small-btn {
    display: flex;
}

.result-delete-icon,
.seaai-delete-history-btn {
    position: absolute;
    top: 10px;
    right: 50px;
    width: 36px;
    height: 36px;
    padding: 5px;
    background-color: var(--bg-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center; 
    z-index: 10;
}

.seaai-result-item:hover .seaai-delete-history-btn,
.result-container>div>div:hover .result-delete-icon {
    display: flex;
}

/* Download Button - keep for backwards compatibility */
.btn-download {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: none;
    text-decoration: none;
    font-weight: 600;
    margin-top: 12px;
    text-align: center;
}

.btn-download:hover {
    background: #f5f5f5;
}

/* Loader */
.loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

.hamburger-btn {
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 900px) {
    body.menu-open {
        overflow: hidden;
    }

    .site-header,footer {
        padding: 12px 0;
    }

    .site-title a {
        font-size: 20px;
    }

    .header-user-menu {
        right: 0;
    }
    
    .nav-links,.header-actions {
        display: none;
    }

    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 8px;
        z-index: 1001;
    }

    .hamburger-btn span {
        display: block;
        width: 24px;
        height: 2px;
        background: #333;
        margin: 3px 0;
        transition: all 0.3s ease;
    }

    .hamburger-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .header-actions .user-profile .login-link {
        display: none;
    }

    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
    }

    .mobile-menu-overlay.active {
        display: block;
    }

    .mobile-menu-panel {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: #fff;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 9999;
        transition: right 0.3s ease;
        overflow-y: auto;
    }

    .mobile-menu-panel.active {
        right: 0;
    }

    .mobile-menu-close {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        background: transparent;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #333;
    }

    .mobile-menu-nav {
        padding: 60px 20px 20px;
    }

    .mobile-nav-links {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-nav-links li {
        border-bottom: 1px solid #eee;
    }

    .mobile-nav-links li a {
        display: block;
        padding: 14px 0;
        color: #333;
        text-decoration: none;
        font-size: 16px;
    }

    .mobile-nav-links li a:hover {
        color: #667eea;
    }

    .mobile-menu-user {
        padding: 20px;
        border-top: 1px solid #eee;
    }

    .mobile-user-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
    }

    .mobile-username {
        font-weight: 600;
        font-size: 16px;
    }

    .mobile-points {
        color: #667eea;
        font-weight: 500;
    }

    .mobile-menu-item {
        display: block;
        padding: 12px 0;
        color: #333;
        text-decoration: none;
        font-size: 15px;
        border-bottom: 1px solid #f5f5f5;
    }

    .mobile-menu-item:last-child {
        border-bottom: none;
    }

    .mobile-menu-item:hover {
        color: #667eea;
    }

    .workspace {
        grid-template-columns: 1fr;
    }
    .panel {
        min-height: auto;
    }
    .image-box {
        height: 240px;
    }
    
    .site-main,
    .header-container, 
    .footer-container {
        padding-left: 20px;
        padding-right: 20px;
    }
    .sea-apps-gallery-container {
        margin: 20px auto;
    }
}

@media (max-width: 480px) {
    .sea-apps-gallery-grid { 
        grid-template-columns: repeat(auto-fill, minmax(150px, 2fr));
    }
}



/* --- Pricing Page Styles --- */

.pricing-page {
    padding-top: 40px;
    padding-bottom: 60px; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* User Points Display */
.user-points-display {
    margin-bottom: 30px;
}

.points-badge {
    background: #fff;
    padding: 10px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}

.points-badge .coin-icon {
    font-size: 1.5rem;
    background: #fff8e1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffc107;
}

.points-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.points-info .label {
    font-size: 0.75rem;
    color: #999;
    font-weight: 500;
}

.points-info .value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #333;
}

/* Tabs */
.pricing-tabs-container {
    background: #fff;
    padding: 6px;
    border-radius: 12px;
    margin-bottom: 80px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.pricing-tabs {
    display: flex;
    gap: 4px;
}

.pricing-tab {
    padding: 10px 24px;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.pricing-tab.active {
    background: #fff;
    color: #000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.pricing-tab.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.payment-icons {
    font-size: 1.1rem;
    margin-left: 4px;
}

/* Packages Grid */
.packages-grid {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1200px;
}

.package-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    width: 280px;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid #eee;
    transition: transform 0.2s, box-shadow 0.2s;
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* Popular Card Style */
.package-card.popular {
    border: 2px solid #000;
    transform: scale(1.05);
    z-index: 1;
}

.package-card.popular:hover {
    transform: scale(1.05) translateY(-5px);
}

.popular-tag {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}

/* Card Content */
.pkg-header {
    margin-bottom: 24px;
}

.pkg-points {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.pkg-points .icon {
    color: #999;
    font-size: 1.2rem;
}

.pkg-points .coin-icon {
    width: 24px;
    height: 24px;
}

.pkg-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #000;
    line-height: 1;
}

.pkg-price .currency {
    font-size: 1.5rem;
    vertical-align: top;
    margin-right: 2px;
}

/* Features List */
.pkg-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    flex: 1;
}

.pkg-features li {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.pkg-features .check {
    color: #ccc;
    font-weight: bold;
}

.pkg-features strong {
    color: #000;
}

/* Button */
.btn-select {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
}

.btn-select:hover {
    background: #f9f9f9;
    border-color: #ccc;
}

.package-card.popular .btn-select {
    background: #000;
    color: #fff;
    border: 1px solid #000;
}

.package-card.popular .btn-select:hover {
    background: #333;
    border-color: #333;
}

/* Responsive Overrides for Pricing Page */
@media (max-width: 900px) {
    .packages-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .package-card {
        width: 100%;
        max-width: 340px;
    }
}

/* History Page */
.history-page {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.history-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 24px;
    justify-content: space-between;
}

.history-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
}

.history-header .text-muted {
    color: #666;
    font-size: 0.9rem;
    width: 100%;
}

.history-header-actions {
    display: flex;
    margin-left: auto;
    flex-direction: column;
    align-items: flex-end;
}

.btn-download-all-zip {
    display: flex;
    margin-bottom: 8px;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-download-all-zip:hover {
    background: #333;
}

.btn-download-all-zip:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-download-all-zip .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.history-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.history-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.history-item:hover img {
    transform: scale(1.05);
}

.history-item-video .history-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: opacity 0.2s;
    border-radius: inherit;
}

.history-item-video:hover .history-video {
    opacity: 1;
}

.history-item-video:hover img.history-image {
    opacity: 0;
}

.history-video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
}

.history-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.history-item:hover .history-overlay {
    opacity: 1;
}

.history-info {
    display: none;
    text-align: center;
    color: #fff;
    margin-bottom: 12px;
}

.history-date {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
}

.history-expire {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 4px;
}

.history-item.expired .history-overlay {
    background: rgba(0, 0, 0, 0.8);
}

.download-icon-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: #000;
    border-radius: 5px;
    display: none;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 10;
}

.download-icon-btn img {
    width: 11px;
    height: 16px;
}

.history-item:hover .download-icon-btn {
    display: flex;
}

.history-image {
    cursor: pointer;
}

.history-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 9999;
}

.history-lightbox.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

#lightbox-video {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
}

.lightbox-close { 
    top:10px;
    right: 10px;
    width: 29px;
    height: 29px;
    padding-bottom: 3px;
}

.lightbox-nav,
.seaai-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    padding: 30px;
    transition: background 0.2s;
}

.lightbox-nav:hover,
.seaai-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev, 
.seaai-lightbox-prev {
    left: 0px;
}

.lightbox-next, 
.seaai-lightbox-next {
    right: 0px;
}

.lightbox-actions {
    display: none!important;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.lightbox-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.lightbox-btn:hover {
    background: #5568d3;
}

.lightbox-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

.lightbox-complete-toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #10b981;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    animation: toastPop 0.3s ease-out;
    z-index: 20;
}

@keyframes toastPop {
    from {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

 /* Profile Page */
 .table-date {
    width: 145px;
 }
 .table-type,
 .table-change,
 .table-balance {
    width: 80px;
 }

/* User Dropdown Menu Styles */
.user-profile {
    position: relative;
    display: flex;
    align-items: center;
}

.user-avatar-wrapper {
    cursor: pointer;
    transition: opacity 0.2s;
}

.user-avatar-wrapper:hover {
    opacity: 0.8;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    border-bottom: none;
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
}

.dropdown-username {
    font-weight: 600;
    font-size: 1rem;
    color: #1f1f1f;
}

.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #1f1f1f;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.15s;
}

.dropdown-item:hover {
    background-color: #f8f8f8;
}

.dropdown-item.points-item {
    cursor: default;
}

.points-icon {
    font-size: 1.1rem;
}

.points-label {
    flex: 1;
    font-weight: 500;
}

.points-value {
    font-weight: 700;
    font-size: 1.05rem;
    color: #ff9f43;
}

.dropdown-item.logout-item {
    color: #e74c3c;
}

.dropdown-item.logout-item:hover {
    background-color: #fef5f5;
}

/* Login Modal Styles */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
}

.login-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.login-modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.login-modal-overlay.visible .login-modal {
    transform: translateY(0);
}

.login-form-error {
    display: none;
    color: #dc3545;
    padding: 10px;
    background: #f8d7da;
    border-radius: 6px;
    margin-bottom: 15px;
}

.login-form-error a {
    color: #333; 
}

.login .button.wp-hide-pw {
    top: 13px;
}

.language-switcher {
    display: none;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #888;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.login-modal-close:hover { 
    color:var(--accent-color);
}

.login-modal-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f1f1f;
    margin-bottom: 24px;
}

.login-form-error {
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: #000;
}

.form-group-remember {
    margin-bottom: 24px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
}

.remember-label input[type="checkbox"] {
    width: 18px;
}

.form-group-privacy {
    margin-bottom: 20px;
}

.privacy-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
    font-size: 14px;
}

.privacy-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.privacy-label a {
    color: #667eea;
    text-decoration: none;
}

.privacy-label a:hover {
    text-decoration: underline;
    height: 18px;
    cursor: pointer;
    margin-top: 4px;
}

.btn-login-modal {
    width: 100%;
    padding: 14px; 
    color: #fff;
    border: none; 
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-login-modal:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.login-modal-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 0.9rem;
}

.login-modal-links a {
    color: #000;
    text-decoration: none;
    font-weight: 500;
}

.login-modal-links a:hover {
    text-decoration: underline;
}

.login-modal-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
}

.login-modal-loading .loader {
    display: block;
    width: 32px;
    height: 32px;
    border-width: 3px;
    margin-bottom: 12px;
}
/* ================================================
   Footer Styles
   ================================================ */
.site-footer { 
    margin-top: 45px;
    border-top: 1px solid var(--border-color);
    border-bottom: none;
    font-size: 12px; 
}
.site-footer a {
    color: var(--text-muted);
}
.site-footer a:hover {
    color: var(--accent-color);
}

/* Payment Modal Styles */
.payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.payment-modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.payment-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #888;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.payment-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.payment-modal-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f1f1f;
    margin-bottom: 24px;
}

.payment-loading {
    text-align: center;
    color: #666;
    padding: 40px 0;
}

.payment-error {
    text-align: center;
    color: #c33;
    padding: 40px 0;
}

/* Checkout Page Styles */
.checkout-page {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

.checkout-column {
    width: 100%;
}

.checkout-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.checkout-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f1f1f;
    margin-bottom: 24px;
}

.package-summary {
    margin-bottom: 24px;
}

.package-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.package-icon {
    font-size: 2.5rem;
}

.package-info {
    flex: 1;
}

.package-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f1f1f;
    margin: 0 0 4px 0;
}

.package-points {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

.package-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 20px 0;
}

.package-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.package-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: #333;
    font-size: 0.95rem;
}

.package-features .check {
    color: #27ae60;
    font-size: 1.1rem;
}

.current-points-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.current-points-info .label {
    font-weight: 500;
    color: #666;
}

.current-points-info .value {
    font-weight: 700;
    font-size: 1.2rem;
    color: #ff9f43;
}

.payment-summary {
    margin-bottom: 32px;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 1rem;
}

.payment-row .label {
    color: #666;
}

.payment-row .value {
    font-weight: 600;
    color: #1f1f1f;
}

.payment-row .discount {
    color: #27ae60;
}

.payment-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 12px 0;
}

.payment-row.total {
    padding-top: 16px; 
}

.payment-row.total .label {
    font-size: 1.1rem;
    font-weight: 600;
}

.payment-row.total .total-amount {
    font-size: 1.5rem;
    color: #e74c3c;
}

.payment-method-section {
    margin-bottom: 32px;
}

.payment-method-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f1f1f;
    margin-bottom: 16px;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-method-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-method-option:hover {
    border-color: #000;
}

.payment-method-option.selected {
    border-color: #000;
    background: #fafafa;
}

.payment-method-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.payment-method-icon {
    display: none;
    font-size: 1.5rem;
}

.payment-method-name {
    flex: 1;
    font-weight: 500;
    color: #1f1f1f;
}

.btn-pay {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.order-info-section {
    margin-top: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.order-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.order-info-item:last-child {
    border-bottom: none;
}

.order-info-label {
    font-weight: 500;
    color: #666;
}

.order-info-value {
    font-weight: 600;
    color: #1f1f1f;
}

.payment-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #666;
}

.notice-icon {
    font-size: 1.1rem;
}



/* article */

.entry-content {
    font-size: 1rem;
    line-height: 1.6;
}

h1.entry-title {
    font-size: 3rem;
    line-height: 1.3;
    margin-bottom: 24px;
    padding: 40px 0;
}

h2.wp-block-heading {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 24px; 
}

h3.wp-block-heading {
    font-size: 1.4rem;
    line-height: 1.3;
    margin-bottom: 24px; 
}

h4.wp-block-heading {
    font-size: 1.2rem;
    line-height: 1.3;
    margin-bottom: 24px; 
}

.entry-content p {
    margin-bottom: 24px;
}

ul.wp-block-list {
    padding-left: 40px;
    margin-bottom: 24px;
}

.wp-block-separator {
    margin: 40px 0;
}

.sinle-app-tit-section { 
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.sinle-app-tit-section {
    flex-direction: column;
}

.seaai-panel-header h1, 
.single-app-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.seaai-panel-desc, 
.single-app-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.single-app-desc {
    display: flex;
    justify-content: space-between;
}

.single-app-tutorial {
    margin-bottom: 8px;
}

.single-app-tutorial a {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    border: 1px solid #ffe100;
    background-color: #fff240;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.single-app-tutorial a:hover { 
    background-color: #fff;
}

/* Pagination */

.seaai-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.seaai-pagination-btn {
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.seaai-pagination-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.seaai-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.seaai-pagination-numbers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.seaai-pagination-number {
    min-width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.seaai-pagination-number:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.seaai-pagination-number.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.seaai-pagination-number.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.seaai-pagination-ellipsis {
    min-width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
}

.seaai-pagination-info {
    display: none!important;
    font-size: 0.9rem;
    color: var(--text-light);
    width: 100%;
    text-align: center;
    margin-bottom: 8px;
}

/* Button */ 
.btn-generate,
.seaai-generate-btn,
.btn-login-modal,
.seaai-zutu-btn-generate {
    width: 100%;
    padding: 14px 24px;
    margin-top: 10px;
    color: #fff;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    background-color: var(--primary-color);
    border-radius: 50px;
    box-shadow: 0 4px 15px rgb(166 166 166 / 30%);
    transition: all 0.3s ease;
}

.btn-login-modal:not(:disabled):hover,
.btn-generate:hover:not([disabled]),
.seaai-generate-btn:not([disabled]):hover,
.seaai-preview-item .seaai-remove-btn:not([disabled]):hover,
.lightbox-close:hover:not([disabled]):hover,
.seaai-zutu-btn-generate:not([disabled]):hover { 
    background-color: var(--accent-color)!important;
    color: var(--primary-color)!important;
    transform: translateY(-2px) !important;
}

/* SeaAI Upload Component Styles - Shared between sea-app and e-commerce */

.seaai-upload-section {
    margin-bottom: 20px;
}

.seaai-upload-title,
.option-item label,
.seaai-zutu-upload-tit, 
.seaai-zutu-left-panel label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.option-des {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: -10px 0 12px;
}

.seaai-upload-container,
.seaai-zutu-upload-container {
    width: 100%;
    margin-bottom: 40px;
}

.seaai-upload-dropzone,
.seaai-zutu-upload-dropzone {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 150px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
    transition: all 0.2s ease;
    color: var(--text-light);
}

.seaai-upload-dropzone:hover,
.seaai-zutu-upload-dropzone:hover {
    border-color: var(--primary-color);
}

.seaai-upload-dropzone.drag-over {
    border-color: var(--accent-color);
    background: #fff8f0;
    border-style: solid;
}

.seaai-upload-ico-wrap,
.seaai-zutu-upload-ico-wrap {
    display: flex;
    position: absolute;
    height: 100%;
    width: 100%;
    flex-direction: column;
    justify-content: center;
}

.seaai-upload-ico-wrap.hidden {
    display: none;
}

.icon-plus {
    font-size: 23px;
    margin-top: -5px;
}

.seaai-upload-text,
.seaai-zutu-upload-text {
    font-size: 1rem;
    margin: 0 0 4px 0;
    font-weight: 500;
}

.seaai-upload-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

.seaai-upload-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

.seaai-file-input {
    display: none;
}

.seaai-upload-preview-grid,
.seaai-zutu-upload-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 12px;
}

.seaai-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    border: 1px solid #eee;
}

.seaai-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.seaai-preview-item .seaai-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1px;
    padding: 10px 0 11px;
    transition: background 0.2s ease;
}

.seaai-preview-item .seaai-remove-btn:hover {
    background: var(--accent-color);
    color: var(--text-main);
}

.seaai-history-item-current,
.result-prompt-text {
    min-height: 280px;
}

/* Notification Bar */
.seaai-notification-bar {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 50px 12px 20px;
    font-size: 14px;
    z-index: 99998;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
}
.seaai-notification-bar.show {
    display: block;
}
.seaai-notification-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: inline-block;
    text-align: left;
}
.seaai-notification-bar-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
}
.seaai-notification-bar-close:hover {
    background: rgba(255,255,255,0.3);
}
@media (max-width: 768px) {
    .seaai-notification-bar {
        padding: 10px 40px 10px 15px;
        font-size: 13px;
    }
}
@media (max-width: 1300px) {
    .workspace { 
        grid-template-columns: 280px 1fr;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .logo-image {
        height: 15px;
    }
    .workspace,
    div.seaai-workspace-inner {
        grid-template-columns: 1fr;
    } 

    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .checkout-right {
        order: -1;
    }

    .left-panel { 
        margin-bottom: 60px;
    }

    .result-container {
        margin: 0;
    }

    .result-img-container {
        width: 100%;
    }

    
} 

@media (max-width: 768px) {
    .seaai-upload-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media only screen and (max-width: 899px) and (orientation: landscape) {
    .seaai-history-list > .seaai-history-item-current {
        width: 100%;
        aspect-ratio: 2 / 1;
    }
}

/* =============================================
   Stripe Subscription Styles
   ============================================= */

/* --- Billing Toggle --- */
.billing-toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 24px 0 32px;
}

.billing-label {
    font-size: 15px;
    font-weight: 500;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.billing-label.active {
    color: #1f1f1f;
    font-weight: 700;
}

.billing-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

.billing-toggle input {
    display: none;
}

.billing-toggle-slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #e5e5e5;
    border-radius: 28px;
    transition: background 0.3s;
}

.billing-toggle-slider::before {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 22px; height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.billing-toggle input:checked + .billing-toggle-slider {
    background: var(--accent-color, #ff90e9);
}

.billing-toggle input:checked + .billing-toggle-slider::before {
    transform: translateX(24px);
}

.billing-save-badge {
    display: none;
    font-size: 12px;
    font-weight: 600;
    background: #fef2f2;
    color: #ef4444;
    padding: 2px 8px;
    border-radius: 10px;
}

/* --- Subscription Pricing Page --- */
.subscription-pricing-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.subscription-pricing-page .pricing-tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

.subscription-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 0;
}

.subscription-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.subscription-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.subscription-card.popular {
    border-color: var(--accent-color, #ff90e9);
}

.subscription-card .popular-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color, #ff90e9);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 12px;
}

.sub-pkg-header {
    margin-bottom: 16px;
}

.sub-pkg-name {
    font-size: 18px;
    font-weight: 700;
    color: #1f1f1f;
    margin-bottom: 8px;
}

.sub-pkg-points {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.sub-pkg-points .coin-icon img {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.sub-pkg-price {
    font-size: 32px;
    font-weight: 800;
    color: #1f1f1f;
}

.sub-pkg-price .price-period {
    font-size: 14px;
    font-weight: 400;
    color: #999;
}

.sub-pkg-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.sub-pkg-features li {
    padding: 6px 0;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sub-pkg-features .check {
    color: var(--accent-color, #ff90e9);
    font-weight: 700;
    font-size: 16px;
}

.btn-subscribe {
    display: block;
    width: 100%;
    padding: 12px 0;
    background: var(--accent-color, #ff90e9);
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: opacity 0.3s, transform 0.2s;
}

.btn-subscribe:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Current Plan button */
.btn-current-plan {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Downgrade button */
.btn-downgrade {
    background: #6b7280 !important;
}
.btn-downgrade:hover {
    opacity: 0.85;
}

/* Upgrade button */
.btn-upgrade {
    background: #3b82f6 !important;
}
.btn-upgrade:hover {
    opacity: 0.9;
}

/* Switch notice on pricing page */
.sub-switch-notice {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    margin-top: 20px;
    padding: 10px 20px;
    background: #f9fafb;
    border-radius: 8px;
}

/* Switch notice on checkout page */
.switch-notice {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #9a3412;
    margin-bottom: 20px;
}

/* Switch plan button */
.btn-switch-plan {
    background: #f59e0b !important;
}
.btn-switch-plan:hover {
    background: #d97706 !important;
}

/* --- Subscription Checkout --- */
.subscription-checkout-page {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.subscription-checkout-page .sub-interval-tag {
    display: inline-block;
    background: #eff6ff;
    color: #3b82f6;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    margin-left: 8px;
}

.btn-pay-subscription {
    display: block;
    width: 100%;
    padding: 14px 0;
    background: #635bff;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 16px;
}

.btn-pay-subscription:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.btn-pay-subscription:disabled {
    background: #a5b4fc;
    cursor: not-allowed;
    transform: none;
}

.subscription-notice {
    margin-top: 16px;
    font-size: 13px;
    color: #999;
    text-align: center;
}

/* --- Profile Subscription Card --- */
.subscription-status-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 25px;
}

.subscription-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.sub-info-item {
    background: var(--bg-color, #f8f8f8);
    padding: 15px;
    border-radius: 12px;
}

.sub-info-label {
    font-size: 13px;
    color: var(--text-muted, #888);
    display: block;
    margin-bottom: 5px;
}

.sub-info-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main, #1f1f1f);
}

.subscription-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.subscription-badge.active {
    background: #f0fdf4;
    color: #16a34a;
}

.subscription-badge.pending {
    background: #fffbeb;
    color: #d97706;
}

.subscription-actions {
    margin-top: 16px;
}

.btn-cancel-subscription {
    background: none;
    border: 1px solid #fecaca;
    color: #ef4444;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-cancel-subscription:hover {
    background: #fef2f2;
}

.btn-cancel-subscription:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cancel-hint {
    margin-top: 8px;
    font-size: 13px;
    color: #999;
}

.cancel-notice {
    font-size: 14px;
    color: #d97706;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 0;
    line-height: 1.5;
}

.subscription-invoices {
    margin-top: 24px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.subscription-empty {
    text-align: center;
    padding: 10px 0;
    color: var(--text-muted, #888);
}