/* App Page Styles */
:root {
    --sidebar-width: 250px;
    --panel-padding: 1.5rem;
    --border-radius: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease;
    --primary: #000000;
    --text: #333333;
    --text-light: #666666;
    --border: #e5e5e5;
    --white: #ffffff;
    --gray-50: #ebeef0d8;
    --gray-100: #f3f4f6;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    background-color: #f7f7f7;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e5e5;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
}

.logo {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-menu {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
}

.nav-menu ul {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-menu li {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #4b5563;
    transition: var(--transition);
}

.nav-menu li:hover {
    background-color: #f3f4f6;
}

.nav-menu li.active {
    background-color: #f0f9ff;
    color: #000000;
    border-right: 3px solid #000000;
}

.nav-icon {
    width: 20px;
    height: 20px;
}

.user-profile {
    padding: 1.5rem;
    border-top: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: #111827;
}

.user-email {
    font-size: 0.75rem;
    color: #6b7280;
}

/* .btn {
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    margin-bottom: 5px;
}

.btn.primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn.primary:hover {
    opacity: 0.9;
} */

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    min-height: 100vh;
}

/* Panels */
.panel {
    flex: 1;
    padding: var(--panel-padding);
    background-color: #ffffff;
    overflow-y: auto;
}

.center-panel {
    border-right: 1px solid #e5e5e5;
    max-width: 55%;
    display: flex;
    flex-direction: column;
    padding: 1rem 3rem;
    overflow-y: auto;
    gap: 1.5rem;
}

/* Remove the empty state centering for center panel */
.center-panel:not(.empty-state) {
    align-items: flex-start;
}

.right-panel {
    max-width: 45%;
}

.panel h2 {
    margin: 0;
    padding: 20px 24px;
    color: #1a1a1a;
    font-weight: 600;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid #e5e5e5;
}

/* Input Container */
.input-container {
    width: 100%;
    padding: 5px 10px;
    box-sizing: border-box;
}

/* Character count */
.char-count {
    font-size: 0.75rem;
    color: #6b7280;
}

#input-char-count {
    align-self: flex-end;
    margin-top: rem;
}

.char-count.limit-reached {
    color: #ef4444;
    font-weight: 500;
}

/* Chip Styles */
.chips-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
}

.chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: 1.5px solid #333;
    background-color: white;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    min-width: 80px;
    text-align: center;
    user-select: none;
}

/* Dark theme styles */
.dark .chip {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #444;
    color: #e0e0e0;
}

/* Hover state */
.chip:not(.active):hover {
    background-color: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.dark .chip:not(.active):hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Active/Selected state */
.chip.active {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dark .chip.active {
    background-color: #000;
    border-color: #000;
}

/* Ripple effect */
.chip::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.chip:active::after {
    transform: scale(1.5);
    opacity: 1;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Focus state for accessibility */
.chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .chip {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        min-width: 70px;
    }
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 1.25rem;
    margin: 0.rem 2rem;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: var(--transition);
}

textarea:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.options-row {
    display: flex;
    gap: 1rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
}

select, input[type="text"], input[type="password"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: var(--transition);
}

select:focus, input[type="text"]:focus, input[type="password"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: rem 0.5rem ;
}

/* API Key Input */
.api-key-container {
    margin-top: 0.2rem;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    padding-right: 2.5rem;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.eye-icon {
    width: 18px;
    height: 18px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: #000000;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #1a1a1a;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: #f3f4f6;
    color: #111827;
}

/* Output Panel */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Button with text and icon */
.btn-with-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid #e5e5e5;
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #4b5563;
    cursor: pointer;
    transition: var(--transition);
}

.btn-with-text:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.btn-with-text img {
    width: 16px;
    height: 16px;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Output container */
.output-container {
    background-color: #f9fafb;
    border: 1px solid #e5e5e5;
    border-radius: var(--border-radius);
    padding: 1.2rem;
    min-height: 300px;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 2.5rem; /* Make room for the footer */
}

.output-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 1.5rem;
    border-top: 1px solid #e5e5e5;
    background-color: #f9fafb;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Re-enhance button container */
.re-enhance-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

/* Dialog Styles */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.dialog-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Empty State Styles */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state-text {
    color: #6b7280;
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.5;
}

/* Center panel adjustments for empty state */
.center-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.dialog {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.dialog-overlay.visible .dialog {
    transform: translateY(0);
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 0px solid #e5e5e5;
}

.dialog-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.dialog-content {
    padding: 0 0 0rem 1rem;
    overflow-y: auto;
    flex-grow: 1;
    color: #4b5563;
    line-height: 3;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    background-color: #ef4444;
}

/* Button states */
.btn-copied,
.btn-saved {
    position: relative;
    color: transparent !important;
}

.btn-copied::after,
.btn-saved::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    color: #4b5563;
    font-weight: 500;
}

.btn-copied::after {
    content: 'Copied!';
}

.btn-saved::after {
    content: 'Saved!';
}

.btn-copied img,
.btn-saved img {
    opacity: 0;
}

.btn-copied,
.btn-saved {
    min-width: 80px;
    transition: none;
}

/* Remove all outlines and focus indicators from output content */
.output-content {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-focus-ring-color: transparent;
}

.output-content:focus,
.output-content:focus-visible,
.output-content:focus-within,
.output-content[contenteditable="true"],
.output-content[contenteditable="true"]:focus,
.output-content[contenteditable="true"]:active {
    outline: none !important;
    box-shadow: none !important;
    border-color: #e5e5e5 !important;
}

/* Remove outline for WebKit browsers */
.output-content[contenteditable="true"] {
    -webkit-tap-highlight-color: transparent;
    -webkit-focus-ring-color: transparent;
}

/* For Firefox */
.output-content[contenteditable="true"]::-moz-focus-inner {
    border: 0;
}

/* For Internet Explorer */
.output-content[contenteditable="true"]:focus {
    outline: none;
}

/* For Edge */
.output-content[contenteditable="true"]:focus-visible {
    outline: none;
}

/* For Safari */
_:-webkit-full-screen, .output-content[contenteditable="true"]:focus {
    outline: none;
}

/* For all browsers - last resort */
.output-content[contenteditable="true"] {
    -webkit-user-modify: read-write-plaintext-only;
    -moz-user-modify: read-write-plaintext-only;
    user-modify: read-write-plaintext-only;
}

.dialog-footer {
    padding: 1rem 1.5rem;
    border-top: 0px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #111827;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

/* Re-enhance button styles */
#re-enhance-btn {
    margin: 1rem 0 0.5rem;
    align-self: flex-start;
    padding: 0.75rem 1.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    color: #4b5563;
    cursor: pointer;
    transition: var(--transition);
}

#re-enhance-btn:hover {
    background-color: #e5e7eb;
    color: #111827;
}

#re-enhance-btn img {
    width: 16px;
    height: 16px;
}

.output-content {
    line-height: 1.6;
    white-space: pre-wrap;
}

.placeholder-text {
    color: #9ca3af;
    font-style: italic;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .center-panel,
    .right-panel {
        max-width: 100%;
    }
    
    .right-panel {
        border-top: 1px solid #e5e5e5;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .options-row {
        flex-direction: column;
        gap: 1rem;
    }
}

