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

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #0F1115;
}

::-webkit-scrollbar-thumb {
    background: #232733;
    border-radius: 6px;
    border: 2px solid #0F1115;
}

::-webkit-scrollbar-thumb:hover {
    background: #2A2F3A;
}

/* Selection Styling */
::selection {
    background: rgba(122, 183, 255, 0.3);
    color: #E6EAF0;
}

::-moz-selection {
    background: rgba(122, 183, 255, 0.3);
    color: #E6EAF0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.65;
    color: #E6EAF0;
    background-color: #0F1115;
    font-weight: 400;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.app-header {
    background: #141821;
    color: #E6EAF0;
    padding: 1rem 2rem;
    border-bottom: 1px solid #232733;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #E6EAF0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Coin Display */
.coin-display {
    display: flex !important;
    visibility: visible !important;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid #232733;
}
    font-weight: bold;
}

.coin-icon {
    font-size: 20px;
}

#coin-balance {
    font-size: 18px;
    min-width: 30px;
    text-align: right;
}

#coin-balance.low-balance {
    color: #ff6b6b;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-buy-coins {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: #E6EAF0;
    border: 2px solid #232733;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #2A2F3A;
}

.btn-buy-coins {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    color: #1a1a1a;
    font-weight: 700;
    animation: goldenPulse 2s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

@keyframes goldenPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 25px rgba(255, 215, 0, 0.7), 0 0 30px rgba(255, 165, 0, 0.5);
    }
}

.btn-buy-coins:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6), 0 0 40px rgba(255, 165, 0, 0.6);
}

/* Two-Pane Layout */
.two-pane-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    margin-top: 20px;
    height: calc(100vh - 120px);
}

.three-pane-layout {
    display: grid;
    grid-template-columns: 350px 1fr 280px;
    gap: 20px;
    margin-top: 20px;
    height: calc(100vh - 120px);
}

.left-pane, .right-pane, .middle-pane, .ticker-pane {
    background: #181D27;
    border-radius: 12px;
    border: 1px solid #232733;
    overflow: hidden;
}

.left-pane {
    display: flex;
    flex-direction: column;
}

.left-pane h2 {
    padding: 20px;
    background: #0F1115;
    border-bottom: 1px solid #232733;
    color: #E6EAF0;
    font-weight: 600;
}

.article-list {
    overflow-y: auto;
    flex: 1;
}

.article-item {
    padding: 16px 20px;
    border-bottom: 1px solid #232733;
    cursor: pointer;
    transition: all 0.2s ease;
}

.article-item:hover {
    background: #1E2430;
}

.article-item.selected {
    background: #1E2430;
    border-left: 4px solid #7AB7FF;
}

.article-item:focus {
    outline: 2px solid #7AB7FF;
    outline-offset: -2px;
}

.article-item h3 {
    font-size: 16px;
    margin-bottom: 4px;
    color: #E6EAF0;
    font-weight: 600;
}

.article-item .meta {
    font-size: 12px;
    color: #9AA3B2;
}

.article-item .tag {
    display: inline-block;
    background: #232733;
    color: #9AA3B2;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 4px;
    margin-top: 4px;
}

.right-pane, .middle-pane {
    position: relative;
    padding: 30px;
    overflow-y: auto;
}

.ticker-pane {
    padding: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.ticker-sidebar {
    padding: 20px;
}

.ticker-sidebar h3 {
    color: #7AB7FF;
    margin-bottom: 16px;
    font-size: 18px;
}

.ticker-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #9AA3B2;
}

.ticker-placeholder h3 {
    color: #7AB7FF;
    margin-bottom: 12px;
}

.ticker-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ticker-item {
    background: #232733;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #2A2F3A;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ticker-item:hover {
    background: #2A2F3A;
    border-color: #7AB7FF;
    transform: translateX(-2px);
}

.ticker-symbol {
    font-weight: 600;
    color: #E6EAF0;
    font-size: 15px;
    display: block;
    margin-bottom: 4px;
}

.ticker-loading {
    text-align: center;
    padding: 20px;
    color: #9AA3B2;
    font-size: 14px;
}

.ticker-error {
    text-align: center;
    padding: 20px;
    color: #FCA5A5;
    font-size: 14px;
}

.article-content .placeholder {
    text-align: center;
    padding: 100px 20px;
    color: #9AA3B2;
}

/* Content Type Specific Styling */
.content-meeting-minutes .agenda-item,
.content-action-tracker .task-item,
.content-knowledge-base .qa-item,
.content-chat-thread .message-item,
.content-podcast-highlights .highlight-item {
    background: #181D27;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 8px;
    border-left: 4px solid #7AB7FF;
    border: 1px solid #232733;
    border-left: 4px solid #7AB7FF;
}

.content-meeting-minutes h3,
.content-action-tracker h3,
.content-knowledge-base h3 {
    color: #7AB7FF;
    margin-bottom: 12px;
    font-weight: 600;
}

.quote {
    border-left: 3px solid #232733;
    padding-left: 16px;
    font-style: italic;
    color: #9AA3B2;
    margin: 12px 0;
}

.speaker-name {
    font-weight: 600;
    color: #667eea;
}

/* Admin Layout */
.admin-layout {
    display: grid;
    grid-template-columns: 320px 1fr 380px;
    gap: 20px;
    margin-top: 20px;
    height: calc(100vh - 140px);
}

.admin-col-list,
.admin-col-viewer,
.admin-col-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.admin-col-list h2,
.admin-col-viewer h2,
.admin-col-form h2 {
    flex-shrink: 0;
    margin-bottom: 16px;
}
.admin-section {
    background: #181D27;
    border-radius: 12px;
    border: 1px solid #232733;
    padding: 24px;
}

.admin-section h2 {
    margin-bottom: 20px;
    color: #E6EAF0;
    font-weight: 600;
}

.transcript-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding-right: 4px;
    min-height: 0;
}

.transcript-item {
    padding: 12px 16px;
    border: 1px solid #232733;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #181D27;
    flex-shrink: 0;
}

.transcript-item:hover {
    border-color: #2A2F3A;
    background: #1E2430;
}

.transcript-item.selected {
    border-color: #7AB7FF;
    background: #1E2430;
}

.transcript-item:focus-within {
    outline: 2px solid #7AB7FF;
    outline-offset: 2px;
}

.transcript-viewer {
    flex: 1;
    background: #181D27;
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
    min-height: 0;
    border: 1px solid #232733;
}

.transcript-viewer .empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9AA3B2;
    font-style: italic;
}

.transcript-viewer .transcript-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #232733;
}

.transcript-viewer .transcript-header h3 {
    margin: 0 0 8px 0;
    color: #E6EAF0;
    font-weight: 600;
}

.transcript-viewer .transcript-meta {
    font-size: 14px;
    color: #9AA3B2;
}

.transcript-viewer .transcript-meta div {
    margin-bottom: 4px;
}

.transcript-viewer .transcript-content {
    font-size: 15px;
    line-height: 1.7;
    color: #DDE1E8;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 70ch;
}

.transcript-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #E6EAF0;
    line-height: 1.4;
}

.transcript-item .meta {
    font-size: 12px;
    color: #9AA3B2;
    margin-bottom: 6px;
}

.transcript-item p {
    font-size: 12px;
    color: #9AA3B2;
    margin: 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Form Styling */
.conversion-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    min-height: 0;
    padding-right: 4px;
}

.form-group {
    margin-bottom: 0;
    flex-shrink: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #E6EAF0;
}

.input-field {
    width: 100%;
    padding: 12px;
    border: 1px solid #232733;
    border-radius: 8px;
    font-size: 14px;
    background: #0F1115;
    color: #E6EAF0;
    transition: all 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: #7AB7FF;
    box-shadow: 0 0 0 3px rgba(122, 183, 255, 0.1);
}

.input-field::placeholder {
    color: #9AA3B2;
}

textarea.input-field {
    resize: vertical;
    font-family: inherit;
}

.result-preview {
    margin-top: 24px;
    padding: 20px;
    background: #181D27;
    border-radius: 8px;
    border: 1px solid #232733;
}

.result-preview h3 {
    margin-bottom: 12px;
    color: #E6EAF0;
}

.result-preview pre {
    background: #0F1115;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.6;
    color: #DDE1E8;
    border: 1px solid #232733;
}

/* Messages */
.message {
    padding: 12px 20px;
    border-radius: 8px;
    margin: 16px 0;
    display: none;
}

.message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #86EFAC;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #FCA5A5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.message.info {
    background: rgba(122, 183, 255, 0.1);
    color: #7AB7FF;
    border: 1px solid rgba(122, 183, 255, 0.3);
}

.loading {
    text-align: center;
    padding: 40px;
    color: #9AA3B2;
}

/* Auth Page */
.auth-page {
    background: #0F1115;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.auth-card {
    background: #181D27;
    border-radius: 16px;
    padding: 40px;
    border: 1px solid #232733;
}

.auth-card h1 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #E6EAF0;
    font-weight: 600;
}

.auth-card .subtitle {
    color: #9AA3B2;
    margin-bottom: 32px;
}

#phone-input-section,
#otp-input-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .two-pane-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .left-pane {
        max-height: 400px;
    }
    
    .admin-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .container {
        padding: 10px;
    }
}

/* Demo Page Styles */
.demo-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    height: calc(100vh - 100px);
    background: #0F1115;
}

.demo-sidebar {
    background: #181D27;
    border-right: 1px solid #232733;
    padding: 24px 0;
    overflow-y: auto;
}

.demo-nav-item {
    padding: 14px 24px;
    color: #9AA3B2;
    text-decoration: none;
    display: block;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 15px;
    font-weight: 500;
}

.demo-nav-item:hover {
    background: rgba(122, 183, 255, 0.1);
    color: #E6EAF0;
    border-left-color: #7AB7FF;
}

.demo-nav-item.active {
    background: rgba(122, 183, 255, 0.15);
    color: #7AB7FF;
    border-left-color: #7AB7FF;
    font-weight: 600;
}

.demo-content {
    overflow-y: auto;
    padding: 32px;
    background: #0F1115;
}

.demo-display {
    max-width: 1200px;
    margin: 0 auto;
}

.demo-display .loading {
    color: #9AA3B2;
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
}

/* Demo specific content styling */
.demo-display details {
    transition: all 0.2s ease;
}

.demo-display details[open] {
    margin-bottom: 24px;
}

.demo-display summary:hover {
    color: #7AB7FF;
}

.demo-display summary::marker {
    color: #7AB7FF;
}

/* Transaction History Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #1A1F2E;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #232733;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    height: fit-content;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #232733;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #E6EAF0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #9AA3B2;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #E6EAF0;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(80vh - 100px);
}

.transaction-item {
    background: #141821;
    border: 1px solid #232733;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.transaction-item:hover {
    border-color: #2A2F3A;
    background: #1A1F2E;
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.transaction-amount {
    font-size: 1.25rem;
    font-weight: 700;
}

.transaction-amount.positive {
    color: #4CAF50;
}

.transaction-amount.negative {
    color: #ff6b6b;
}

.transaction-type {
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.transaction-type.debit {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

.transaction-type.credit {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.transaction-description {
    color: #9AA3B2;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.transaction-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #6c757d;
}

.transaction-balance {
    color: #7AB7FF;
}

#transaction-list .empty-state {
    text-align: center;
    padding: 40px;
    color: #9AA3B2;
}

/* ========== POST TO FEED STYLES ========== */
.btn-post-to-feed {
    padding: 8px 16px;
    background: linear-gradient(135deg, #7AB7FF 0%, #5A9FFF 100%);
    color: #0F1115;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-post-to-feed:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(122, 183, 255, 0.3);
}

.btn-post-to-feed:active {
    transform: translateY(0);
}

.btn-share-article {
    padding: 8px 16px;
    background: linear-gradient(135deg, #64B5F6 0%, #42A5F5 100%);
    color: #0F1115;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-share-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

.btn-share-article:active {
    transform: translateY(0);
}

/* Feed Item Styles */
.feed-item {
    background: #141821;
    border: 1px solid #232733;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.feed-item:hover {
    border-color: #2A2F3A;
    background: #1A1F2E;
}

.ticker-badge {
    background: linear-gradient(135deg, #7AB7FF 0%, #5A9FFF 100%);
    color: #0F1115;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.btn-view-article {
    padding: 6px 12px;
    background: transparent;
    color: #7AB7FF;
    border: 1px solid #7AB7FF;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-view-article:hover {
    background: rgba(122, 183, 255, 0.1);
    border-color: #5A9FFF;
    color: #5A9FFF;
}

/* Form Group Styles for Post Modal */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #E6EAF0;
    font-size: 0.95rem;
}

.form-group small {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
}

/* Load More Button */
.btn-load-more {
    width: 100%;
    padding: 12px 24px;
    margin-top: 16px;
    background: #232733;
    color: #7AB7FF;
    border: 2px solid #2A2F3A;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-load-more:hover:not(:disabled) {
    background: #2A2F3A;
    border-color: #7AB7FF;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

