/**
 * Sinkori Network V2 - UI Components (Buttons, Cards, Badges, Typography)
 */

/* --- Glassmorphism --- */
.glass {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
}

/* --- Typography & Branding --- */
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2.5rem;
    padding-left: 0.5rem;
}

.logo-dot {
    width: 10px;
    height: 10px;
    background: var(--primary-glow);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--primary-glow);
}

/* --- Navigation Elements --- */
.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-menu li {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-menu li:hover, .nav-menu li.active {
    background: var(--surface-hover);
    color: var(--text-main);
}

.nav-menu li.active {
    border-left: 3px solid var(--primary-glow);
    background: rgba(0, 240, 255, 0.05);
}

.nav-badge {
    background: var(--disputed-orange);
    color: #000;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.rail-module {
    margin-top: auto;
    padding: 1rem;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.rail-module h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* --- Buttons --- */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
    font-size: 0.85rem;
}

.btn-pro {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.2), rgba(157, 78, 221, 0.05));
    color: #d8b4fe;
    border: 1px solid rgba(157, 78, 221, 0.5);
}

.btn-pro:hover {
    background: rgba(157, 78, 221, 0.4);
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.4);
}

.tool-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.85rem;
    border-radius: 15px;
    transition: all 0.2s;
}

.tool-btn:hover, .tool-btn.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* --- Search Engine Inputs --- */
.search-engine {
    flex: 0 1 600px;
    position: relative;
}

.search-engine input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    outline: none;
    transition: all 0.3s;
}

.search-engine input:focus {
    border-color: var(--primary-glow);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* --- Top Band Topic Info --- */
.topic-info h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-status {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(0, 250, 154, 0.1);
    color: var(--verified-green);
    border: 1px solid var(--verified-green);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.topic-summary {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 600px;
    line-height: 1.5;
}

.topic-metrics {
    display: flex;
    gap: 2rem;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* --- Evidence Cards --- */
.card {
    border-radius: 10px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--primary-glow);
    background: var(--surface-hover);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.05);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.card-title {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: #fff;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

.card-actions {
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.card:hover .card-actions {
    opacity: 1;
}

.card-action-btn {
    background: none;
    border: none;
    color: var(--primary-glow);
    font-size: 0.75rem;
    cursor: pointer;
}

.card-action-btn:hover { text-decoration: underline; }

/* --- Deep Data Components (Drawer Content) --- */
.data-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.trust-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.5);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    margin: 10px 0;
}

.source-trail {
    list-style: none;
    border-left: 2px solid var(--border);
    padding-left: 20px;
    margin-left: 10px;
}

.source-trail li {
    position: relative;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.source-trail li::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--surface-solid);
    border: 2px solid var(--primary-glow);
    border-radius: 50%;
}

.blockchain-hash {
    font-family: 'Courier New', monospace;
    background: rgba(0,0,0,0.4);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--pro-purple);
    word-break: break-all;
    border: 1px solid rgba(157, 78, 221, 0.2);
}

/* --- Threading & Comments --- */
.debate-section {
    margin-top: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.debate-header {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-input-area {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.stance-selector {
    padding: 0.75rem;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: white;
    outline: none;
    font-size: 0.85rem;
}

.comment {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.comment.reply {
    margin-left: 3rem;
    margin-top: -0.5rem;
}

/* Visual Threading Line */
.comment.reply::before {
    content: '';
    position: absolute;
    left: -22px;
    top: -20px;
    bottom: 20px;
    width: 2px;
    background: var(--surface-hover);
    border-radius: 2px;
}

.comment.reply::after {
    content: '';
    position: absolute;
    left: -22px;
    top: 20px;
    width: 12px;
    height: 2px;
    background: var(--surface-hover);
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-main);
    z-index: 2;
}

.comment-content {
    flex: 1;
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.03);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.user-name {
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
}

.badge-expertise {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(157, 78, 221, 0.15);
    color: #d8b4fe;
    border: 1px solid rgba(157, 78, 221, 0.4);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge-stance-left {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 250, 154, 0.1);
    color: var(--verified-green);
    border: 1px solid var(--verified-green);
    text-transform: uppercase;
    font-weight: bold;
}

.badge-stance-right {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 115, 0, 0.1);
    color: var(--disputed-orange);
    border: 1px solid var(--disputed-orange);
    text-transform: uppercase;
    font-weight: bold;
}

.comment-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vote-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.4);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.vote-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s, transform 0.2s;
}

.vote-btn:hover { transform: scale(1.2); }
.vote-btn.up.active { color: var(--verified-green); }
.vote-btn.down.active { color: var(--disputed-orange); }

.vote-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    min-width: 20px;
    text-align: center;
}

.reply-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.reply-btn:hover { color: white; }

/* --- Media Attachments & Video Citations --- */
.media-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
}

.media-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: inherit;
}

.media-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.media-url-input {
    display: none;
    width: 250px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: white;
    outline: none;
}

.media-url-input:focus { border-color: var(--primary-glow); }
.media-url-input.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.comment-media-container {
    margin: 12px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    max-width: 450px;
    background: rgba(0,0,0,0.3);
}

.attached-media {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.8;
    transition: opacity 0.2s;
    cursor: pointer;
}

.attached-media:hover { opacity: 1; }

.video-cite-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,0.4);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin: 12px 0;
    max-width: 450px;
    transition: border-color 0.2s, background 0.2s;
}

.video-cite-box:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(0,0,0,0.6);
}

.video-cite-icon {
    background: #ff0000;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.video-cite-title {
    font-size: 0.85rem;
    color: var(--text-main);
    text-decoration: none;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-cite-title:hover { color: var(--primary-glow); }

.timestamp-badge {
    font-size: 0.7rem;
    background: var(--surface-hover);
    padding: 3px 6px;
    border-radius: 4px;
    color: var(--primary-glow);
    font-family: monospace;
    border: 1px solid rgba(0, 240, 255, 0.2);
}