/* Main Styles */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #7b68ee;
    --success-color: #5cb85c;
    --danger-color: #d9534f;
    --warning-color: #f0ad4e;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
}

.navbar-brand {
    font-size: 1.5rem;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.card-header {
    border-bottom: none;
    font-weight: 600;
}

/* Preview Container */
.preview-container {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

.preview-slide {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    margin: 20px;
    min-height: 450px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: var(--transition);
}

.preview-slide:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.preview-slide.editable:hover {
    outline: 2px dashed var(--primary-color);
    cursor: pointer;
}

.preview-slide .edit-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none;
}

.preview-slide:hover .edit-overlay {
    display: block;
}

/* Slide Navigation */
.slide-navigation {
    background: white;
    border-radius: var(--border-radius);
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.slide-counter {
    font-weight: 600;
    color: var(--dark-color);
}

/* Slide Thumbnails */
.slide-thumbnail {
    background: white;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 10px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.slide-thumbnail:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.slide-thumbnail.active {
    border-color: var(--success-color);
    box-shadow: 0 0 10px rgba(92, 184, 92, 0.3);
}

.slide-thumbnail-content {
    font-size: 0.8rem;
    height: 100px;
    overflow: hidden;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
}

.slide-thumbnail-number {
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--primary-color);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Progress Bar */
.progress {
    height: 25px;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.9);
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    font-weight: 600;
}

/* Empty State */
.empty-state {
    color: #6c757d;
}

/* Forms */
.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

/* Modals */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
}

.modal-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-bottom: none;
}

/* Tables */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead th {
    background: var(--light-color);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
}

/* Loading States */
.skeleton-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Slide Editor */
#slideHtmlEditor {
    background: #2c3e50;
    color: #ecf0f1;
    border: none;
}

#slideEditPreview {
    background: white;
}

/* Structure Preview */
.structure-item {
    background: white;
    border-left: 4px solid var(--primary-color);
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    transition: var(--transition);
}

.structure-item:hover {
    background: var(--light-color);
    transform: translateX(5px);
}

.structure-item .slide-type {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .preview-slide {
        padding: 20px;
        margin: 10px;
        min-height: 300px;
    }
    
    .card {
        margin-bottom: 20px;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Toast Customization */
.iziToast {
    border-radius: var(--border-radius);
}

/* SweetAlert2 Customization */
.swal2-popup {
    border-radius: var(--border-radius);
}

/* Fullscreen Mode */
.fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-slide {
    width: 90%;
    height: 90%;
    background: white;
    border-radius: var(--border-radius);
    padding: 60px;
    overflow: auto;
}