/* Limit Notification Banner */
.limit-notification {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    border: 1px solid #dc2626;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease;
}

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

.limit-notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.limit-icon { font-size: 1.5rem; flex-shrink: 0; }

.limit-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.limit-text strong { color: #fecaca; font-size: 0.95rem; }
.limit-text span { color: #fca5a5; font-size: 0.85rem; }

.limit-upgrade-btn {
    background: #fff;
    color: #991b1b;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s;
}

.limit-upgrade-btn:hover { transform: scale(1.05); }

.limit-dismiss {
    background: none;
    border: none;
    color: #fca5a5;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.limit-dismiss:hover { color: #fff; }

/* Usage Card */
.usage-card {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.usage-plan {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.plan-emoji { font-size: 2rem; }

.plan-info {
    display: flex;
    flex-direction: column;
}

.plan-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
}

.plan-cycle {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.upgrade-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Usage Meters */
.usage-meters {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.usage-meter {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.meter-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

.meter-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.meter-value.over-limit {
    color: #ef4444 !important;
    font-weight: 700;
}

.meter-bar {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 4px;
    transition: width 0.3s ease, background 0.3s ease;
}

.meter-fill.warning {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.meter-fill.danger {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

/* Paused Warning */
.usage-warning {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.usage-warning .warning-icon { font-size: 1.5rem; }

.warning-content {
    display: flex;
    flex-direction: column;
}

.warning-content strong { color: #ef4444; }
.warning-content span { font-size: 0.85rem; color: rgba(255,255,255,0.6); }

/* Responsive */
@media (max-width: 600px) {
    .usage-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .upgrade-btn {
        width: 100%;
        justify-content: center;
    }

    .limit-notification-content {
        flex-wrap: wrap;
    }

    .limit-upgrade-btn {
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #121e34;
    color: #ffffff;
}

/* Discord Button Below Server Info */
.btn-discord {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.6rem 1rem;
    background: #5865F2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-discord:hover {
    background: #4752C4;
    transform: translateY(-1px);
}

.btn-discord i {
    font-size: 1rem;
}

/* Gradient Background */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 20s infinite ease-in-out;
}

.orb1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(45deg, #03dac2, #05f4e0);
    top: -200px;
    right: -200px;
}

.orb2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(45deg, #03dac2, #1de9b6);
    bottom: -150px;
    left: -150px;
    animation-delay: 5s;
}

.orb3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, #03dac2, #00bfa5);
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(100px, -100px) scale(1.1); }
    66% { transform: translate(-100px, 100px) scale(0.9); }
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(18, 30, 52, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(3, 218, 194, 0.1);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(3, 218, 194, 0.1);
}

.sidebar-logo {
    font-size: 1.75rem;
    font-weight: 700;
}

.project-badge {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(3, 218, 194, 0.1);
    border: 1px solid rgba(3, 218, 194, 0.3);
    border-radius: 10px;
    font-size: 0.875rem;
    color: #03dac2;
}

/* Server Info in Sidebar */
.server-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(3, 218, 194, 0.1);
    border: 1px solid rgba(3, 218, 194, 0.2);
    border-radius: 12px;
}

.server-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(3, 218, 194, 0.3), rgba(88, 101, 242, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #03dac2;
    overflow: hidden;
    flex-shrink: 0;
}

.server-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.server-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    position: relative;
}

.nav-item:hover {
    background: rgba(3, 218, 194, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(3, 218, 194, 0.1);
    color: #03dac2;
    border-left-color: #03dac2;
}

.nav-icon {
    font-size: 1.5rem;
    width: 24px;
    text-align: center;
}

.coming-soon-badge {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.5);
    border-radius: 8px;
    color: #ffc107;
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    max-width: calc(100% - 280px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #03dac2;
}
/* Dropdown styling */
.form-select {
    background-color: #1a1a2e;
    color: #ffffff;
    border: 1px solid rgba(3, 218, 194, 0.3);
}

.form-select option {
    background-color: #1a1a2e;
    color: #ffffff;
    padding: 0.5rem;
}

.form-select option:disabled {
    color: rgba(255, 255, 255, 0.4);
}

.form-select option:checked {
    background-color: rgba(3, 218, 194, 0.3);
}
/* Login Screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #121e34;
}

.login-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(3, 218, 194, 0.2);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.login-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #03dac2;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(3, 218, 194, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    color: white;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #03dac2;
    background: rgba(255, 255, 255, 0.08);
}

.form-select {
    cursor: pointer;
}

.form-select option:disabled {
    color: #666;
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(3, 218, 194, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    min-height: 200px;
    resize: vertical;
    font-family: 'Courier New', monospace;
    color: white;
}

.form-textarea:focus {
    outline: none;
    border-color: #03dac2;
    background: rgba(255, 255, 255, 0.08);
}

.char-counter {
    float: right;
    font-size: 0.85rem;
    color: rgba(3, 218, 194, 0.7);
    font-weight: normal;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-primary {
    background: #03dac2;
    color: #121e34;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(3, 218, 194, 0.4);
}

.btn-secondary {
    background: rgba(3, 218, 194, 0.1);
    color: #03dac2;
    border: 2px solid rgba(3, 218, 194, 0.3);
}

.btn-secondary:hover {
    background: rgba(3, 218, 194, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #03dac2 0%, #00bfa5 100%);
    color: #121e34;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(3, 218, 194, 0.4);
}

.btn-danger {
    background: #fc8181;
    color: white;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: none;
}

.alert.success {
    background: rgba(3, 218, 194, 0.2);
    border: 2px solid #03dac2;
    color: #03dac2;
}

.alert.error {
    background: rgba(252, 129, 129, 0.2);
    border: 2px solid #fc8181;
    color: #fc8181;
}

/* Analytics Styles */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(3, 218, 194, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.metric-card:hover {
    border-color: #03dac2;
    box-shadow: 0 4px 12px rgba(3, 218, 194, 0.15);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.metric-icon {
    font-size: 2rem;
}

.metric-trend {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.metric-trend.positive {
    background: rgba(3, 218, 194, 0.2);
    color: #03dac2;
}

.metric-trend.negative {
    background: rgba(252, 129, 129, 0.2);
    color: #fc8181;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #03dac2;
    margin-bottom: 0.5rem;
}

.metric-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.chart-section, .list-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(3, 218, 194, 0.1);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #03dac2;
    margin-bottom: 1.5rem;
}

.vibe-check {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(3, 218, 194, 0.2);
    border-radius: 15px;
    margin-bottom: 2rem;
}

.vibe-emoji {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.vibe-mood {
    font-size: 1.5rem;
    font-weight: 700;
    color: #03dac2;
    text-transform: capitalize;
}

.vibe-description {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

.sentiment-bar {
    display: flex;
    height: 40px;
    border-radius: 20px;
    overflow: hidden;
    margin: 1rem 0;
}

.sentiment-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.sentiment-segment:hover {
    filter: brightness(1.2);
}

.sentiment-positive {
    background: linear-gradient(135deg, #03dac2, #00bfa5);
}

.sentiment-neutral {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.sentiment-negative {
    background: linear-gradient(135deg, #fc8181, #f56565);
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    transition: all 0.3s;
}

.list-item:hover {
    background: rgba(3, 218, 194, 0.05);
    border-left: 3px solid #03dac2;
}

.list-item-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: #03dac2;
    width: 40px;
}

.list-item-name {
    flex: 1;
    font-weight: 600;
}

.list-item-count {
    background: rgba(3, 218, 194, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    color: #03dac2;
}

.two-column-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

/* Info Banner */
.info-banner {
    background: rgba(3, 218, 194, 0.1);
    border: 1px solid rgba(3, 218, 194, 0.3);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-banner-icon {
    font-size: 2rem;
    color: #03dac2;
}

.info-banner-text {
    flex: 1;
    color: rgba(255, 255, 255, 0.8);
}

.info-banner-text strong {
    color: #03dac2;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(3, 218, 194, 0.05);
    border: 1px solid rgba(3, 218, 194, 0.2);
    border-radius: 10px;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.stat-value {
    color: #03dac2;
    font-weight: 700;
    font-size: 1.1rem;
}

.action-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.action-bar .btn {
    flex: 0 0 auto;
    width: auto;
}

/* Search Bar */
.search-bar {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(3, 218, 194, 0.2);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(3, 218, 194, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    color: white;
}

.search-input:focus {
    outline: none;
    border-color: #03dac2;
}

/* Knowledge List */
.knowledge-list {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(3, 218, 194, 0.1);
    border-radius: 15px;
    padding: 2rem;
}

.knowledge-item {
    border: 2px solid rgba(3, 218, 194, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.02);
}

.knowledge-item:hover {
    border-color: #03dac2;
    box-shadow: 0 4px 12px rgba(3, 218, 194, 0.15);
}

.knowledge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.knowledge-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #03dac2;
}

.knowledge-actions {
    display: flex;
    gap: 0.5rem;
}

.knowledge-url {
    font-size: 0.875rem;
    color: #03dac2;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.knowledge-content {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-top: 0.75rem;
}

.knowledge-char-count {
    font-size: 0.85rem;
    color: rgba(3, 218, 194, 0.6);
    margin-top: 0.5rem;
}

/* Config Section */
.config-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(3, 218, 194, 0.1);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.config-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #03dac2;
}

.config-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.personality-description {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(3, 218, 194, 0.05);
    border-left: 3px solid #03dac2;
    border-radius: 5px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-style: italic;
}

/* Slider */
.slider-container {
    margin: 1.5rem 0;
}

.slider {
    width: 100%;
    height: 6px;
    background: rgba(3, 218, 194, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #03dac2;
    border-radius: 50%;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #03dac2;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.slider-value {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #03dac2;
}

/* Keyword Tags */
.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.keyword-tag {
    background: rgba(3, 218, 194, 0.1);
    border: 2px solid rgba(3, 218, 194, 0.3);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.keyword-tag:hover {
    background: rgba(3, 218, 194, 0.2);
    border-color: #03dac2;
}

.keyword-tag button {
    background: none;
    border: none;
    color: #fc8181;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    font-weight: bold;
}

.keyword-input-group {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 30, 52, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(18, 30, 52, 0.98);
    border: 1px solid rgba(3, 218, 194, 0.2);
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #03dac2;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
}

.modal-close:hover {
    color: #03dac2;
}

/* Loading & Empty States */
.loading {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.5);
}

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

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #03dac2;
}

.empty-state-text {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

/* Page Sections */
.page-section {
    display: none;
}

.page-section.active {
    display: block;
}

/* Coming Soon Page */
.coming-soon-container {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.coming-soon-icon {
    font-size: 6rem;
    margin-bottom: 2rem;
}

.coming-soon-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #03dac2;
    margin-bottom: 1rem;
}

.coming-soon-text {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.coming-soon-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-preview {
    background: rgba(3, 218, 194, 0.05);
    border: 1px solid rgba(3, 218, 194, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.feature-preview:hover {
    background: rgba(3, 218, 194, 0.1);
    border-color: #03dac2;
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.feature-text {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        max-width: 100%;
    }

    .two-column-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@keyframes popIn {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes popOut {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}




/* Admin Mode Styling */
body.admin-mode .sidebar {
    border-right: 3px solid #ff4757 !important;
}

body.admin-mode .server-icon {
    border: 3px solid #ff4757 !important;
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.4) !important;
}

@keyframes pulse-admin {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Admin badge pulse */
#adminBadge {
    animation: pulse-admin 2s infinite;
}


/* ============= CHANNEL ANALYTICS STYLES ============= */

.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.channel-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(3, 218, 194, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.channel-card:hover {
    border-color: #03dac2;
    box-shadow: 0 4px 12px rgba(3, 218, 194, 0.15);
}

.channel-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #03dac2;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(3, 218, 194, 0.2);
}

.channel-stats-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.25rem;
}

.channel-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.channel-stat .stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.channel-stat .stat-value {
    color: #03dac2;
    font-weight: 700;
    font-size: 1.1rem;
}

.channel-topics {
    background: rgba(3, 218, 194, 0.05);
    border-radius: 10px;
    padding: 1rem;
}

.topic-tag-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topic-tag-inline:last-child {
    border-bottom: none;
}

.topic-rank {
    color: #03dac2;
    font-weight: 700;
    font-size: 0.85rem;
    min-width: 30px;
}

.topic-name {
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.topic-count {
    background: rgba(3, 218, 194, 0.2);
    color: #03dac2;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

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

    .channel-stats-row {
        flex-direction: column;
        gap: 0.5rem;
    }
}