:root {
    --bg-color: #121212;
    --text-color: #000000;
    --primary-color: #00bcd4;
    --secondary-color: #1e1e1e;
    --accent-color: #3a3a3a;
    --message-user-bg: linear-gradient(135deg, #2563eb 0%, #3730a3 100%);
    --message-user-text: #ffffff;
    --message-system-bg: #ffffff;
    --message-user-bg-dark: linear-gradient(135deg, #1e3a8a 0%, #1e2563 100%);
    --message-user-text-dark: #ffffff;
    --message-system-bg-dark: #ffffff;
    --loading-color: #007bff;
    --loading-bg: rgba(0, 123, 255, 0.1);
}

/* General styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #000000;
    margin: 0;
    padding: 0;
}

.dark-theme {
    background-color: #333;
    color: #f0f0f0;
}

.container {
    width: 80%;
    margin: 0 auto;
    padding: 20px;
}

.tabs {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 5px;
}

.tab-btn {
    padding: 8px 16px;
    cursor: pointer;
    border: none;
    background-color: #ddd;
    transition: background-color 0.3s;
    white-space: nowrap;
    border-radius: 4px;
    min-width: fit-content;
    flex-shrink: 0;
}

.tab-btn.active {
    background-color: #bbb;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.chat-box {
    border: 8px solid #06022cef;
    padding: 10px;
    height: 600px;
    overflow-y: auto;
    background-color: #ffffff;
}

/* Dark theme support for chat box */
body.dark-mode .chat-box,
body.dark-theme .chat-box {
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border: 8px solid #333;
    color: #e0e0e0;
}

.input-area {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.input-area input {
    width: 80%;
    padding: 10px;
    border: 1px solid #ccc;
}

/* Dark theme support for input area */
body.dark-mode .input-area input,
body.dark-theme .input-area input {
    background-color: #2d2d2d;
    border: 1px solid #555;
    color: #e0e0e0;
}

body.dark-mode .input-area input:focus,
body.dark-theme .input-area input:focus {
    background-color: #333;
    border-color: #4a90e2;
    color: #fff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

.input-area button {
    padding: 10px 20px;
    border: none;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
}

.input-area button:hover {
    background-color: #0056b3;
}

.feedback-buttons {
    display: flex;
    justify-content: normal;
    margin-top: 10px;
}

.feedback-buttons button {
    padding: 5px 10px;
    border: none;
    cursor: pointer;
}

#theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    border: none;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
    width: auto;
    min-width: 80px;
    max-width: 150px;
    border-radius: 5px;
}

#theme-toggle:hover {
    background-color: #0056b3;
}

/* URL Upload section styles */
#upload {
    margin-top: 20px;
}

#upload h2 {
    margin-bottom: 20px;
    color: #333;
}

#upload h3 {
    margin: 30px 0 15px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.dark-theme #upload h2,
.dark-theme #upload h3 {
    color: #f0f0f0;
    border-color: #555;
}

/* URL entry styles */
#url-entries {
    margin-bottom: 20px;
}

.url-entry {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ddd;
}

.url-entry:last-child {
    border-bottom: none;
}

.url-entry input[type="url"],
.url-entry select,
.url-entry input[type="text"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.url-entry input[type="url"] {
    flex: 3;
    min-width: 250px;
}

.url-entry select {
    flex: 2;
    min-width: 150px;
}

.url-entry input[type="text"] {
    flex: 2;
    min-width: 150px;
}

.remove-url-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.remove-url-btn:hover {
    background-color: #c82333;
}

/* Form controls */
.form-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#add-url-btn {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#add-url-btn:hover {
    background-color: #218838;
}

#submit-urls-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#submit-urls-btn:hover {
    background-color: #0069d9;
}

/* Processing options */
.processing-options {
    margin: 20px 0;
}

#getDataButton {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#getDataButton:hover {
    background-color: #5a6268;
}

/* Data status section */
.data-status-section {
    margin-top: 30px;
}

.status-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#status-filter {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex: 1;
    max-width: 150px;
}

#search-filter {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex: 2;
}

/* Data table */
.data-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

#processed-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#processed-data-table th,
#processed-data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#processed-data-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.dark-theme #processed-data-table th {
    background-color: #444;
    color: #f0f0f0;
}

#processed-data-table tr:hover {
    background-color: #f5f5f5;
}

.dark-theme #processed-data-table tr:hover {
    background-color: #555;
}

.status-success {
    background-color: rgba(40, 167, 69, 0.1);
}

.status-failed {
    background-color: rgba(220, 53, 69, 0.1);
}

.dark-theme .status-success {
    background-color: rgba(40, 167, 69, 0.2);
}

.dark-theme .status-failed {
    background-color: rgba(220, 53, 69, 0.2);
}

.url-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-data {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination button:hover {
    background-color: #f0f0f0;
}

.pagination button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination button:disabled {
    background-color: #f0f0f0;
    color: #aaa;
    cursor: not-allowed;
}

.dark-theme .pagination button {
    background-color: #444;
    border-color: #555;
    color: #f0f0f0;
}

.dark-theme .pagination button:hover {
    background-color: #555;
}

.dark-theme .pagination button.active {
    background-color: #007bff;
}

.dark-theme .pagination button:disabled {
    background-color: #333;
    color: #777;
}

/* CoinMarketCap section styles */
#coinmarketcap {
    margin-top: 20px;
}

#coinmarketcap input {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
}

#coinmarketcap button {
    padding: 10px 20px;
    border: none;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-right: 10px;
}

#coinmarketcap button:hover {
    background-color: #0056b3;
}

#coinmarketcap-data {
    margin-top: 20px;
    white-space: pre-wrap;
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

#coinmarketcap-data h2 {
    margin-top: 20px;
    color: #007bff;
}

#coinmarketcap-data p {
    margin: 5px 0;
}

#coinmarketcap-data ul {
    list-style-type: disc;
    margin-left: 20px;
}

#coinmarketcap-data ul li {
    margin: 5px 0;
}

.message {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 4px;
    position: relative; /* Add this for absolute positioning of the divider */
}

.message::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1); /* Light grey divider */
    /* Adjust color for dark theme if needed using CSS variables */
}

.user-message {
    background: var(--message-user-bg, linear-gradient(135deg, #2563eb 0%, #3730a3 100%));
    color: var(--message-user-text, #ffffff);
    text-align: right;
    border-radius: 18px 18px 4px 18px;
    padding: 12px 16px;
    margin: 8px 0;
    max-width: 75%;
    margin-left: auto;
    border: 1px solid rgba(0, 188, 212, 0.2);
}

.system-message {
    background-color: var(--message-system-bg, #ffffff);
    text-align: left;
    padding: 16px 0;
    margin: 8px 0;
    border: none;
    border-radius: 0;
}

/* Add styling for HTML elements within system messages */
.system-message h1, 
.system-message h2, 
.system-message h3 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: bold;
    color: #333;
    line-height: 1.3;
}

.system-message h1 {
    font-size: 28px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

.system-message h2 {
    font-size: 24px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 6px;
}

.system-message h3 {
    font-size: 20px;
}

.system-message p {
    margin-bottom: 16px;
    line-height: 1.6;
}

.system-message ul, 
.system-message ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.system-message li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.system-message strong, 
.system-message b {
    font-weight: bold;
}

/* Enhanced table styling for better data display */
.system-message table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.system-message table th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.system-message table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.system-message table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.system-message table tr:hover {
    background-color: #e9ecef;
    transition: background-color 0.2s ease;
}

/* Image and visual content styling */
.system-message img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: block;
}

.system-message figure {
    margin: 20px 0;
    text-align: center;
}

.system-message figcaption {
    font-style: italic;
    color: #666;
    font-size: 14px;
    margin-top: 8px;
}

/* Chart and visualization containers */
.system-message .chart-container,
.system-message .visualization-container {
    margin: 20px 0;
    padding: 16px;
    background-color: #fafafa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.system-message .chart-container canvas,
.system-message .visualization-container canvas {
    max-width: 100%;
    height: auto;
}

/* SVG styling for vector graphics */
.system-message svg {
    max-width: 100%;
    height: auto;
    margin: 16px 0;
}

/* Blockquote styling for highlighted content */
.system-message blockquote {
    border-left: 4px solid #007bff;
    margin: 20px 0;
    padding: 16px 20px;
    background-color: #f8f9fa;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}

/* Table responsiveness utility */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-responsive table {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Modal styles for expanded images */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
}

/* Export buttons styling */
.export-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
    justify-content: flex-end;
}

.export-btn {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    color: #495057;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.export-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.export-btn i {
    font-size: 11px;
}

.export-btn.html {
    border-color: #fd7e14;
    color: #fd7e14;
}

.export-btn.html:hover {
    background-color: #fd7e14;
    color: white;
}

.export-btn.pdf {
    border-color: #dc3545;
    color: #dc3545;
}

.export-btn.pdf:hover {
    background-color: #dc3545;
    color: white;
}

.export-btn.markdown {
    border-color: #6f42c1;
    color: #6f42c1;
}

.export-btn.markdown:hover {
    background-color: #6f42c1;
    color: white;
}

/* Code block styling for syntax highlighting */
.system-message pre {
    background-color: #282c34;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    overflow: auto;
    max-width: 100%;
}

.system-message code {
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.system-message pre code {
    display: block;
    padding: 0;
    background: none;
    white-space: pre;
    overflow-x: auto;
}

.system-message p code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Dark theme adjustments */
.dark-theme .system-message {
    background-color: #ffffff;
    color: #333;
}

.dark-theme .system-message h1,
.dark-theme .system-message h2,
.dark-theme .system-message h3 {
    color: #333;
    border-color: #e0e0e0;
}

.dark-theme .system-message table th {
    background-color: #f0f0f0;
    color: #333;
}

.dark-theme .system-message table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.dark-theme .system-message table tr:hover {
    background-color: #e9ecef;
}

.dark-theme .system-message pre {
    background-color: #282c34;
    border: 1px solid #444;
    color: #f8f8f2;
}

.dark-theme .system-message p code {
    background-color: rgba(0, 0, 0, 0.1);
    color: #e0e0e0;
}

.dark-theme .user-message,
body.dark-mode .user-message {
    background: var(--message-user-bg-dark, linear-gradient(135deg, #1e3a8a 0%, #1e2563 100%));
    color: var(--message-user-text-dark, #ffffff);
}

/* Dark theme export buttons */
.dark-theme .export-buttons {
    border-color: #444;
}

.dark-theme .export-btn {
    background-color: #444;
    border-color: #555;
    color: #f0f0f0;
}

.dark-theme .export-btn:hover {
    background-color: #555;
}

.dark-theme .export-btn.html:hover {
    background-color: #fd7e14;
    border-color: #fd7e14;
}

.dark-theme .export-btn.pdf:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

.dark-theme .export-btn.markdown:hover {
    background-color: #6f42c1;
    border-color: #6f42c1;
}

/* Loading indicator styles */
.thinking {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--loading-bg);
    color: var(--loading-color);
    font-weight: 500;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

/* Searching message styles */
.searching-message {
    background-color: rgba(25, 118, 210, 0.1);
    border-left: 4px solid #1976d2;
    padding: 15px;
    margin-bottom: 20px;
    color: #1976d2;
    font-weight: 500;
}

.dark-theme .searching-message {
    background-color: rgba(66, 165, 245, 0.2);
    border-left: 4px solid #42a5f5;
    color: #42a5f5;
}

.thinking-dots {
    display: inline-flex;
    margin-left: 8px;
}

.thinking-dots span {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: var(--loading-color);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite ease-in-out;
}

.thinking-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.dark-theme .thinking {
    background-color: rgba(0, 123, 255, 0.2);
    color: #4da3ff;
}

.dark-theme .thinking-dots span {
    background-color: #4da3ff;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 10px;
    }
    
    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 5px;
        padding: 0 5px;
    }
    
    .tab-btn {
        padding: 6px 12px;
        font-size: 13px;
        min-width: fit-content;
        flex-shrink: 0;
        margin: 0;
    }
    
    .chat-box {
        height: 70vh; /* Better for mobile viewport */
    }
    
    .input-area {
        flex-direction: column;
    }
    
    .input-area input {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .input-area button {
        width: 100%;
        margin-bottom: 5px;
    }
    
    /* Improved code block display on mobile */
    .system-message pre {
        max-width: 100%;
        overflow-x: auto;
        white-space: pre-wrap;
        word-wrap: break-word;
    }
    
    /* Better table display on mobile */
    .system-message table {
        font-size: 12px;
    }
    
    .system-message table th,
    .system-message table td {
        padding: 8px 12px;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Responsive images and charts */
    .system-message img,
    .system-message canvas,
    .system-message svg {
        max-width: 100%;
        height: auto;
    }
    
    .chart-container,
    .visualization-container {
        padding: 12px;
        margin: 12px 0;
    }
    
    /* Adjust citation styling for mobile */
    .system-message sup {
        font-size: 0.6em;
    }
    
    /* Adjust feedback buttons for mobile */
    .feedback-buttons {
        justify-content: space-around;
    }
    
    .feedback-buttons button {
        padding: 8px 12px;
        font-size: 16px;
    }
    
    /* Mobile export buttons */
    .export-buttons {
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }
    
    .export-btn {
        padding: 8px 12px;
        font-size: 11px;
        flex: 1;
        min-width: 70px;
        justify-content: center;
    }
    
    /* Make theme toggle more accessible on mobile */
    #theme-toggle {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 14px;
        min-width: 70px;
        max-width: 120px;
    }
}

/* Centralized signup CTA styles (moved from templates/base.html)
   The UI team can toggle visibility via `.btn-signup--hidden`. */
.btn-signup {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    color: #0a0e27;
    background: linear-gradient(90deg, #00f2fe 0%, #764ba2 100%);
    box-shadow: 0 8px 20px rgba(118,75,162,0.12);
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}

.btn-signup:hover,
.btn-signup:focus {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(118,75,162,0.18);
    outline: none;
}

.btn-signup--hidden { display: none !important; }

/* Primary submit button used on auth forms (moved from login.html)
   Keeps consistent prominent CTA across login and signup pages */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #764ba2 0%, #00f2fe 100%);
    color: #ffffff;
    padding: 0.875rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-submit:hover::before {
    width: 400px;
    height: 400px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(118, 75, 162, 0.3);
}

/* Loading State */
.btn-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================================================
   RESPONSIVE ENHANCEMENTS FOR STYLES.CSS
   ============================================================================ */

/* Touch-friendly elements */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets on touch devices */
    button,
    .btn,
    a.button,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover states on touch devices */
    *:hover {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Container responsive improvements */
.container {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
}

@media (min-width: 768px) {
    .container {
        width: 90%;
        padding-left: 30px;
        padding-right: 30px;
    }
}

@media (min-width: 1024px) {
    .container {
        width: 80%;
        max-width: 1200px;
    }
}

/* Chat box responsive */
.chat-box {
    height: 400px;
}

@media (min-width: 768px) {
    .chat-box {
        height: 500px;
    }
}

@media (min-width: 1024px) {
    .chat-box {
        height: 600px;
    }
}

/* Tabs responsive */
.tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.tabs::-webkit-scrollbar {
    height: 4px;
}

.tabs::-webkit-scrollbar-thumb {
    background: rgba(0, 188, 212, 0.5);
    border-radius: 2px;
}

/* Tab buttons responsive */
.tab-btn {
    font-size: 14px;
}

@media (min-width: 768px) {
    .tab-btn {
        font-size: 16px;
        padding: 10px 20px;
    }
}

/* Input area responsive */
.input-area {
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 768px) {
    .input-area {
        flex-direction: row;
    }
    
    .input-area input {
        width: 80%;
    }
    
    .input-area button {
        width: auto;
    }
}

/* URL entries responsive */
.url-entry {
    flex-direction: column;
}

@media (min-width: 768px) {
    .url-entry {
        flex-direction: row;
        align-items: center;
    }
}

/* Theme toggle responsive positioning */
#theme-toggle {
    bottom: 10px;
    right: 10px;
    font-size: 14px;
    padding: 8px 16px;
}

@media (min-width: 768px) {
    #theme-toggle {
        bottom: 20px;
        right: 20px;
        font-size: 16px;
        padding: 10px 20px;
    }
}

/* Feedback buttons responsive */
.feedback-buttons {
    flex-wrap: wrap;
    gap: 5px;
}

.feedback-buttons button {
    font-size: 12px;
}

@media (min-width: 768px) {
    .feedback-buttons button {
        font-size: 14px;
        padding: 6px 12px;
    }
}

/* Responsive font sizes */
@media (max-width: 767px) {
    body {
        font-size: 14px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
}

* {
    max-width: 100%;
}

/* Landscape orientation optimizations */
@media (orientation: landscape) and (max-height: 500px) {
    .chat-box {
        height: 300px;
    }
    
    #theme-toggle {
        bottom: 5px;
        right: 5px;
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* End of responsive enhancements */
