/* 소문 - VC/스타트업 익명제보 플랫폼 */

/* Color Palette */
:root {
    --dr-primary: #E8941A;
    --dr-primary-hover: #F0A832;
    --dr-danger: #FF6B7A;
    --dr-warning: #FFC46B;
    --dr-info: #64B5F6;
    --dr-success: #81C784;
    --dr-dark: #141420;
    --dr-darker: #0F0F18;
    --dr-card: #1F1E2A;
    --dr-border: #353445;
    --dr-text-primary: #F5F5FA;
    --dr-text-secondary: #B0B0C8;
    --dr-text-muted: #7878A0;
    --dr-accent: #00E5FF;
}

/* Override Bootstrap dark theme */
[data-bs-theme="dark"] {
    --bs-body-bg: var(--dr-dark);
    --bs-body-color: var(--dr-text-primary);
    --bs-primary: var(--dr-primary);
    --bs-primary-rgb: 255, 149, 0;
    --bs-secondary: var(--dr-text-secondary);
    --bs-success: var(--dr-success);
    --bs-info: var(--dr-info);
    --bs-warning: var(--dr-warning);
    --bs-danger: var(--dr-danger);
    --bs-light: var(--dr-card);
    --bs-dark: var(--dr-darker);
    --bs-border-color: var(--dr-border);
}

/* Global Styles */
body {
    font-size: 16px;
    background-color: var(--dr-dark) !important;
    color: var(--dr-text-primary) !important;
    font-family: 'Pretendard Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
    line-height: 1.6;
}

/* Cards and Containers */
.card {
    background-color: var(--dr-card) !important;
    border: 1px solid var(--dr-border) !important;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.card-body {
    padding: 1.25rem;
}

.container {
    max-width: 1200px;
}

/* Navigation */
.navbar {
    background-color: var(--dr-darker) !important;
    border-bottom: 1px solid var(--dr-border);
}

.navbar-brand {
    color: var(--dr-primary) !important;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.navbar-brand-sub {
    font-size: 0.7rem;
    color: var(--dr-text-muted) !important;
    font-weight: 400;
    display: block;
    letter-spacing: 0;
    margin-top: -2px;
}

.navbar-nav .nav-link {
    color: var(--dr-text-secondary) !important;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--dr-primary) !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--dr-primary) !important;
    border-color: var(--dr-primary) !important;
    color: white !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--dr-primary-hover) !important;
    border-color: var(--dr-primary-hover) !important;
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--dr-primary) !important;
    border-color: var(--dr-primary) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background-color: var(--dr-primary) !important;
    border-color: var(--dr-primary) !important;
    color: white !important;
}

.btn-danger {
    background-color: var(--dr-danger) !important;
    border-color: var(--dr-danger) !important;
}

.btn-secondary {
    background-color: var(--dr-text-muted) !important;
    border-color: var(--dr-text-muted) !important;
    color: white !important;
}

/* Form Elements */
.form-control, .btn {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.form-control {
    background-color: var(--dr-darker) !important;
    border: 1px solid var(--dr-border) !important;
    color: var(--dr-text-primary) !important;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    background-color: var(--dr-darker) !important;
    border-color: var(--dr-primary) !important;
    color: var(--dr-text-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 179, 71, 0.25) !important;
}

.form-control::placeholder {
    color: var(--dr-text-muted) !important;
}

.form-label {
    color: var(--dr-text-secondary) !important;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Voting System */
.vote-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
    padding: 0.5rem 0;
}

.vote-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border: none;
    background: transparent;
    color: var(--dr-text-muted) !important;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.vote-btn:hover {
    background-color: var(--dr-border) !important;
    color: var(--dr-text-primary) !important;
}

.vote-btn.active.upvote {
    color: var(--dr-primary) !important;
    background-color: rgba(255, 179, 71, 0.15) !important;
}

.vote-btn.active.downvote {
    color: var(--dr-danger) !important;
    background-color: rgba(255, 92, 106, 0.15) !important;
}

.vote-score {
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0.25rem 0;
    color: var(--dr-text-primary) !important;
}

/* Vote score in card list - prominent style */
.vote-score-compact {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dr-primary) !important;
    min-width: 28px;
}

/* Hot post highlight (5+ votes) */
.report-card-hot {
    border-color: var(--dr-primary) !important;
    border-width: 1.5px !important;
    box-shadow: 0 0 16px rgba(255, 179, 71, 0.12) !important;
}

/* Comment Voting */
.comment-vote-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 35px;
    padding: 0.25rem 0;
}

.comment-vote-section {
    flex-shrink: 0;
}

.comment-vote-btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    border: none;
    background: transparent;
    color: var(--dr-text-muted) !important;
    transition: all 0.2s ease;
    border-radius: 4px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-vote-btn:hover {
    background-color: var(--dr-border) !important;
    color: var(--dr-text-primary) !important;
    transform: scale(1.05);
}

.comment-vote-btn.active.upvote {
    color: var(--dr-primary) !important;
    background-color: rgba(255, 179, 71, 0.15) !important;
}

.comment-vote-btn.active.downvote {
    color: var(--dr-danger) !important;
    background-color: rgba(255, 92, 106, 0.15) !important;
}

.comment-vote-score {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--dr-text-primary) !important;
    min-width: 24px;
    text-align: center;
}

/* Mobile responsive voting */
@media (max-width: 767.98px) {
    .vote-section, .comment-vote-section {
        justify-content: center !important;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--dr-border);
    }

    .vote-btn, .comment-vote-btn {
        min-width: 36px;
        min-height: 36px;
        touch-action: manipulation;
    }

    .vote-score, .comment-vote-score {
        font-size: 0.9rem;
        margin: 0 1rem;
    }
}

/* Enhanced text readability */
.text-light {
    color: var(--dr-text-primary) !important;
    line-height: 1.6;
}

.card-body .text-light {
    font-size: 1rem;
    letter-spacing: 0.01em;
}

/* Report Items */
.report-item, .report-card-compact {
    background-color: var(--dr-card) !important;
    border: 1px solid var(--dr-border) !important;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.25s ease;
}

.report-item:hover, .report-card-compact:hover {
    border-color: var(--dr-primary) !important;
    box-shadow: 0 4px 16px rgba(255, 179, 71, 0.1);
    transform: translateY(-2px);
}

.clickable-card {
    transition: all 0.25s ease;
}

.clickable-card:hover {
    transform: translateY(-2px);
    border-color: var(--dr-primary) !important;
    box-shadow: 0 6px 20px rgba(255, 179, 71, 0.15) !important;
}

.report-title, .card-title {
    color: var(--dr-text-primary) !important;
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.5rem !important;
    text-decoration: none;
    display: block;
    line-height: 1.3;
}

.report-title:hover, .card-title a:hover {
    color: var(--dr-primary) !important;
    text-decoration: none;
}

.report-content, .card-text {
    color: var(--dr-text-secondary) !important;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    font-size: 0.95rem;
}

.report-content-compact {
    width: 100%;
}

.report-meta {
    color: var(--dr-text-muted) !important;
    font-size: 0.875rem;
}

/* Comment System */
.comment-item {
    background-color: var(--dr-darker) !important;
    border: 1px solid var(--dr-border) !important;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.comment-content {
    color: var(--dr-text-secondary) !important;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.comment-meta {
    color: var(--dr-text-muted) !important;
    font-size: 0.8rem;
}

.comment-preview p {
    color: var(--dr-text-muted) !important;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.comments-preview-section {
    margin-bottom: 0.4rem !important;
}

.comment-preview-inline {
    margin-bottom: 0.2rem !important;
}

/* Expand/Collapse Buttons */
.expand-comment, .collapse-comment {
    color: var(--dr-primary) !important;
    background: none !important;
    border: none !important;
    font-size: 0.8rem !important;
    padding: 0 !important;
    text-decoration: none;
}

.expand-comment:hover, .collapse-comment:hover {
    color: var(--dr-primary-hover) !important;
    text-decoration: underline;
}

/* Submission Form */
.submission-panel {
    background-color: var(--dr-card) !important;
    border: 1px solid var(--dr-border) !important;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.compact-form .form-group {
    margin-bottom: 1rem;
}

.form-submit-row {
    display: flex;
    align-items: end;
    gap: 1rem;
}

.form-submit-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Submit card compact form */
.submit-card-compact {
    border: 1px dashed var(--dr-border) !important;
    background-color: rgba(255, 179, 71, 0.03) !important;
}

/* Admin Interface */
.admin-header {
    background-color: var(--dr-darker) !important;
    border: 1px solid var(--dr-border) !important;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-card {
    background-color: var(--dr-card) !important;
    border: 1px solid var(--dr-border) !important;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dr-primary) !important;
}

.stat-label {
    color: var(--dr-text-secondary) !important;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Alert Messages */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: rgba(102, 187, 106, 0.1) !important;
    color: var(--dr-success) !important;
    border-left: 4px solid var(--dr-success);
}

.alert-danger {
    background-color: rgba(255, 92, 106, 0.1) !important;
    color: var(--dr-danger) !important;
    border-left: 4px solid var(--dr-danger);
}

.alert-warning {
    background-color: rgba(255, 179, 71, 0.1) !important;
    color: var(--dr-warning) !important;
    border-left: 4px solid var(--dr-warning);
}

.alert-info {
    background-color: rgba(66, 165, 245, 0.1) !important;
    color: var(--dr-info) !important;
    border-left: 4px solid var(--dr-info);
}

/* Text Colors */
.text-muted {
    color: var(--dr-text-muted) !important;
}

.text-secondary {
    color: var(--dr-text-secondary) !important;
}

.text-primary {
    color: var(--dr-primary) !important;
}

.text-danger {
    color: var(--dr-danger) !important;
}

.text-success {
    color: var(--dr-success) !important;
}

.text-warning {
    color: var(--dr-warning) !important;
}

.text-info {
    color: var(--dr-info) !important;
}

/* Advertisement Section */
.ad-section {
    background: linear-gradient(135deg, var(--dr-primary) 0%, var(--dr-primary-hover) 100%);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    text-align: center;
    border: none;
}

.ad-section h5 {
    color: white !important;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.ad-section p {
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.ad-section .btn {
    background-color: white !important;
    color: var(--dr-primary) !important;
    border: none;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.ad-section .btn:hover {
    background-color: rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-1px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .vote-column, .comment-vote-column {
        min-width: 30px;
    }

    .form-submit-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-body {
        padding: 1rem;
    }
}

/* Smooth Transitions */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Focus States */
button:focus, .btn:focus {
    outline: 2px solid var(--dr-primary);
    outline-offset: 2px;
}

.form-control:focus {
    outline: none;
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dr-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--dr-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dr-text-muted);
}

/* Comment preview styles */
.comment-previews-section {
    transition: all 0.2s ease;
    background-color: var(--dr-darker) !important;
    border-left: 3px solid var(--dr-primary) !important;
    border-radius: 0 6px 6px 0;
}

.comment-previews-section:hover {
    background-color: rgba(255, 179, 71, 0.06) !important;
}

.comment-preview-item {
    transition: background-color 0.2s ease;
}

.comment-preview-item:hover {
    background-color: rgba(255, 179, 71, 0.08);
    border-radius: 4px;
}

.content-preview {
    text-shadow: none;
}

/* Custom Tab Styles */
.custom-tabs {
    border-bottom: 3px solid var(--dr-border);
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.custom-tabs .nav-link {
    background: linear-gradient(135deg, var(--dr-card) 0%, var(--dr-darker) 100%);
    border: 2px solid var(--dr-border);
    border-bottom: none;
    color: var(--dr-text-secondary);
    padding: 0.75rem 1rem;
    margin: 0 0.2rem;
    border-radius: 10px 10px 0 0;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
    min-height: 65px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    max-width: 200px;
}

.custom-tabs .nav-link:hover {
    background: linear-gradient(135deg, #24243A 0%, #1E1E30 100%);
    border-color: var(--dr-text-muted);
    color: var(--dr-text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.custom-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--dr-primary) 0%, var(--dr-primary-hover) 100%);
    border-color: var(--dr-primary);
    color: #fff;
    font-weight: 600;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 179, 71, 0.4);
}

.custom-tabs .nav-link.active .tab-description {
    color: rgba(255, 255, 255, 0.7) !important;
}

.ideas-tab {
    position: relative;
    overflow: visible;
}

.ideas-tab:not(.active) {
    background: linear-gradient(135deg, #2A2A40 0%, #22223A 100%) !important;
    border-color: var(--dr-text-muted) !important;
    animation: pulse-glow 2s infinite;
}

.ideas-tab:not(.active):hover {
    background: linear-gradient(135deg, #34344A 0%, #2C2C44 100%) !important;
    border-color: var(--dr-primary) !important;
    box-shadow: 0 4px 16px rgba(255, 179, 71, 0.3);
}

.tab-text {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1px;
}

.tab-description {
    font-size: 0.65rem;
    color: var(--dr-text-muted);
    font-weight: 400;
    line-height: 1.1;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 179, 71, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 179, 71, 0.6), 0 0 25px rgba(255, 179, 71, 0.3);
    }
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
        color: var(--dr-warning);
    }
    50% {
        transform: scale(1.1);
        color: #ff9800;
    }
}

.pulse-icon {
    animation: pulse-icon 1.5s ease-in-out infinite;
}

.loading-animation {
    position: relative;
}

.loading-animation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255, 179, 71, 0.2);
    border-radius: 50%;
    border-top-color: var(--dr-primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Reports Board Container */
.reports-board-container {
    position: relative;
    background-color: var(--dr-dark) !important;
    border: 1.5px solid var(--dr-border) !important;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.reports-board-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--dr-primary), var(--dr-primary-hover), var(--dr-primary));
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.reports-board-container:hover::before {
    opacity: 0.15;
}

/* Mobile-specific tab styles */
@media (max-width: 768px) {
    .custom-tabs .nav-link {
        padding: 0.6rem 0.3rem;
        min-height: 55px;
        margin: 0 0.1rem;
        flex: 1;
        max-width: none;
    }

    .tab-text {
        font-size: 0.8rem;
    }

    .tab-description {
        font-size: 0.6rem;
    }

    .comment-previews-section {
        padding: 6px 8px !important;
        margin-top: 6px !important;
    }

    .comment-preview-item small {
        font-size: 0.75rem !important;
    }
}

/* Pagination */
.page-link {
    background-color: var(--dr-card) !important;
    border-color: var(--dr-border) !important;
    color: var(--dr-text-secondary) !important;
}

.page-link:hover {
    background-color: var(--dr-border) !important;
    color: var(--dr-text-primary) !important;
}

.page-item.active .page-link {
    background-color: var(--dr-primary) !important;
    border-color: var(--dr-primary) !important;
    color: white !important;
}

.page-item.disabled .page-link {
    background-color: var(--dr-darker) !important;
    border-color: var(--dr-border) !important;
    color: var(--dr-text-muted) !important;
}

/* Dropdown menu */
.dropdown-menu {
    background-color: var(--dr-card) !important;
    border: 1px solid var(--dr-border) !important;
}

.dropdown-item {
    color: var(--dr-text-secondary) !important;
}

.dropdown-item:hover, .dropdown-item.active {
    background-color: var(--dr-border) !important;
    color: var(--dr-text-primary) !important;
}

/* Footer */
footer {
    background-color: var(--dr-darker) !important;
    border-top: 1px solid var(--dr-border);
}

/* ===== DREAMY / GEN-Z EFFECTS ===== */

/* Background image + gradient overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background: url('/static/bg.png') center top / cover no-repeat fixed;
    opacity: 0.25;
}

/* Ambient gradient on top of bg image */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 900px 900px at 5% 15%, rgba(224,64,251,.2) 0%, transparent 60%),
        radial-gradient(ellipse 800px 800px at 85% 50%, rgba(0,229,255,.15) 0%, transparent 60%),
        radial-gradient(ellipse 700px 700px at 40% 85%, rgba(224,64,251,.12) 0%, transparent 60%),
        radial-gradient(ellipse 600px 600px at 60% 20%, rgba(0,229,255,.18) 0%, transparent 60%);
    animation: ambientShift 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ambientShift {
    0%, 100% { opacity: 1; filter: hue-rotate(0deg); }
    33% { opacity: .9; filter: hue-rotate(10deg); }
    66% { opacity: 1; filter: hue-rotate(-10deg); }
}

/* Glassmorphism cards */
.card, .submit-card-compact {
    background: rgba(26,26,36,.6) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(224,64,251,.1) !important;
    transition: all .3s ease;
}

.card:hover {
    border-color: rgba(224,64,251,.25) !important;
    box-shadow: 0 4px 24px rgba(224,64,251,.1);
    transform: translateY(-1px);
}

/* Navbar glass effect */
.navbar {
    background: rgba(15,15,21,.7) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Dreamy glow on brand */
.navbar-brand {
    text-shadow: 0 0 20px rgba(224,64,251,.3);
}

/* Hot card glow pulse */
.report-card-hot {
    animation: hotPulse 3s ease-in-out infinite;
}

@keyframes hotPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(224,64,251,.25); }
    50% { box-shadow: 0 0 20px rgba(224,64,251,.3); }
}

/* Vote score glow */
.vote-score {
    text-shadow: 0 0 8px rgba(224,64,251,.4);
}

/* Smooth page transitions */
.container-fluid {
    animation: fadeIn .5s ease;
}

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

/* Music button pulse when playing */
#musicToggle.playing {
    border-color: #E8941A !important;
    box-shadow: 0 0 16px rgba(224,64,251,.3);
}

/* Noise is handled via inline SVG div in layout.html */
