/* ============================================
   KissAsian Main Styles - v3.0.0
   Unified Content
   ============================================ */

/* ===== CSS VARIABLES ===== */
:root {
    --bg-body: #0d0f14;
    --bg-dark: #13161c;
    --bg-card: #181c25;
    --bg-accent: #2b82ca;
    --border-color: #232936;
    --text-primary: #b1b5c0;
    --text-secondary: #8a8f9a;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --bg-hover: rgba(55, 65, 81, 0.3);
    
    --theme-primary: #0ea5e9;
    --theme-secondary: #3b82f6;
    --theme-accent: #f59e0b;
    --theme-header-bg: #0a0e17;
    --theme-footer-bg: #0a0e17;
    --theme-card-bg: #181c25;
    --theme-body-bg: #0d0f14;
    --theme-text-primary: #b1b5c0;
    --theme-text-secondary: #8a8f9a;
    --theme-border: #232936;
}

/* ===== LIGHT THEME ===== */
.light-theme {
    --bg-body: #f0f2f5;
    --bg-dark: #ffffff;
    --bg-card: #ffffff;
    --bg-accent: #2563eb;
    --border-color: #e2e8f0;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --bg-hover: rgba(0, 0, 0, 0.05);
}

/* ===== BODY ===== */
body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== BACKGROUND CLASSES ===== */
.bg-custom-body { background-color: var(--bg-body); transition: background-color 0.3s ease; }
.bg-custom-dark { background-color: var(--bg-dark); transition: background-color 0.3s ease; }
.bg-custom-card { background-color: var(--bg-card); transition: background-color 0.3s ease; }
.bg-custom-hover { background-color: var(--bg-hover); transition: background-color 0.3s ease; }
.border-custom { border-color: var(--border-color); transition: border-color 0.3s ease; }

/* ===== TEXT COLORS ===== */
.theme-text { color: var(--text-primary); transition: color 0.3s ease; }
.theme-text-muted { color: var(--text-secondary); transition: color 0.3s ease; }

/* ===== THEME-SPECIFIC CLASSES ===== */
.bg-theme-primary { background-color: var(--theme-primary); }
.text-theme-primary { color: var(--theme-primary); }
.border-theme-primary { border-color: var(--theme-primary); }

.bg-theme-header { background-color: var(--theme-header-bg); }
.bg-theme-footer { background-color: var(--theme-footer-bg); }
.bg-theme-card { background-color: var(--theme-card-bg); }
.bg-theme-body { background-color: var(--theme-body-bg); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--theme-primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--theme-secondary); }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.3s ease-out; }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}

/* ===== LINE CLAMP ===== */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== DRAMA CARDS ===== */
.drama-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.drama-card:hover {
    box-shadow: 0 4px 20px var(--shadow-color);
    transform: translateY(-4px);
}

/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 8px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}
@media (min-width: 640px) { .status-badge { font-size: 9px; padding: 2px 10px; } }
@media (min-width: 768px) { .status-badge { font-size: 10px; padding: 3px 12px; } }

.status-ongoing {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}
.status-ongoing .dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: #34d399;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}
.status-completed {
    background: rgba(59, 130, 246, 0.15);
    color: var(--theme-primary);
    border-color: rgba(59, 130, 246, 0.3);
}
.status-upcoming {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

/* ===== FILTER BUTTONS ===== */
.filter-btn {
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
}
.filter-btn:hover {
    background: var(--bg-dark);
    color: var(--text-primary);
}
.filter-btn.active {
    background: var(--theme-accent);
    color: white;
}

/* ===== EPISODE BUTTONS ===== */
.episode-btn {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 4px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.episode-btn:hover {
    border-color: var(--theme-primary);
}
.episode-btn.active {
    border-color: var(--theme-primary);
    background: rgba(14, 165, 233, 0.15);
}
.episode-btn .ep-number {
    font-weight: bold;
    color: var(--text-primary);
}
.episode-btn .ep-cc {
    font-size: 7px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* ===== PAGINATION ===== */
.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.pagination-btn:hover {
    border-color: var(--theme-primary);
    color: var(--text-primary);
    background: var(--bg-hover);
}
.pagination-btn.active {
    background: var(--theme-primary) !important;
    color: white !important;
    border-color: var(--theme-primary) !important;
}
@media (max-width: 640px) {
    .pagination-btn { min-width: 28px; height: 28px; padding: 0 8px; font-size: 11px; }
}

/* ===== SHARE BUTTONS ===== */
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.share-btn.facebook { background: #1877f2; color: white; }
.share-btn.twitter { background: #000000; color: white; border: 1px solid #333; }
.share-btn.copy { background: var(--bg-dark); color: var(--text-primary); border: 1px solid var(--border-color); }

/* ===== NOTIFICATION ===== */
.notification-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px var(--shadow-color);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    z-index: 9999;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
}
.notification-toast.success { border-color: #34d399; background: rgba(16, 185, 129, 0.1); }
.notification-toast.error { border-color: #f87171; background: rgba(248, 113, 113, 0.1); }
.notification-toast.info { border-color: var(--theme-primary); background: rgba(14, 165, 233, 0.1); }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .grid-cols-3 { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .grid-cols-4 { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .episode-btn { min-height: 36px; padding: 6px 2px; }
    .episode-btn .ep-number { font-size: 11px; }
}
@media (min-width: 481px) and (max-width: 640px) {
    .grid-cols-3 { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .grid-cols-4 { grid-template-columns: repeat(4, 1fr); gap: 8px; }
}
@media (min-width: 641px) and (max-width: 768px) {
    .grid-cols-3 { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .grid-cols-6 { grid-template-columns: repeat(6, 1fr); gap: 8px; }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .grid-cols-5 { grid-template-columns: repeat(5, 1fr); gap: 16px; }
    .grid-cols-8 { grid-template-columns: repeat(8, 1fr); gap: 8px; }
}
@media (min-width: 1025px) {
    .grid-cols-5 { grid-template-columns: repeat(5, 1fr); gap: 16px; }
    .grid-cols-10 { grid-template-columns: repeat(10, 1fr); gap: 10px; }
}