/* Terminal Preview Card Styles */
.quote-preview-card {
    background: #1a1a1a;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.quote-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.quote-preview-header {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-controls {
    display: flex;
    gap: 0.375rem;
}

.preview-btn {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.preview-btn.close { background: #ff5f57; }
.preview-btn.minimize { background: #ffbd2e; }
.preview-btn.maximize { background: #28ca42; }

.preview-title {
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 500;
    flex: 1;
    text-align: center;
    margin: 0 0.75rem;
}

.quote-preview-content {
    background: #0d1117;
    padding: 1rem;
    min-height: 120px;
}

.quote-preview-text {
    color: #e6edf3;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    background: transparent;
    border: none;
    padding: 0;
}

.quote-preview-footer {
    background: #161b22;
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dark theme adjustments */
[data-mdb-theme="dark"] .quote-preview-card {
    background: #0d1117;
    border-color: rgba(255, 255, 255, 0.15);
}

[data-mdb-theme="dark"] .quote-preview-header {
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

[data-mdb-theme="dark"] .quote-preview-content {
    background: #010409;
}

[data-mdb-theme="dark"] .quote-preview-text {
    color: #f0f6fc;
}

[data-mdb-theme="dark"] .quote-preview-footer {
    background: #0d1117;
    border-top-color: rgba(255, 255, 255, 0.15);
}

/* Light theme adjustments */
[data-mdb-theme="light"] .quote-preview-card {
    background: #f6f8fa;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

[data-mdb-theme="light"] .quote-preview-header {
    background: linear-gradient(135deg, #ffffff 0%, #f6f8fa 100%);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-mdb-theme="light"] .preview-title {
    color: #24292f;
}

[data-mdb-theme="light"] .quote-preview-content {
    background: #ffffff;
}

[data-mdb-theme="light"] .quote-preview-text {
    color: #24292f;
}

[data-mdb-theme="light"] .quote-preview-footer {
    background: #f6f8fa;
    border-top-color: rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .quote-preview-content {
        padding: 0.75rem;
        min-height: 100px;
    }
    
    .quote-preview-text {
        font-size: 0.75rem;
    }
    
    .preview-title {
        font-size: 0.7rem;
        margin: 0 0.5rem;
    }
    
    .quote-preview-footer {
        padding: 0.5rem;
    }
}

/* Hover effects for preview cards */
.quote-preview-card:hover .preview-btn {
    opacity: 0.8;
}

.quote-preview-card:hover .preview-title {
    color: var(--mdb-primary);
}

/* Sidebar styles for quote pages */
.rank-badge {
    min-width: 32px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mdb-primary), var(--mdb-secondary));
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.min-w-0 {
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.sidebar-quote-channel {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mdb-primary);
}

.sidebar-quote-text {
    font-size: 0.875rem;
    color: var(--mdb-text-primary);
    line-height: 1.4;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.stat-item:not(:last-child) {
    border-bottom: 1px solid var(--mdb-border-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--mdb-text-muted);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mdb-primary);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.15;
    margin-bottom: 1rem;
    display: block;
}

.empty-state h3,
.empty-state h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state i.empty-state-success {
    color: var(--mdb-success);
}

/* ========== Quote submit form (terminal style) - quotes/submit.html ========== */
.submit-terminal {
    background: #1a1a1a;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.submit-terminal-header {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-btn.close { background: #ff5f57; }
.terminal-btn.minimize { background: #ffbd2e; }
.terminal-btn.maximize { background: #28ca42; }

.terminal-title {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    flex: 1;
    text-align: center;
    margin: 0 1rem;
}

.submit-terminal-content {
    background: #0d1117;
    padding: 2rem;
    min-height: 400px;
}

.submit-terminal .terminal-input,
.submit-terminal .terminal-textarea {
    background: #161b22 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #e6edf3 !important;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
}

.submit-terminal .terminal-input:focus,
.submit-terminal .terminal-textarea:focus {
    background: #161b22 !important;
    border-color: var(--mdb-primary) !important;
    color: #e6edf3 !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--mdb-primary-rgb), 0.25) !important;
}

.submit-terminal .terminal-textarea {
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
}

.submit-terminal .form-label {
    color: #e6edf3 !important;
    font-weight: 500;
}

.submit-terminal .form-text {
    color: #8b949e !important;
    font-size: 0.875rem;
}

[data-mdb-theme="dark"] .submit-terminal {
    background: #0d1117;
    border-color: rgba(255, 255, 255, 0.15);
}

[data-mdb-theme="dark"] .submit-terminal-header {
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

[data-mdb-theme="dark"] .submit-terminal-content {
    background: #010409;
}

[data-mdb-theme="dark"] .submit-terminal .terminal-input,
[data-mdb-theme="dark"] .submit-terminal .terminal-textarea {
    background: #0d1117 !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #f0f6fc !important;
}

[data-mdb-theme="dark"] .submit-terminal .form-label {
    color: #f0f6fc !important;
}

[data-mdb-theme="dark"] .submit-terminal .form-text {
    color: #7d8590 !important;
}

[data-mdb-theme="light"] .submit-terminal {
    background: #f6f8fa;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-mdb-theme="light"] .submit-terminal-header {
    background: linear-gradient(135deg, #ffffff 0%, #f6f8fa 100%);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-mdb-theme="light"] .terminal-title {
    color: #24292f;
}

[data-mdb-theme="light"] .submit-terminal-content {
    background: #ffffff;
}

[data-mdb-theme="light"] .submit-terminal .terminal-input,
[data-mdb-theme="light"] .submit-terminal .terminal-textarea {
    background: #f6f8fa !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #24292f !important;
}

[data-mdb-theme="light"] .submit-terminal .terminal-input:focus,
[data-mdb-theme="light"] .submit-terminal .terminal-textarea:focus {
    background: #ffffff !important;
    border-color: var(--mdb-primary) !important;
    color: #24292f !important;
}

[data-mdb-theme="light"] .submit-terminal .form-label {
    color: #24292f !important;
}

[data-mdb-theme="light"] .submit-terminal .form-text {
    color: #656d76 !important;
}

@media (max-width: 768px) {
    .submit-terminal-content {
        padding: 1.5rem;
    }
    .submit-terminal .terminal-textarea {
        font-size: 0.85rem;
    }
    .terminal-title {
        font-size: 0.8rem;
        margin: 0 0.5rem;
    }
}

.submit-terminal:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

.submit-terminal:hover .terminal-btn {
    opacity: 0.8;
}

.submit-terminal:hover .terminal-title {
    color: var(--mdb-primary);
}

.was-validated .submit-terminal .terminal-input:valid,
.was-validated .submit-terminal .terminal-textarea:valid {
    border-color: #28a745 !important;
}

.was-validated .submit-terminal .terminal-input:invalid,
.was-validated .submit-terminal .terminal-textarea:invalid {
    border-color: #dc3545 !important;
}

/* ========== Quote detail display - quotes/quote.html ========== */
.quote-container {
    background: #1a1a1a;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.irc-header {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.irc-window-controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.control-btn.close { background: #ff5f57; }
.control-btn.minimize { background: #ffbd2e; }
.control-btn.maximize { background: #28ca42; }

.irc-title {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    flex: 1;
    text-align: center;
    margin: 0 1rem;
}

.irc-content {
    background: #0d1117;
    padding: 1.5rem;
    min-height: 200px;
}

.quote-text {
    color: #e6edf3;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    background: transparent;
    border: none;
    padding: 0;
}

[data-mdb-theme="dark"] .quote-container {
    background: #0d1117;
    border-color: rgba(255, 255, 255, 0.15);
}

[data-mdb-theme="dark"] .irc-header {
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

[data-mdb-theme="dark"] .irc-content {
    background: #010409;
}

[data-mdb-theme="dark"] .quote-text {
    color: #f0f6fc;
}

[data-mdb-theme="light"] .quote-container {
    background: #f6f8fa;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-mdb-theme="light"] .irc-header {
    background: linear-gradient(135deg, #ffffff 0%, #f6f8fa 100%);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-mdb-theme="light"] .irc-title {
    color: #24292f;
}

[data-mdb-theme="light"] .irc-content {
    background: #ffffff;
}

[data-mdb-theme="light"] .quote-text {
    color: #24292f;
}

@media (max-width: 768px) {
    .irc-content {
        padding: 1rem;
    }
    .quote-text {
        font-size: 0.85rem;
    }
    .irc-title {
        font-size: 0.8rem;
        margin: 0 0.5rem;
    }
}

.quote-container:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

/* Copy feedback toast (quote detail page; quote.css loaded only on quote pages) */
.copy-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--mdb-success);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    z-index: 1050;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.copy-feedback.show {
    opacity: 1;
    transform: translateX(0);
}
