:root {
    /* Dark theme colors */
    --dark-bg: #1a1b26;
    --dark-surface: #24283b;
    --dark-border: #363b54;
    --dark-text: #c0caf5;
    --dark-text-secondary: #7982a9;

    /* Light theme colors */
    --light-bg: #f8fafc;
    --light-surface: #ffffff;
    --light-border: #e2e8f0;
    --light-text: #1e293b;
    --light-text-secondary: #64748b;

    /* Accent colors */
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
}

/* Theme styles */
body.theme-dark {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

body.theme-light {
    background-color: var(--light-bg);
    color: var(--light-text);
}

/* Layout */
.app-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.side-nav {
    padding: 1rem;
    border-right: 1px solid var(--dark-border);
    background-color: var(--dark-surface);
    display: flex;
    flex-direction: column;
}

.theme-light .side-nav {
    background-color: var(--light-surface);
    border-color: var(--light-border);
}

.nav-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--dark-border);
    margin-bottom: 1rem;
}

.nav-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-text);
}

.theme-light .nav-header h1 {
    color: var(--light-text);
}

/* Main content */
.main-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Toolbar */
.toolbar {
    padding: 0.75rem 1rem;
    background-color: var(--dark-surface);
    border-bottom: 1px solid var(--dark-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.theme-light .toolbar {
    background-color: var(--light-surface);
    border-color: var(--light-border);
}

.toolbar-left, .toolbar-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Editor */
.editor-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.CodeMirror {
    height: 100% !important;
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 14px;
}

.theme-dark .CodeMirror {
    background-color: var(--dark-bg);
}

.theme-light .CodeMirror {
    background-color: var(--light-bg);
}

/* Analysis Panel */
.analysis-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 400px;
    background-color: var(--dark-surface);
    border-left: 1px solid var(--dark-border);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
}

.theme-light .analysis-panel {
    background-color: var(--light-surface);
    border-color: var(--light-border);
}

.analysis-panel.active {
    transform: translateX(0);
}

.panel-header {
    padding: 1rem;
    border-bottom: 1px solid var(--dark-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.theme-light .panel-header {
    border-color: var(--light-border);
}

.panel-content {
    padding: 1rem;
    overflow-y: auto;
    height: calc(100% - 60px);
}

/* Controls */
select {
    padding: 0.5rem;
    border-radius: 0.375rem;
    background-color: var(--dark-surface);
    border: 1px solid var(--dark-border);
    color: var(--dark-text);
    font-size: 0.875rem;
    min-width: 120px;
}

.theme-light select {
    background-color: var(--light-surface);
    border-color: var(--light-border);
    color: var(--light-text);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

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

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

.btn.secondary {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

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

/* Status bar */
.status-bar {
    padding: 0.5rem 1rem;
    background-color: var(--dark-surface);
    border-top: 1px solid var(--dark-border);
    font-size: 0.875rem;
    color: var(--dark-text-secondary);
}

.theme-light .status-bar {
    background-color: var(--light-surface);
    border-color: var(--light-border);
    color: var(--light-text-secondary);
}

/* Utility classes */
.status {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.status.error {
    background-color: var(--error);
    color: white;
}

.status.success {
    background-color: var(--success);
    color: white;
}

/* Responsive design */
@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
    }

    .side-nav {
        display: none;
    }

    .analysis-panel {
        width: 100%;
    }
}

/* Reset any potential conflicting styles */
#userMenuContainer {
    position: relative !important;
    display: block !important;
    z-index: 9999 !important;
}

#userMenuContainer button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    cursor: pointer !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    transition: all 0.2s ease-in-out !important;
}

#userMenuContainer button img {
    width: 2rem !important;
    height: 2rem !important;
    border-radius: 9999px !important;
    object-fit: cover !important;
}

#userMenuContainer button span {
    font-size: 0.875rem !important;
    color: #374151 !important;
}

#userMenuContainer button i {
    font-size: 0.75rem !important;
    color: #6B7280 !important;
}

#userMenu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    margin-top: 0.25rem !important;
    width: 14rem !important;
    background-color: #FFFFFF !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid #E5E7EB !important;
    overflow: hidden !important;
    z-index: 9999 !important;
    transform-origin: top right !important;
    transition: all 0.2s ease-out !important;
}

#userMenu.hidden {
    opacity: 0 !important;
    transform: scale(0.95) !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

#userMenu:not(.hidden) {
    opacity: 1 !important;
    transform: scale(1) !important;
    visibility: visible !important;
}

#userMenu .py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

#userMenu a {
    display: flex !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
    color: #374151 !important;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out !important;
}

#userMenu a:hover {
    background-color: #4F46E5 !important;
    color: #FFFFFF !important;
}

#userMenu a i {
    width: 1.25rem !important;
    text-align: center !important;
    margin-right: 0.75rem !important;
}

#userMenu a span {
    font-size: 0.875rem !important;
}

#userMenu hr {
    margin: 0.25rem 0 !important;
    border: none !important;
    border-top: 1px solid #E5E7EB !important;
}

#userMenu a[href="logout.php"] {
    color: #DC2626 !important;
}

#userMenu a[href="logout.php"]:hover {
    background-color: #DC2626 !important;
    color: #FFFFFF !important;
}

/* Custom hover effects */
#userMenuContainer button:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    border-radius: 0.375rem !important;
}

/* Animation keyframes */
@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes menuFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Apply animations */
#userMenu:not(.hidden) {
    animation: menuFadeIn 0.2s ease-out forwards !important;
}

#userMenu.hidden {
    animation: menuFadeOut 0.2s ease-out forwards !important;
}

/* Reset any potential conflicting styles */
#userMenuContainer {
    position: relative !important;
    display: block !important;
    z-index: 9999 !important;
}

#userMenuContainer button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    cursor: pointer !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    transition: all 0.2s ease-in-out !important;
}

#userMenuContainer button img {
    width: 2rem !important;
    height: 2rem !important;
    border-radius: 9999px !important;
    object-fit: cover !important;
}

#userMenuContainer button span {
    font-size: 0.875rem !important;
    color: #374151 !important;
}

#userMenuContainer button i {
    font-size: 0.75rem !important;
    color: #6B7280 !important;
}

#userMenu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    margin-top: 0.25rem !important;
    width: 14rem !important;
    background-color: #FFFFFF !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid #E5E7EB !important;
    overflow: hidden !important;
    z-index: 9999 !important;
    transform-origin: top right !important;
    transition: all 0.2s ease-out !important;
}

#userMenu.hidden {
    opacity: 0 !important;
    transform: scale(0.95) !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

#userMenu:not(.hidden) {
    opacity: 1 !important;
    transform: scale(1) !important;
    visibility: visible !important;
}

#userMenu .py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

#userMenu a {
    display: flex !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
    color: #374151 !important;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out !important;
}

#userMenu a:hover {
    background-color: #4F46E5 !important;
    color: #FFFFFF !important;
}

#userMenu a i {
    width: 1.25rem !important;
    text-align: center !important;
    margin-right: 0.75rem !important;
}

#userMenu a span {
    font-size: 0.875rem !important;
}

#userMenu hr {
    margin: 0.25rem 0 !important;
    border: none !important;
    border-top: 1px solid #E5E7EB !important;
}

#userMenu a[href="logout.php"] {
    color: #DC2626 !important;
}

#userMenu a[href="logout.php"]:hover {
    background-color: #DC2626 !important;
    color: #FFFFFF !important;
}

/* Custom hover effects */
#userMenuContainer button:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    border-radius: 0.375rem !important;
}

/* Animation keyframes */
@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes menuFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Apply animations */
#userMenu:not(.hidden) {
    animation: menuFadeIn 0.2s ease-out forwards !important;
}

#userMenu.hidden {
    animation: menuFadeOut 0.2s ease-out forwards !important;
}

/* Navigation Menu Styling */
.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-menu a {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #6B7280;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    border-radius: 0.375rem;
}

.nav-menu a:hover {
    color: #4F46E5;
    background-color: rgba(79, 70, 229, 0.1);
}

.nav-menu a i {
    margin-right: 0.5rem;
    width: 1.25rem;
    text-align: center;
}

/* Active state for menu items */
.nav-menu a.active {
    color: #4F46E5;
    background-color: rgba(79, 70, 229, 0.1);
}

/* Border bottom for active tab */
.border-primary {
    border-color: #4F46E5 !important;
}

/* Tab hover effects */
.px-4.py-2:hover {
    color: #4F46E5;
    background-color: rgba(79, 70, 229, 0.05);
    border-radius: 0.375rem;
}

/* Card hover effects */
.card {
    transition: all 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Button hover effects */
.bg-primary {
    background-color: #4F46E5;
}

.hover\:bg-primary-dark:hover {
    background-color: #4338CA;
}

/* Input focus effects */
input:focus {
    outline: none;
    border-color: #4F46E5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

/* Message hover effects */
.message-item {
    transition: all 0.2s ease-in-out;
}

.message-item:hover {
    background-color: rgba(79, 70, 229, 0.05);
}

/* Badge styling */
.badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
}

.badge-primary {
    background-color: #4F46E5;
}

.badge-danger {
    background-color: #EF4444;
}

/* Notification dot */
.notification-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: #4F46E5;
}

/* Custom scrollbar */
.overflow-y-auto {
    scrollbar-width: thin;
    scrollbar-color: #E5E7EB transparent;
}

.overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.overflow-y-auto::-webkit-scrollbar-track {
    background: transparent;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
    background-color: #E5E7EB;
    border-radius: 3px;
}

/* Add this class to your menu containers */
.menu-container {
    position: relative;
}

.menu-container:hover .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Dropdown menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.2s ease-in-out;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #E5E7EB;
    min-width: 12rem;
    z-index: 50;
}

/* Dropdown menu items */
.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #374151;
    transition: all 0.2s ease-in-out;
}

.dropdown-menu a:hover {
    background-color: rgba(79, 70, 229, 0.1);
    color: #4F46E5;
}

.dropdown-menu a i {
    width: 1.25rem;
    margin-right: 0.75rem;
    text-align: center;
}





/* styles.css */
body {
    margin: 0;
    padding: 0;
}
.preview-content {
    width: 100%;
    height: 100%;
    overflow: auto;
    padding: 20px;
    box-sizing: border-box;
}
#adOverlay {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 300px;
    display: none;
    z-index: 1000;
}
#adOverlay button {
    background: #3490dc;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    float: right;
}
@media (max-width: 768px) {
    #adOverlay {
        left: 10px;
        max-width: 250px;
        padding: 10px;
    }
    #adOverlay button {
        padding: 4px 8px;
        font-size: 0.9rem;
    }
}
/* Add other styles here */
