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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fafbfc;
    height: 100vh;
    overflow: hidden;
}

.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.top-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-main {
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-ai {
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.app-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.app-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.mode-toggle {
    display: flex;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
}

.mode-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    color: #6b7280;
}

.mode-btn.active {
    background: #4f46e5;
    color: white;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.2);
}

.mode-btn:hover:not(.active) {
    background: #f3f4f6;
    color: #374151;
}

.ai-section {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    width: 100%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ai-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    flex: 1;
    min-width: 0;
    color: #111827;
}

.ai-input::placeholder {
    color: #9ca3af;
}

.header-right {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.btn-group {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-divider {
    width: 1px;
    height: 24px;
    background: #e5e7eb;
    margin: 0 8px;
}

.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    text-align: center;
}

.btn {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #374151;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #5b21b6);
    color: white;
    border-color: #4f46e5;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #4338ca, #5b21b6);
    border-color: #4338ca;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: #ef4444;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-color: #dc2626;
}

.btn-success {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    border-color: #059669;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #047857, #065f46);
    border-color: #047857;
}

.btn-ai {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    border-color: #7c3aed;
}

.btn-ai:hover:not(:disabled) {
    background: linear-gradient(135deg, #6d28d9, #9333ea);
    border-color: #6d28d9;
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border-color: #6b7280;
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #4b5563, #374151);
    border-color: #4b5563;
}

.btn-github {
    background: linear-gradient(135deg, #1f2937, #111827);
    color: white;
    border-color: #1f2937;
    gap: 6px;
}

.btn-github:hover:not(:disabled) {
    background: linear-gradient(135deg, #111827, #030712);
    border-color: #111827;
}

.btn-format {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: white;
    border-color: #0891b2;
}

.btn-format:hover:not(:disabled) {
    background: linear-gradient(135deg, #0e7490, #155e75);
    border-color: #0e7490;
}

.btn-menu {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border-color: #6b7280;
}

.btn-menu:hover:not(:disabled) {
    background: linear-gradient(135deg, #4b5563, #374151);
    border-color: #4b5563;
}

.btn-paste {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    border-color: #059669;
}

.btn-paste:hover:not(:disabled) {
    background: linear-gradient(135deg, #047857, #065f46);
    border-color: #047857;
}

.btn-zoom {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: black;
    border-color: #f59e0b;
    min-width: 36px;
    height: 36px;
    border-radius: 6px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.btn-zoom:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706, #b45309);
    border-color: #d97706;
}

.btn-font {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: black;
    border-color: #8b5cf6;
    min-width: 36px;
    height: 36px;
    border-radius: 6px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.btn-font:hover:not(:disabled) {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border-color: #7c3aed;
}

.github-icon, .format-icon, .menu-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 180px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    z-index: 1000;
    top: 100%;
    right: 0;
    margin-top: 4px;
    overflow: hidden;
}

.dropdown.active .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease;
}

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

.dropdown-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #111827;
}

.format-section {
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
    padding-top: 4px;
}

.color-option {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid #d1d5db;
    margin-right: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.slides-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.slide-item {
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    position: relative;
    user-select: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.slide-item:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.slide-item.active {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #ede9fe, #f3f4f6);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.slide-item.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
    z-index: 1000;
}

.slide-item.drag-over {
    border-color: #059669;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    transform: translateY(-2px);
}

.drag-handle {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: #d1d5db;
    border-radius: 2px;
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.slide-item:hover .drag-handle {
    background: #6b7280;
}

.slide-number {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 600;
    margin-left: 16px;
}

.slide-preview {
    font-size: 13px;
    color: #374151;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
    margin-left: 16px;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-area {
    flex: 1;
    display: flex;
    background: white;
}

.editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.editor-toolbar {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    gap: 4px;
    align-items: center;
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: #d1d5db;
    margin: 0 4px;
}

.editor {
    flex: 1;
    border: none;
    outline: none;
    padding: 20px;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    background: #fafbfc;
    color: #111827;
}

.preview-panel {
    flex: 1;
    border-left: 1px solid #e5e7eb;
    background: white;
    position: relative;
}

.slide-preview-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.slide-content {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16/9;
    background: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 40px;
    overflow: auto;
    border: 1px solid #e5e7eb;
}

.slide-content h1 {
    font-size: 2.5em;
    margin-bottom: 0.5em;
    color: #111827;
    font-weight: 700;
}

.slide-content h2 {
    font-size: 2em;
    margin-bottom: 0.5em;
    color: #374151;
    font-weight: 600;
}

.slide-content h3 {
    font-size: 1.5em;
    margin-bottom: 0.5em;
    color: #4b5563;
    font-weight: 600;
}

.slide-content p {
    margin-bottom: 1em;
    line-height: 1.6;
    color: #374151;
}

.slide-content ul, .slide-content ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

.slide-content li {
    margin-bottom: 0.5em;
    line-height: 1.6;
}

.slide-content code {
    background: #f1f5f9;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.9em;
}

.slide-content pre {
    background: #f1f5f9;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1em;
}

.slide-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.slide-content .image-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 20px 0;
}

.slide-content .image-left {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.slide-content .image-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.slide-content .content-left {
    flex: 1;
    padding-right: 20px;
}

.slide-content .content-right {
    flex: 1;
    padding-left: 20px;
}

.slide-content .image-layout-full {
    display: block;
    margin: 20px 0;
}

.slide-content .content-section {
    margin-top: 20px;
}

/* Enhanced Presentation Mode Styling */
.presentation-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: slideInMode 0.5s ease-out;
}

@keyframes slideInMode {
    from {
        opacity: 0;
        background: #111827;
    }
    to {
        opacity: 1;
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    }
}

.presentation-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.presentation-slide {
    width: 85vw;
    max-width: 1400px;
    aspect-ratio: 16/9;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    padding: 4rem;
    overflow: auto;
    position: relative;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.4),
        0 16px 32px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.9),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    transform-origin: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    animation: slideInPresentation 0.6s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideInPresentation {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.85) rotateX(15deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

/* Premium Typography for Presentation Mode */
.presentation-slide h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    color: transparent;
    font-weight: 900;
    line-height: 1.05;
    background: linear-gradient(135deg, #1e293b 0%, #3730a3 40%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(30, 41, 59, 0.3);
    letter-spacing: -0.05em;
    position: relative;
    text-align: center;
    margin-bottom: 2rem;
}

.presentation-slide h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 6px;
    background: linear-gradient(90deg, #3730a3, #1e40af, #0ea5e9);
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.presentation-slide h2 {
    font-size: 3.25rem;
    margin-bottom: 1.25rem;
    color: #1e293b;
    font-weight: 800;
    line-height: 1.15;
    position: relative;
    padding-bottom: 1rem;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.presentation-slide h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 8px;
    height: 100%;
    background: linear-gradient(180deg, #3730a3, #1e40af);
    border-radius: 4px;
    margin-right: 1rem;
}

.presentation-slide h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3730a3, #1e40af);
    border-radius: 2px;
}

.presentation-slide h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #334155;
    font-weight: 700;
    line-height: 1.25;
    position: relative;
    padding-left: 1.5rem;
}

.presentation-slide h3::before {
    content: '▶';
    position: absolute;
    left: 0;
    top: 0;
    color: #3730a3;
    font-size: 0.8em;
}

.presentation-slide p {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #1e293b;
    text-align: justify;
    text-justify: inter-word;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.presentation-slide strong {
    color: #1e40af;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(30, 64, 175, 0.2);
}

.presentation-slide em {
    color: #7c3aed;
    font-style: italic;
    font-weight: 500;
}

.presentation-slide ul, .presentation-slide ol {
    margin-bottom: 2rem;
    padding-left: 0;
    list-style: none;
}

.presentation-slide li {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    line-height: 1.7;
    color: #1e293b;
    position: relative;
    padding-left: 3rem;
    transition: all 0.3s ease;
}

.presentation-slide ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #3730a3, #1e40af);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.presentation-slide ol {
    counter-reset: list-counter;
}

.presentation-slide ol li {
    counter-increment: list-counter;
}

.presentation-slide ol li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #3730a3, #1e40af);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.presentation-slide blockquote {
    border: none;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 2.5rem;
    margin: 2.5rem 0;
    font-style: italic;
    font-size: 1.5rem;
    border-radius: 20px;
    box-shadow: 
        0 12px 24px rgba(59, 130, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    border-left: 6px solid #3730a3;
}

.presentation-slide blockquote::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 4rem;
    color: #3730a3;
    opacity: 0.3;
    font-family: Georgia, serif;
}

.presentation-slide code {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-family: 'SF Mono', Monaco, 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    font-size: 1.3rem;
    color: #1e293b;
    border: 2px solid #cbd5e1;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.presentation-slide pre {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #e2e8f0;
    padding: 2.5rem;
    border-radius: 20px;
    overflow-x: auto;
    margin: 2.5rem 0;
    box-shadow: 
        0 16px 32px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid #475569;
    position: relative;
}

.presentation-slide pre::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 
        20px 0 0 #f59e0b,
        40px 0 0 #10b981;
}

.presentation-slide pre code {
    background: none;
    padding: 0;
    color: inherit;
    border: none;
    box-shadow: none;
    font-size: 1.2rem;
    line-height: 1.6;
}

.presentation-slide img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.25),
        0 8px 16px rgba(0, 0, 0, 0.15);
    margin: 2rem 0;
    border: 4px solid rgba(255, 255, 255, 0.9);
    transition: transform 0.3s ease;
}

.presentation-slide img:hover {
    transform: scale(1.02);
}

.presentation-slide table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2.5rem 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.1);
}

.presentation-slide th {
    background: linear-gradient(135deg, #3730a3, #1e40af);
    color: white;
    padding: 1.5rem;
    font-weight: 700;
    font-size: 1.3rem;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.presentation-slide td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.8);
    transition: background-color 0.2s ease;
}

.presentation-slide tr:nth-child(even) td {
    background: rgba(248, 250, 252, 0.9);
}

.presentation-slide tr:hover td {
    background: rgba(239, 246, 255, 0.9);
}

/* Enhanced Link Styling */
.presentation-slide a {
    color: #3730a3;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.presentation-slide a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3730a3, #1e40af);
    transition: width 0.3s ease;
}

.presentation-slide a:hover::after {
    width: 100%;
}

/* Enhanced HR Styling */
.presentation-slide hr {
    border: none;
    height: 4px;
    background: linear-gradient(90deg, transparent, #3730a3, transparent);
    margin: 3rem 0;
    border-radius: 2px;
}

/* Layout Classes Enhancement */
.presentation-slide .image-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    margin: 3rem 0;
    background: rgba(255, 255, 255, 0.5);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.presentation-slide .image-left,
.presentation-slide .image-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.presentation-slide .content-left {
    flex: 1;
    padding-right: 2rem;
}

.presentation-slide .content-right {
    flex: 1;
    padding-left: 2rem;
}

.presentation-slide .image-layout-full {
    display: block;
    margin: 3rem 0;
    text-align: center;
}

.presentation-slide .content-section {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

/* Add subtle animations */
.presentation-slide h1,
.presentation-slide h2,
.presentation-slide h3 {
    animation: fadeInUp 0.6s ease-out;
}

.presentation-slide p,
.presentation-slide li {
    animation: fadeInUp 0.8s ease-out;
}

.presentation-slide img,
.presentation-slide pre,
.presentation-slide blockquote {
    animation: fadeInScale 0.8s ease-out;
}

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

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

/* Enhanced Presentation Controls - Keep Original Design */
.presentation-controls {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    align-items: center;
    background: rgba(15, 23, 42, 0.95);
    padding: 16px 32px;
    border-radius: 50px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideInControls 0.6s ease-out 0.3s both;
}

@keyframes slideInControls {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.presentation-controls button {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.presentation-controls button:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.presentation-controls button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.presentation-controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: rgba(148, 163, 184, 0.3);
    color: #64748b;
}

.zoom-controls, .font-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 20px;
    margin-left: 20px;
}

.zoom-level, .font-level {
    color: #f1f5f9;
    font-size: 13px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    background: rgba(59, 130, 246, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.slide-counter {
    color: #f1f5f9;
    font-size: 15px;
    font-weight: 700;
    min-width: 120px;
    text-align: center;
    background: rgba(59, 130, 246, 0.2);
    padding: 8px 16px;
    border-radius: 25px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.control-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 12px;
}

.hidden {
    display: none !important;
}

.file-input {
    display: none;
}

.paste-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.paste-modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 800px;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid #e5e7eb;
}

.paste-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.paste-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.paste-textarea {
    flex: 1;
    min-height: 300px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background: #fafbfc;
    color: #111827;
}

.paste-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .ai-section {
        max-width: 600px;
    }
}

@media (max-width: 1200px) {
    .header-main {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 180px;
    }
    
    .content-area {
        flex-direction: column;
    }
    
    .preview-panel {
        border-left: none;
        border-top: 1px solid #e5e7eb;
    }
    
    .slide-content .image-layout {
        flex-direction: column;
    }
    
    .slide-content .content-left,
    .slide-content .content-right {
        padding: 0;
    }
    
    .presentation-slide .image-layout {
        flex-direction: column;
    }
    
    .presentation-slide .content-left,
    .presentation-slide .content-right {
        padding: 0;
    }
    
    .presentation-slide {
        width: 95vw;
        padding: 3rem;
    }
    
    .presentation-slide h1 {
        font-size: 4rem;
    }
    
    .presentation-slide h2 {
        font-size: 3rem;
    }
    
    .presentation-slide h3 {
        font-size: 2.25rem;
    }
    
    .presentation-slide p,
    .presentation-slide li {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-left, .header-right {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .btn {
        font-size: 11px;
        padding: 6px 12px;
    }
    
    .mode-btn {
        font-size: 11px;
        padding: 6px 12px;
    }
    
    .presentation-slide {
        width: 98vw;
        padding: 2rem;
    }
    
    .presentation-slide h1 {
        font-size: 3rem;
    }
    
    .presentation-slide h2 {
        font-size: 2.5rem;
    }
    
    .presentation-slide h3 {
        font-size: 2rem;
    }
    
    .presentation-slide p,
    .presentation-slide li {
        font-size: 1.3rem;
    }
    
    .presentation-controls {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 20px;
        bottom: 20px;
    }
    
    .zoom-controls, .font-controls {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        padding-top: 8px;
        margin-top: 8px;
        flex-basis: 100%;
        justify-content: center;
    }
    
    .presentation-controls button {
        padding: 8px 16px;
        font-size: 12px;
    }
}