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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Canvas Styles */
.editable-element {
    position: relative;
    cursor: move;
    transition: all 0.2s ease;
}

.editable-element:hover {
    outline: 2px dashed #3B82F6;
}

.editable-element.selected {
    outline: 2px solid #1E40AF;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.edit-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #1E40AF;
    border: 1px solid white;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
}

.edit-handle.top-left { top: -4px; left: -4px; }
.edit-handle.top-right { top: -4px; right: -4px; }
.edit-handle.bottom-left { bottom: -4px; left: -4px; }
.edit-handle.bottom-right { bottom: -4px; right: -4px; }

.text-edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: text;
}

.text-edit-overlay:hover {
    opacity: 1;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    z-index: 10000;
    min-width: 160px;
}

.context-menu-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.context-menu-item:hover {
    background-color: #f3f4f6;
}

.context-menu-item i {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

/* Slide Container */
.slide-container {
    position: relative;
    width: 1280px;
    min-height: 720px;
    background: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform-origin: center top;
}

/* Toolbar */
.toolbar {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 12px;
    z-index: 1000;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: #f3f4f6;
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .slide-container {
        width: 100%;
        min-height: 600px;
        transform: scale(0.8);
    }
}

@media (max-width: 768px) {
    .slide-container {
        transform: scale(0.7);
        min-height: 500px;
    }
    
    .toolbar {
        right: 10px;
        padding: 8px;
    }
    
    .toolbar-btn {
        width: 36px;
        height: 36px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}