@font-face {
    font-family: 'Segoe UI';
    src: url('/fonts/Segoe UI.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Segoe UI';
    src: url('/fonts/Segoe UI Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Bernoru UltraExpanded';
    src: url('/fonts/bernoru-blackultraexpanded.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

html {
    box-sizing: border-box;
    height: 100%;
    touch-action: manipulation;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #fff;
    overflow-x: hidden; 
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    touch-action: manipulation;
}

.container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100vh;
    position: relative;
}

.header-container {
    grid-row: 1;
    background-color: #1a1a1a;
    padding: 20px 20px 10px 20px;
    width: 100%;
    z-index: 10;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    color: #fff;
    font-size: 48px;
    text-align: left;
    margin: 0 0 15px 0;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: lowercase;
    font-family: 'Bernoru UltraExpanded';
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-top: 0;
    margin-bottom: 30px;
}

.query-container {
    display: flex;
    margin-bottom: 30px;
    align-items: center;
}

.chat-container {
    grid-row: 2;
    overflow-y: auto;
    width: 100%;
    padding: 0 20px;
    margin: 10px 0;
    scroll-behavior: smooth;
}

.input-area-container {
    grid-row: 3;
    background-color: #1a1a1a;
    width: 100%;
    z-index: 10;
    padding: 10px 20px 20px 20px;
    position: sticky;
    bottom: 0;
}

.input-area {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: #888;
    border-radius: 50%;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

#query-input {
    flex: 1;
    padding: 15px 20px;
    padding-right: 50px;
    font-size: 16px;
    background-color: #2a2a2a;
    border: none;
    border-radius: 20px;
    color: #fff;
    outline: none;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
    width: calc(100% - 55px);
    max-width: 100%;
    font-size: 16px;
    touch-action: manipulation;
}

#query-input::placeholder {
    color: #777;
}

#query-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
    background-color: #333;
}

#send-button {
    position: absolute;
    right: 10px;
    padding: 8px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.2s ease;
    opacity: 0;
    transform: scale(0.9);
}

#send-button.visible {
    opacity: 1;
    transform: scale(1);
}

#send-button:hover {
    transform: scale(1.1);
    background: #2980b9;
}

#send-button:active {
    transform: scale(0.95);
}

#send-button.clicked {
    transform: scale(0.8) rotate(45deg);
    background-color: #2ecc71;
}

.highlighted-query {
    font-size: 18px;
    margin-bottom: 5px;
    word-break: break-word;
}

.query-indicator {
    color: #a78bfa; 
}

.tool-reference {
    color: #ef4444;
}

.attribute {
    color: #eab308;
}

.math-operator {
    color: #06b6d4; /* Cyan color for math operators */
}

.response-container, .thinking-container {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    width: 100%;
}

.response-section {
    margin: 20px 0;
}

.response-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.response-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4ade80, #3b82f6);
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.steps-info {
    font-size: 18px;
    color: #888;
    margin-bottom: 5px;
}

.response-content {
    font-size: 28px;
    padding-left: 65px;
}

.see-details {
    color: #888;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 10px;
}

h2 {
    color: #2c3e50;
    margin-top: 0;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

#response-text {
    font-size: 18px;
    line-height: 1.5;
    min-height: 30px;
    word-wrap: break-word;
}

.thinking-animation {
    display: inline-flex;
    align-items: center;
    color: #888;
}

.thinking-dots {
    display: inline-block;
    width: 40px;
}

#thinking-process {
    display: none;
    background-color: #222;
    border-radius: 8px;
    padding: 15px;
    margin-left: 55px;
    margin-top: 10px;
    margin-bottom: 20px;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease-out;
    max-width: 100%;
    overflow-x: auto;
    position: relative;
    z-index: 5;
}

.thought-step {
    margin-bottom: 10px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    word-break: break-word;
}

.thought-step:last-child {
    border-bottom: none;
}

.thought-description {
    color: #bbb;
}

.thought-result {
    color: #888;
    padding-left: 20px;
}

.message {
    display: flex;
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease-out;
    width: 100%;
}

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

@keyframes sendMessage {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.message.sending {
    animation: sendMessage 0.4s ease-out forwards;
}

.message-content {
    flex: 1;
    padding-top: 5px;
    width: calc(100% - 55px);
    min-width: 0;
}

.message.user .message-text {
    color: #fff;
}

.bot-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 15px;
}

.bot-icon img {
    width: 40px;
    height: 40px;
}

.message-info {
    font-size: 14px;
    color: #888;
    margin-top: -8px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.see-details {
    color: #888;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 10px;
    font-size: 12px;
}

.message-text {
    font-size: 18px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    width: 100%;
}

.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.highlighted-query {
    transition: color 0.2s ease;
}

.search-results {
    margin-top: 10px;
    background: #2a2a2a;
    border-radius: 8px;
    padding: 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.search-header {
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3f3f3f;
    word-wrap: break-word;
}

.search-results-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.search-result {
    padding: 10px;
    border-radius: 6px;
    background: #333;
    transition: background-color 0.2s;
    width: 100%;
}

.search-result:hover {
    background: #383838;
}

.search-spellcheck {
    color: #888;
    margin-bottom: 15px;
    font-size: 14px;
    word-wrap: break-word;
}

.search-spellcheck em {
    color: #3498db;
    font-style: normal;
}

.search-result {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 8px;
    background: #2a2a2a;
}

.search-result-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.search-favicon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    flex-shrink: 0;
}

.search-title {
    color: #3498db;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.search-title:hover {
    text-decoration: underline;
}

.search-url {
    color: #2ecc71;
    font-size: 12px;
    margin-bottom: 5px;
    word-break: break-all;
    overflow-wrap: break-word;
}

.search-description {
    color: #bbb;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.search-error {
    color: #e74c3c;
    padding: 10px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    word-wrap: break-word;
}

.error-title {
    color: #e74c3c;
    font-weight: 500;
    margin-bottom: 5px;
}

.error-message {
    color: #bbb;
    font-size: 14px;
    word-wrap: break-word;
}

.search-error {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 80%;
    max-width: 900px;
    height: 80%;
    background: #1a1a1a;
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1),
                opacity 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.modal.open .modal-content {
    transform: translate(-50%, -50%);
    opacity: 1;
}

.modal-sidebar {
    width: 250px;
    background: #222;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
}

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

.sidebar-header h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
}

.close-modal {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
}

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

.sidebar-items {
    padding: 20px 0;
}

.sidebar-item {
    padding: 12px 20px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease, border-left 0.2s ease,
                padding-left 0.3s ease, background-color 0.2s ease;
}

.sidebar-item:hover {
    background: #2a2a2a;
    color: #fff;
}

.sidebar-item.active {
    background: #2d3748;
    color: #fff;
    border-left: 4px solid #3498db;
    padding-left: 16px; 
}

.modal-main {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    width: calc(100% - 250px);
}

.rate-limits-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.rate-limit-card {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rate-limit-card h4 {
    margin: 0 0 15px 0;
    color: #fff;
    font-size: 18px;
}

.progress-bar {
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    transition: width 0.3s ease;
}

.limit-stats {
    color: #888;
    font-size: 14px;
    margin-bottom: 5px;
}

.limit-remaining {
    color: #3498db;
    font-size: 14px;
}

.panel {
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none;
    width: 100%;
}

.panel.active {
    opacity: 1;
    transform: translateX(0);
    display: block;
}

.about-content {
    max-width: 600px;
}

.about-section {
    margin-bottom: 30px;
}

.about-section h4 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 10px;
}

.feature-list, .credits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li, .credits-list li {
    color: #bbb;
    padding: 8px 0;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.feature-list li:before {
    content: "•";
    color: #3498db;
    font-weight: bold;
    margin-right: 10px;
}

.credits-list li {
    font-size: 14px;
    color: #888;
}

.about-section p {
    color: #bbb;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

.settings-group {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 20px;
}

.setting-item {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    flex-wrap: wrap;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
    min-width: 200px;
}

.setting-info h4 {
    margin: 0 0 5px 0;
    color: #fff;
    font-size: 16px;
}

.setting-info p {
    margin: 0;
    color: #888;
    font-size: 14px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: 10px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: background-color 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), 
                background-color 0.3s ease;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #3498db;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px #3498db;
}

.account-message {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.account-message p {
    color: #bbb;
    font-size: 16px;
    margin-bottom: 15px;
}

.account-actions {
    display: flex;
    justify-content: center;
}

.login-button {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.2s;
}

.login-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.account-info {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 20px;
    border: 3px solid #3498db;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    flex: 1;
}

.user-details h4 {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: 18px;
}

.user-details p {
    margin: 0 0 8px 0;
    color: #bbb;
    font-size: 14px;
}

.user-provider {
    display: inline-block;
    padding: 3px 8px;
    background: #333;
    border-radius: 4px;
    font-size: 12px;
    color: #3498db;
    margin-bottom: 15px;
}

.logout-button {
    display: inline-block;
    padding: 8px 15px;
    background: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.logout-button:hover {
    background: #c0392b;
}

.reset-info {
    margin-bottom: 20px;
    color: #888;
    font-size: 14px;
    line-height: 1.5;
}

.app-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.app-login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
    width: 100%;
    margin: 20px;
    background-color: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.info-panel {
    padding: 40px;
    border-right: 1px solid #333;
}

.login-panel {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-panel .error-message {
    background-color: #3e2c2c;
    color: #ffcccc;
    border: 1px solid #e74c3c;
    padding: 20px;
    border-radius: 8px;
}

@media (max-width: 768px) {
    h1 {
        font-size: 36px;
        margin-bottom: 10px;
    }
    
    .header-container {
        padding: 15px 15px 5px 15px;
    }
    
    .chat-container {
        padding: 0 15px;
    }
    
    .input-area-container {
        padding: 5px 15px 15px 15px;
    }
    
    .container {
        padding: 10px;
        padding-top: 15px;
        padding-bottom: 15px;
    }
    
    .header-container {
        padding: 10px 10px 5px 10px;
    }
    
    .input-area-container {
        padding: 5px 10px 10px 10px;
    }
    
    .message-text {
        font-size: 18px;
    }

    #response-text {
        font-size: 16px;
    }
    
    .modal-content {
        width: 95%;
        height: 90%;
        flex-direction: column;
    }
    
    .modal-sidebar {
        width: 100%;
        height: auto;
    }
    
    .modal-main {
        width: 100%;
        padding: 15px;
    }
    
    .sidebar-items {
        display: flex;
        padding: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .sidebar-items::-webkit-scrollbar {
        display: none;
    }
    
    .sidebar-item {
        flex: 1 0 auto;
        text-align: center;
        padding: 10px 16px;
        white-space: nowrap;
    }
    
    .sidebar-item.active {
        border-left: none;
        border-bottom: 4px solid #3498db;
        padding-left: 16px;
    }
    
    .rate-limits-container {
        grid-template-columns: 1fr;
    }
    
    .user-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .user-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .setting-info {
        margin-bottom: 10px;
        width: 100%;
    }

    .toggle-switch {
        margin-left: 0;
        margin-top: 5px;
    }

    .sidebar-item.account-item {
        flex: 1 0 auto;
        min-width: 120px;
    }

    .sidebar-avatar {
        margin-right: 0;
    }
    
    .message {
        margin-bottom: 16px;
    }

    .bot-icon {
        width: 32px;
        height: 32px;
        margin-right: 10px;
    }

    .bot-icon img {
        width: 32px;
        height: 32px;
    }

    .avatar {
        width: 32px;
        height: 32px;
        margin-right: 10px;
    }

    .avatar img {
        width: 32px;
        height: 32px;
    }
    
    .message-content {
        width: calc(100% - 42px);
    }
    
    .thinking-animation {
        margin-left: 42px;
    }
    
    .sidebar-item .beta-tag {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .modal-content {
        width: 95%;
        height: 95%;
    }

    .setting-item {
        padding: 12px;
    }
    
    .integration-buttons {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 28px;
        margin-bottom: 5px;
    }
    
    .header-container, 
    .chat-container, 
    .input-area-container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .container {
        padding: 8px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .message-text {
        font-size: 18px;
    }
    
    #query-input {
        font-size: 15px;
        padding: 12px 15px;
    }
    
    .modal-main {
        padding: 10px;
        max-height: 70vh;
    }
    
    .panel h3 {
        font-size: 20px;
    }
    
    .sidebar-header h2 {
        font-size: 20px;
    }
    
    .integrations-container {
        margin: 10px auto;
        padding: 10px;
    }
    
    .integration-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    
    .integration-logo {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .now-playing {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .album-art {
        margin-right: 0;
        margin-bottom: 10px;
        width: 80px;
        height: 80px;
    }
    
    .playback-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .reset-info {
        font-size: 13px;
    }
    
    .modal-sidebar {
        min-height: 60px;
    }
}

.login-container {
    max-width: 400px;
    width: 90%;
    margin: 100px auto;
    padding: 30px;
    border-radius: 20px;
    background-color: #232323;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.login-container h1 {
    font-family: 'Bernoru-BlackUltraExpanded', sans-serif;
    color: #fff;
    margin-bottom: 20px;
}

.login-container p {
    color: #999;
    margin-bottom: 30px;
}

.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.oauth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.oauth-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.oauth-button img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.joshid-button {
    background: linear-gradient(135deg, #0f1f3d, #1e3a6e, #0f1f3d);
    color: #ffffff;
}

.google-button {
    background-color: #fff;
    color: #444;
}

.github-button {
    background-color: #333;
    color: #fff;
}

.back-link {
    display: block;
    margin-top: 20px;
    color: #999;
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    color: #fff;
}

.sign-in-banner {
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 15px;
    display: none;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
    border-left: 4px solid #3498db;
    flex-wrap: wrap;
}

.sign-in-banner span {
    color: #ddd;
    font-size: 14px;
    margin-right: 10px;
    margin-bottom: 5px;
}

.banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sign-in-banner a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
}

.sign-in-banner a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.close-banner {
    background: none;
    border: none;
    color: #777;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.close-banner:hover {
    color: #aaa;
}

.account-big-display {
    margin-bottom: 30px;
}

.account-header {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.user-avatar.large {
    width: 100px;
    height: 100px;
    min-width: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 25px;
    border: 3px solid #3498db;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar.large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-avatar {
    width: 65% !important;
    height: 65% !important;
    opacity: 0.7;
}

.account-status {
    color: #bbb;
    font-size: 16px;
    margin: 8px 0 15px 0;
}

#account-panel h3 {
    font-size: 24px;
    margin: 0 0 10px 0;
}

.modal.open .modal-content #account-panel.panel {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-account-preview {
    display: flex;
    align-items: center;
    padding: 5px 0;
    width: 100%;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-account-info {
    flex: 1;
    overflow: hidden;
}

.sidebar-account-name {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-account-email {
    color: #888;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item.account-item {
    padding: 8px 20px;
    border-bottom: 1px solid #333;
}

@media (max-width: 768px) {
    .account-header {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .user-avatar.large {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .user-details {
        text-align: center;
    }
}

.beta-tag {
    background-color: #3498db;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 3px;
    vertical-align: middle;
    font-weight: 500;
    display: inline-block;
    text-transform: uppercase;
    font-family: 'Segoe UI', sans-serif;
    letter-spacing: 0.5px;
}

.settings-button {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s;
}

.settings-button:hover {
    transform: rotate(90deg);
}

body.keyboard-open {
    height: 100%;
    overflow: hidden;
    position: relative;
}

body.keyboard-open .container {
    height: auto;
    padding-bottom: 0;
}

body.keyboard-open .chat-container {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding-bottom: 60px; 
}


body.keyboard-open .input-area-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    padding-bottom: 5px;
    background-color: #1a1a1a;
    z-index: 100;
}

@supports (-webkit-touch-callout: none) and (not (-webkit-appearance: none)) {
    body.keyboard-open .chat-container {
        height: calc(100% - 120px);
    }
    
    body.keyboard-open .input-area-container {
        position: fixed;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 900px;
    }
}

@supports (-webkit-appearance: none) {
    body.keyboard-open {
        position: fixed;
        width: 100%;
    }
    
    body.keyboard-open .header-container {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
    }
    
    body.keyboard-open .chat-container {
        padding-top: 70px;
        height: calc(100vh - 130px);
        max-height: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 60px;
        overflow-y: auto;
    }
    
    body.keyboard-open .input-area-container {
        background-color: #1a1a1a;
        padding-top: 10px;
        max-width: 900px;
    }
}

.spotify-player-chat {
    display: flex;
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    max-width: 320px;
}

.spotify-album-art {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 12px;
}

.spotify-album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spotify-track-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.spotify-track-name {
    font-weight: 600;
    font-size: 15px;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-track-artist {
    color: #bbb;
    font-size: 13px;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotify-attribution {
    font-size: 11px;
    margin-top: auto;
}

.spotify-attribution a {
    color: #1DB954;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.spotify-attribution img {
    height: 14px;
    margin-left: 4px;
}

input, 
textarea, 
select {
    font-size: 16px; 
    touch-action: manpulation;
}

@supports (-webkit-touch-callout: none) {
    input, 
    textarea, 
    select {
        font-size: 16px !important;
    }
    
    html, body {
        -webkit-text-size-adjust: 100%;
    }
}

.integrations-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
}

.beta-tag {
    background-color: #3498db;
    color: white;
    font-size: 14px;
    padding: 3px 8px;
    border-radius: 4px;
    vertical-align: middle;
    font-weight: 500;
    display: inline-block;
    text-transform: uppercase;
    font-family: 'Segoe UI', sans-serif;
    letter-spacing: 0.5px;
}

.integration-card {
    background-color: #232323;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.integration-logo {
    width: 70px;
    height: 70px;
    margin-right: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: #333;
    border-radius: 12px;
    overflow: hidden;
}

.integration-logo img {
    max-width: 80%;
    max-height: 80%;
}

.integration-details {
    flex: 1;
}

.integration-name {
    font-size: 24px;
    margin: 0 0 5px 0;
    font-weight: 700;
}

.integration-description {
    color: #aaa;
    margin: 0 0 15px 0;
    font-size: 15px;
    line-height: 1.4;
}

.integration-status {
    font-size: 14px;
    margin-bottom: 15px;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.status-connected {
    background-color: #4ade80;
}

.status-disconnected {
    background-color: #ef4444;
}

.integration-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    border: none;
    transition: all 0.2s ease;
}

.btn-connect {
    background-color: #3498db;
    color: white;
}

.btn-connect:hover {
    background-color: #2980b9;
}

.btn-disconnect {
    background-color: #2a2a2a;
    color: #ef4444;
    border: 1px solid #ef4444;
}

.btn-disconnect:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

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

.btn-back {
    display: inline-flex;
    align-items: center;
    color: #888;
    text-decoration: none;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.btn-back:hover {
    color: #fff;
}

.btn-back i {
    margin-right: 8px;
}

.now-playing {
    margin-top: 15px;
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    max-width: 500px;
}

.album-art {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-info {
    flex: 1;
    min-width: 0;}

.track-name {
    font-weight: 600;
    font-size: 16px;
    margin: 0 0 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    color: #bbb;
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playback-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.control-btn {
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    padding: 5px;
    transition: all 0.2s;
}

.control-btn:hover {
    color: #fff;
    transform: scale(1.1);
}

.control-btn.play-pause {
    color: #3498db;
    font-size: 18px;
}

.device-info {
    font-size: 12px;
    color: #777;
    margin-top: 5px;
}

#loading {
    color: #888;
    margin: 20px 0;
}

#error-message {
    color: #ef4444;
    margin: 20px 0;
    padding: 10px;
    background-color: rgba(239, 68, 68, 0.1);
    border-radius: 6px;
    display: none;
}

.integration-features {
    margin-top: 10px;
    font-size: 14px;
    color: #888;
}

.feature-list {
    padding-left: 20px;
    margin: 5px 0;
    color: #bbb;
}

@media (max-width: 768px) {
    .integrations-container {
        margin: 20px auto;
        padding: 15px;
    }

    .integration-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .integration-logo {
        margin-right: 0;
        margin-bottom: 15px;
        width: 60px;
        height: 60px;
    }

    .integration-name {
        font-size: 20px;
    }

    .integration-description {
        font-size: 14px;
    }

    .now-playing {
        flex-direction: column;
        align-items: flex-start;
    }

    .album-art {
        margin-right: 0;
        margin-bottom: 10px;
        width: 100px;
        height: 100px;
    }

    .playback-controls {
        width: 100%;
        justify-content: space-between;
    }

    h1 {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .integrations-container {
        margin: 10px auto;
        padding: 10px;
    }

    h1 {
        font-size: 28px;
    }

    .integration-buttons {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

.legal-notice {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin: 8px 0;
}

.legal-notice a {
    color: #3B82F6;
    text-decoration: none;
}

.legal-notice a:hover {
    text-decoration: underline;
}

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

.legal-content {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.legal-content h1 {
    font-size: 28px;
    margin-bottom: 5px;
    color: #fff;
}

.legal-section {
    margin: 30px 0;
}

.legal-section h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #fff;
}

.legal-section p, .legal-section li {
    line-height: 1.6;
    color: #fff;
    margin-bottom: 10px;
}

.legal-section ul {
    padding-left: 20px;
    margin: 10px 0;
}

.legal-section ul li {
    margin-bottom: 5px;
}

.back-link {
    display: inline-block;
    color: #3B82F6;
    text-decoration: none;
    font-size: 14px;
    margin-top: 5px;
}

.back-link:hover {
    text-decoration: underline;
}

.legal-link {
    color: #3B82F6;
}

.welcome-modal-content {
    max-width: 500px;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.welcome-header {
    background-color: #222;
    padding: 20px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #333;
}

.welcome-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.welcome-header h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
}

.close-welcome-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
}

.close-welcome-modal:hover {
    color: #fff;
}

.welcome-body {
    padding: 20px;
    background-color: #1a1a1a;
}

.welcome-body p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
    color: #bbb;
}

.welcome-body h3 {
    margin: 20px 0 15px;
    font-size: 18px;
    color: #fff;
}

.example-questions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.example-question {
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    font-size: 15px;
    display: flex;
    align-items: center;
    color: #ddd;
}

.example-question i {
    margin-right: 10px;
    color: #3498db;
}

.example-question:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.welcome-footer {
    text-align: center;
    margin-top: 20px;
}

.welcome-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.welcome-button:hover {
    background-color: #2980b9;
}

.close-whats-new-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
}

.close-whats-new-modal:hover {
    color: #fff;
}