@import url('./brand.css');

:root {
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --text-primary: #e0e0e0;
    --text-secondary: #aaaaaa;
    --accent-up: var(--wuu-u);
    --accent-down: var(--wuu-up);
    --border-color: #333;
    --picasso-font-size: 1.1rem;
    --original-font-size: 1.5rem;
}
body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}
.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    box-sizing: border-box;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
h1 { margin: 0; font-size: 2rem; letter-spacing: -1px; user-select: none; }
.title-nav { display: inline-flex; cursor: pointer; gap: 5px; }
.title-nav span { transition: color 0.2s; position: relative; }
.title-nav span:hover { color: var(--accent-up); }

/* Tooltip Style */
.tooltip-trigger::after {
    content: attr(data-tooltip);
    position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%);
    background: #333; color: #fff; padding: 4px 8px; border-radius: 4px;
    font-size: 0.7rem; white-space: nowrap; opacity: 0; visibility: hidden;
    transition: opacity 0.2s; z-index: 10; pointer-events: none;
}
.tooltip-trigger:hover::after { opacity: 1; visibility: visible; }

/* Picasso Toggle */
.style-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Category Nav */
.category-nav {
    display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 20px;
    scrollbar-width: thin;
}
.cat-chip {
    padding: 8px 16px; background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 20px; cursor: pointer; white-space: nowrap; color: var(--text-secondary);
    transition: all 0.2s;
}
.cat-chip:hover { border-color: var(--text-primary); color: var(--text-primary); }
.cat-chip.active {
    background: rgba(239, 68, 68, 0.2); border-color: var(--accent-down); color: var(--accent-down); font-weight: bold;
}

.search-container {
    display: flex; margin-bottom: 10px; gap: 10px; position: relative; flex-wrap: wrap;
}
.search-input {
    flex-grow: 1; padding: 10px 15px; background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 4px; color: var(--text-primary); font-size: 1rem; outline: none;
}
.search-input:focus { border-color: var(--accent-up); }
.search-dropdown {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-card); border: 1px solid var(--border-color);
    border-top: none; border-radius: 0 0 4px 4px; z-index: 100; max-height: 200px; overflow-y: auto; display: none;
}
.search-item {
    padding: 10px 15px; cursor: pointer; color: var(--text-secondary);
}
.search-item:hover { background: rgba(59, 130, 246, 0.1); color: var(--accent-up); }

.post-card {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px;
    display: flex; overflow: hidden; cursor: pointer; transition: transform 0.1s;
}
.post-card:hover { border-color: #555; transform: translateY(-2px); }

.vote-sidebar {
    background: rgba(0,0,0,0.2); padding: 10px; display: flex; flex-direction: column;
    align-items: center; border-right: 1px solid var(--border-color); width: 40px; justify-content: center;
}
.vote-sidebar button { background: none; border: none; color: var(--text-secondary); font-size: 1.2rem; cursor: pointer; transition: all 0.2s; }
.vote-btn.active-O { background: rgba(59, 130, 246, 0.2); border-radius: 50%; transform: scale(1.1); }
.vote-btn.active-X { background: rgba(239, 68, 68, 0.2); border-radius: 50%; transform: scale(1.1); }

.post-content { padding: 12px 15px; flex-grow: 1; }
.post-header { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 6px; }

/* Topic Title Styles */
.post-title { margin: 0 0 8px 0; color: var(--text-primary); transition: font-size 0.3s; }
body.style-original .post-title { font-size: var(--original-font-size); font-weight: bold; }
body.style-compact .post-title { font-size: var(--picasso-font-size); font-weight: 500; }

body.style-compact .quote-box { display: none; } /* Hide quotes in compact mode */

.quote-box {
    background: rgba(255,255,255,0.05); border-left: 3px solid #555; padding: 8px 12px;
    margin: 6px 0; font-size: 0.9rem; color: #ccc;
}

/* Modal */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 1000; justify-content: center; align-items: center;
    backdrop-filter: blur(4px);
}
.modal-content {
    background: var(--bg-dark); width: 90%; max-width: 900px; height: 85vh;
    border-radius: 12px; border: 1px solid var(--border-color); display: flex; flex-direction: column;
    overflow: hidden;
}
.modal-header {
    padding: 20px; border-bottom: 1px solid var(--border-color); position: relative; background: var(--bg-card);
}
.modal-close {
    position: absolute; top: 20px; right: 20px; background: none; border: none;
    color: var(--text-secondary); font-size: 1.5rem; cursor: pointer;
}
.modal-body {
    display: flex; flex-direction: column; flex-grow: 1; overflow: hidden;
}
@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
    }
}
.comments-col {
    flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px;
}
.col-pro { border-right: 1px solid var(--border-color); background: rgba(59, 130, 246, 0.02); }
.col-con { background: rgba(239, 68, 68, 0.02); }
.col-title { text-align: center; font-weight: bold; margin-bottom: 15px; font-size: 1.2rem; }
.col-pro .col-title { color: var(--accent-up); }
.col-con .col-title { color: var(--accent-down); }

.comment-card {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px;
    padding: 12px; display: flex; gap: 10px;
}
.comment-vote {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.comment-vote button { background: none; border: none; color: #888; cursor: pointer; }
.comment-vote button:hover { color: #fff; }
.comment-text { flex-grow: 1; font-size: 0.95rem; line-height: 1.4; color: #ddd; }

.comment-input-area {
    display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 15px; border-top: 1px dashed #333;
}
.comment-input-area textarea {
    width: 100%; height: 60px; background: #111; border: 1px solid #444; color: #fff;
    padding: 10px; border-radius: 4px; resize: none; box-sizing: border-box;
}
.comment-input-area button {
    align-self: flex-end; padding: 8px 16px; background: #333; color: #fff;
    border: none; border-radius: 4px; cursor: pointer;
}
.comment-input-area button:hover { background: #555; }

/* Mobile Header Adjustments - Make logo larger and at the very top */
@media (max-width: 767px) {
    .container {
        padding-top: 10px;
    }
    header {
        padding-top: 5px;
        margin-bottom: 15px;
    }
    header .title-nav {
        font-size: 2.5rem;
    }
    header .title-nav-sub {
        font-size: 0.95rem !important;
        margin-top: 5px !important;
    }
}

/* --- Theme: Picasso Light (Editorial Brutalism) --- */
body.theme-light {
    --bg-dark: #f0f0f0;
    --bg-card: #fafafa;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --border-color: #d0d0d0;
    --wuu-what: #111111;
    --wuu-u: #3b82f6;
    --wuu-up: #ee4444;
    --wuu-u-subtle: rgba(59, 130, 246, 0.08);
    --wuu-up-subtle: rgba(238, 68, 68, 0.08);
    --accent-down: var(--wuu-up);
    --accent-up: var(--wuu-u);
    font-family: 'Pretendard', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body.theme-light .tooltip-trigger::after {
    background: #333; color: #fff; border: none;
}

body.theme-light .debate-card {
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

body.theme-light .debate-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

body.theme-light .what-card { background: rgba(0, 0, 0, 0.05); border-color: rgba(0, 0, 0, 0.1); }
body.theme-light .u-card { background: var(--wuu-u-subtle); border-color: var(--wuu-u-border); }
body.theme-light .up-card { background: var(--wuu-up-subtle); border-color: var(--wuu-up-border); }

body.theme-light .what-card .dash-title { color: var(--wuu-what); }
body.theme-light .u-card .dash-title { color: var(--wuu-u); }
body.theme-light .up-card .dash-title { color: var(--wuu-up); }

body.theme-light .title-nav,
body.theme-light .debate-title,
body.theme-light .side-header,
body.theme-light .dash-title {
    font-family: 'Pretendard', sans-serif;
    letter-spacing: -0.5px;
}

body.theme-light .search-input {
    border-radius: 4px;
    border: 1px solid #ccc;
    color: #111;
    background: #fff;
}

body.theme-light .comments-overlay {
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    border-radius: 8px;
    border-top: 1px solid #eee;
}

body.theme-light .comment-item {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    color: #333;
}

body.theme-light .modal-content {
    background: #ffffff;
    color: #111;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 12px;
}

body.theme-light .vote-btn.pro { border-color: rgba(29, 78, 216, 0.2); }
body.theme-light .vote-btn.con { border-color: rgba(185, 28, 28, 0.2); }
