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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
}

/* Smooth transitions for theme switching */
#themeContainer {
    animation: fadeIn 0.5s ease-in;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Theme Selector Hover Zone */
.theme-dock {
    position: relative;
}

/* Add invisible hover extension zone between button and dock */
.theme-dock::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    pointer-events: auto;
}

#themeSelectorContainer:hover #themeOptionsDeck {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

/* Typing animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.typing-animation {
    overflow: hidden;
    border-right: 2px solid;
    white-space: nowrap;
    animation: typing 2s steps(40, end), blink 0.75s step-end infinite;
}

/* Fade-in for messages */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-fade-in {
    animation: messageSlideIn 0.4s ease-out;
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse-animation {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ChatGPT Sidebar Tooltips */
.sidebar-item-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-tooltip {
    position: absolute;
    left: 100%;
    margin-left: 12px;
    padding: 6px 12px;
    background-color: #1f2937;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.sidebar-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #1f2937;
}

.sidebar-item-wrapper:hover .sidebar-tooltip {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.1s;
}

/* VSCode theme specific */
#editorContent {
    transition: opacity 0.15s ease-in-out;
}

/* Terminal theme text colors */
.text-magenta-400 {
    color: #f472b6;
}

/* Notebook cell styling */
.notebook-cell {
    transition: all 0.2s ease;
}

.notebook-cell:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.markdown-cell p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.markdown-cell h1,
.markdown-cell h2,
.markdown-cell h3 {
    margin-top: 1.5rem;
}

.markdown-cell h1:first-child,
.markdown-cell h2:first-child,
.markdown-cell h3:first-child {
    margin-top: 0;
}
