/* Aura Marketing Guide & Tools CSS Styling */

:root {
    --bg-dark: #090a0f;
    --card-bg: rgba(20, 22, 33, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --primary-color: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.2);
    --card-border: rgba(255, 255, 255, 0.08);
    --accent-red: #ef4444;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --font-outfit: 'Outfit', sans-serif;
    --font-inter: 'Inter', 'Noto Sans KR', sans-serif;
    
    --blue-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --purple-gradient: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

body.light-theme {
    --bg-dark: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.75);
    --border-color: rgba(15, 23, 42, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --primary-color: #2563eb;
    --primary-glow: rgba(37, 99, 235, 0.1);
    --card-border: rgba(15, 23, 42, 0.08);
    --bg-input: #ffffff;
}

body {
    margin: 0;
    padding: 24px;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-inter);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

/* Glassmorphism card utility */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
}

.guide-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header */
.guide-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--blue-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.guide-header h2 {
    font-family: var(--font-outfit);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Tabs Navigation */
.guide-tabs {
    display: flex;
    padding: 6px;
    gap: 6px;
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-inter);
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

body.light-theme .tab-btn:hover {
    background: rgba(0, 0, 0, 0.03);
}

.tab-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Sub-Tab content routing */
.sub-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.sub-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Grid configurations */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-2col-ratio {
    display: grid;
    grid-template-columns: 4.5fr 5.5fr;
    gap: 20px;
}

@media (max-width: 1024px) {
    .grid-2col, .grid-2col-ratio {
        grid-template-columns: 1fr;
    }
}

.panel-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel-header h3 {
    font-family: var(--font-outfit);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header h3 i {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.panel-subtitle {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Search Box */
.search-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 16px;
}

.search-wrapper input {
    box-sizing: border-box;
    width: 100%;
    padding: 12px 16px 12px 42px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.015);
    color: var(--text-primary);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.25s ease;
}

body.light-theme .search-wrapper input {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(0, 0, 0, 0.08);
}

.search-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

/* Glossary Section */
.glossary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Scrollbar styling */
.glossary-list::-webkit-scrollbar,
.compliance-table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.glossary-list::-webkit-scrollbar-thumb,
.compliance-table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
body.light-theme .glossary-list::-webkit-scrollbar-thumb,
body.light-theme .compliance-table-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}

.glossary-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.light-theme .glossary-card {
    background: rgba(0, 0, 0, 0.01);
}

.glossary-card:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.04);
}

.glossary-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.term-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.term-name {
    font-family: var(--font-outfit);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.term-kr {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.glossary-card i {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.glossary-card.expanded i {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.glossary-desc {
    display: none;
    margin-top: 10px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-secondary);
    border-top: 1.5px dashed var(--border-color);
    padding-top: 10px;
    animation: slideDown 0.2s ease-out;
}

.glossary-card.expanded .glossary-desc {
    display: block;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Calculator CSS */
.calc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 580px) {
    .input-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group select {
    box-sizing: border-box;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    font-family: var(--font-inter);
    transition: all 0.2s ease;
}

body.light-theme .form-group input,
body.light-theme .form-group select {
    background: #ffffff;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.calc-buttons {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.action-btn-primary {
    flex: 2;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--blue-gradient);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px var(--primary-glow);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.action-btn-primary:active {
    transform: scale(0.98);
}

.action-btn-secondary {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

body.light-theme .action-btn-secondary {
    background: rgba(0, 0, 0, 0.02);
}

.action-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

body.light-theme .action-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
}

.calc-divider {
    border-top: 1px solid var(--border-color);
    margin: 4px 0;
}

/* Results Display Grid */
.results-dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 600px) {
    .results-dashboard {
        grid-template-columns: 1fr 1fr;
    }
}

.metric-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.metric-title {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 6px;
}

.metric-value {
    font-family: var(--font-outfit);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}

.metric-desc {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ROAS styling */
.roas-box {
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1.5px solid var(--border-color);
}

.roas-box.neutral {
    background: rgba(255, 255, 255, 0.015);
    border-color: var(--border-color);
}

.roas-box.profitable {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.25);
}

.roas-box.warning {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.25);
}

.roas-box.deficit {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.25);
}

.roas-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.roas-label {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.roas-value {
    font-family: var(--font-outfit);
    font-size: 1.6rem;
    font-weight: 850;
}

.roas-box.profitable .roas-value { color: var(--accent-green); }
.roas-box.warning .roas-value { color: var(--accent-yellow); }
.roas-box.deficit .roas-value { color: var(--accent-red); }

.diagnostic-card {
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

/* Compliance and Copywriting tab styles */
.compliance-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.comp-tab-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-inter);
    transition: all 0.2s ease;
}

.comp-tab-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.comp-tab-btn.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.compliance-table-container {
    overflow-y: auto;
    max-height: 480px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.compliance-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.8rem;
}

.compliance-table th,
.compliance-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}

.compliance-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 700;
}

body.light-theme .compliance-table th {
    background: rgba(0, 0, 0, 0.02);
}

.compliance-table tr:last-child td {
    border-bottom: none;
}

.compliance-table td.banned-word {
    color: var(--accent-red);
    font-weight: 700;
}

.compliance-table td.recommend-word {
    color: var(--accent-green);
    font-weight: 750;
}

/* Copywriting Framework */
.framework-switcher {
    display: flex;
    gap: 8px;
}

.frame-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-inter);
    transition: all 0.2s ease;
}

.frame-btn.active {
    background: var(--blue-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.framework-explain {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

body.light-theme .framework-explain {
    background: rgba(0, 0, 0, 0.01);
}

.copy-template-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 520px;
    overflow-y: auto;
}

.copy-template-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
}

/* Copywriting Fields Styles */
.template-fields-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 8px 0;
}

.template-field-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-input-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.field-char-count {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.field-textarea-container {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.field-text-input {
    flex: 1;
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: inherit;
}

body.light-theme .field-text-input {
    background: #f8fafc;
    color: #334155;
}

.btn-copy-field {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 0 14px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.btn-copy-field:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

body.light-theme .btn-copy-field:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* Media Mix Planner Tab */
.input-helper {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.radio-card-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-card {
    cursor: pointer;
    display: block;
}

.radio-card input {
    display: none;
}

.radio-card-content {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.01);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s ease;
}

.radio-card-content i {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.radio-card-content strong {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.radio-card-content span {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.radio-card input:checked + .radio-card-content {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.radio-card input:checked + .radio-card-content i {
    color: var(--primary-color);
}

/* Media allocation visualization charts */
.visual-chart-container {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
}

body.light-theme .visual-chart-container {
    background: rgba(0, 0, 0, 0.005);
}

.mix-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mix-bar-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mix-bar-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
}

.mix-bar-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
}

.mix-bar-pct {
    color: var(--primary-color);
}

.mix-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 5px;
    overflow: hidden;
}

body.light-theme .mix-bar-track {
    background: rgba(0, 0, 0, 0.05);
}

.mix-bar-fill {
    height: 100%;
    border-radius: 5px;
    width: 0;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.mix-bar-row:nth-child(1) .mix-bar-fill { background: #3b82f6; } /* Google Blue */
.mix-bar-row:nth-child(2) .mix-bar-fill { background: #8b5cf6; } /* Meta Purple */
.mix-bar-row:nth-child(3) .mix-bar-fill { background: #f59e0b; } /* Kakao Yellow */
.mix-bar-row:nth-child(4) .mix-bar-fill { background: #ec4899; } /* TikTok Pink */

.media-table-container {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.media-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.78rem;
}

.media-table th,
.media-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}

.media-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 700;
}

body.light-theme .media-table th {
    background: rgba(0, 0, 0, 0.02);
}

.media-table tr:last-child td {
    border-bottom: none;
}

.media-table td.media-name {
    font-weight: 750;
    color: var(--text-primary);
}

.media-table td.media-pct {
    font-weight: 700;
    color: var(--primary-color);
}

/* Media Badges */
.media-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
}
.media-badge.meta {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}
.media-badge.naver {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.media-badge.google {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.media-badge.general {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Media Tip Box */
.media-tip-box {
    background: rgba(255, 255, 255, 0.015);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
    margin-top: 4px;
}
body.light-theme .media-tip-box {
    background: rgba(0, 0, 0, 0.01);
}
.media-tip-box i {
    flex-shrink: 0;
}
.media-tip-box strong {
    color: var(--text-primary);
}

/* SVG Trend Chart Styling */
.chart-box {
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.light-theme .chart-box {
    background: rgba(255, 255, 255, 0.4);
}

.trend-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.chart-line {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.5s ease-in-out;
}

.chart-area-fill {
    opacity: 0.08;
    transition: all 0.5s ease-in-out;
}

.chart-grid-line {
    stroke: var(--border-color);
    stroke-width: 1;
    stroke-dasharray: 4, 4;
}

.chart-axis-text {
    fill: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
}

.chart-dot {
    fill: var(--primary-color);
    stroke: #ffffff;
    stroke-width: 2;
    cursor: pointer;
    transition: r 0.15s ease, fill 0.15s ease;
}

body.light-theme .chart-dot {
    stroke: #ffffff;
}

.chart-dot:hover {
    r: 6;
    fill: #ffffff;
    stroke: var(--primary-color);
}

/* Interactive Chart Tooltip */
.chart-tooltip {
    position: absolute;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.72rem;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: opacity 0.15s ease, transform 0.1s ease;
}

body.light-theme .chart-tooltip {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.chart-tooltip.hide {
    opacity: 0;
    transform: scale(0.95);
}

/* Channel Selector Grid */
.channel-selector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 4px;
}

.channel-option {
    cursor: pointer;
}

.channel-option input {
    display: none;
}

.channel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.015);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.channel-btn .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.channel-option:hover .channel-btn {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

body.light-theme .channel-option:hover .channel-btn {
    background: rgba(0, 0, 0, 0.02);
}

/* Active channel states */
.channel-option input:checked + .channel-btn.naver {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
}
.channel-option input:checked + .channel-btn.naver .dot {
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

.channel-option input:checked + .channel-btn.google {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
}
.channel-option input:checked + .channel-btn.google .dot {
    background: #3b82f6;
    box-shadow: 0 0 6px #3b82f6;
}

.channel-option input:checked + .channel-btn.kakao {
    border-color: #eab308;
    background: rgba(234, 179, 8, 0.08);
    color: #eab308;
}
.channel-option input:checked + .channel-btn.kakao .dot {
    background: #eab308;
    box-shadow: 0 0 6px #eab308;
}

.channel-option input:checked + .channel-btn.instagram {
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.08);
    color: #ec4899;
}
.channel-option input:checked + .channel-btn.instagram .dot {
    background: #ec4899;
    box-shadow: 0 0 6px #ec4899;
}

.channel-option input:checked + .channel-btn.facebook {
    border-color: #1877f2;
    background: rgba(24, 119, 242, 0.08);
    color: #1877f2;
}
.channel-option input:checked + .channel-btn.facebook .dot {
    background: #1877f2;
    box-shadow: 0 0 6px #1877f2;
}

/* Keyword input wrapper and enter badge styling */
.keyword-input-wrapper {
    position: relative;
    width: 100%;
}

.keyword-input-wrapper input {
    box-sizing: border-box;
    width: 100%;
    padding-right: 68px !important;
}

.keyword-input-wrapper input:focus {
    border-color: var(--channel-color) !important;
    box-shadow: 0 0 0 3px var(--channel-glow) !important;
}

.enter-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 6px;
    pointer-events: none;
    user-select: none;
    transition: all 0.2s ease;
}

body.light-theme .enter-badge {
    background: rgba(0, 0, 0, 0.03);
}

.keyword-input-wrapper input:focus + .enter-badge {
    color: var(--channel-color);
    border-color: var(--channel-color);
    box-shadow: 0 0 4px var(--channel-glow);
}

/* =========================================================================
   Premium Dynamic Button hover theme for Keyword Search
   ========================================================================= */
#btn-keyword-search {
    width: 60% !important;
    min-width: 180px !important;
    max-width: 240px !important;
    height: 44px !important;
    padding: 0 24px !important;
    border-radius: 30px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    
    /* Default styling - Solid Charcoal Gray for Dark Mode */
    background: #374151 !important;
    border: 1.5px solid var(--channel-color, var(--border-color)) !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.light-theme #btn-keyword-search {
    /* Solid Light Zinc Gray for Light Mode */
    background: #e4e4e7 !important;
    border: 1.5px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

#btn-keyword-search:hover,
body.light-theme #btn-keyword-search:hover {
    background: var(--channel-color) !important;
    border-color: var(--channel-color) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px var(--channel-glow) !important;
    transform: translateY(-1.5px) !important;
}

#btn-keyword-search:active,
body.light-theme #btn-keyword-search:active {
    transform: translateY(0) scale(0.96) !important;
}
