@charset "UTF-8";

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--font-color);
    padding-top: 40px;
}

.main-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
}

.slideshow-container {
    background-color: var(--content-bg-color);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 25px;
}

h1 {
    margin-top: 0;
    color: var(--font-color);
    text-align: center;
    margin-bottom: 10px;
}

.tool-description {
    text-align: center;
    color: var(--font-color);
    margin-bottom: 30px;
}

/* Tool info banner */
.tool-info-banner {
    display: flex;
    align-items: center;
    background-color: #e8f5e9;
    border-left: 4px solid #4CAF50;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-info-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.info-icon {
    font-size: 24px;
    margin-right: 15px;
    color: #4CAF50;
}

.info-content {
    flex: 1;
}

.info-title {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #2e7d32;
}

.info-description {
    margin: 0;
    color: #333;
    font-size: 15px;
    line-height: 1.4;
}

.info-description strong {
    font-weight: 600;
    color: #1b5e20;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed #4CAF50;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--bg-color);
}

.upload-area:hover {
    border-color: #45a049;
    background-color: rgba(76, 175, 80, 0.05);
}

.upload-area.dragover {
    border-color: #45a049;
    background-color: rgba(76, 175, 80, 0.1);
}

.upload-text {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--font-color);
}

.upload-subtext {
    color: var(--font-color);
    font-size: 14px;
}

/* Image Gallery */
.images-section {
    margin-top: 20px;
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--font-color);
    margin: 0;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    position: relative;
}

.image-item {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-color);
    cursor: move;
    transition: all 0.3s ease;
}

.image-item:hover {
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.image-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    z-index: 10;
}

.image-item.drop-target {
    border-color: var(--border-color); /* Keep normal border */
    box-shadow: none; /* Remove any glow effects */
    transform: none; /* Remove scaling */
}

.drop-indicator {
    display: none !important; /* Hide the dashed border completely */
}

.vertical-drop-line {
    position: absolute;
    background-color: #4CAF50;
    width: 4px;
    height: calc(100% + 10px);
    border-radius: 2px;
    pointer-events: none;
    z-index: 15;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.8);
    animation: dropLinePulse 1s infinite;
    top: -5px;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes glow {
    from { box-shadow: 0 0 10px rgba(76, 175, 80, 0.6); }
    to { box-shadow: 0 0 20px rgba(76, 175, 80, 0.9); }
}

@keyframes dropLinePulse {
    0%, 100% { opacity: 0.7; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.2); }
}

.image-preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.image-controls {
    padding: 10px;
}

.image-name {
    font-size: 12px;
    color: var(--font-color);
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timing-control, .transition-control {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.timing-control label, .transition-control label {
    font-size: 11px;
    color: var(--font-color);
    min-width: 50px;
}

.timing-input {
    width: 50px;
    padding: 4px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 12px;
}

.transition-input {
    flex: 1;
    padding: 4px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 11px;
    background-color: var(--content-bg-color);
    color: var(--font-color);
}

.remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.remove-btn:hover {
    background-color: #dc3545;
}

/* Settings Section */
.settings-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: start;
}

.settings-group {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-color);
    margin-bottom: 25px;
}

.settings-group h3 {
    margin: 0 0 15px 0;
    color: var(--font-color);
    font-size: 16px;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: var(--font-color);
}

.setting-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    background-color: var(--content-bg-color);
    color: var(--font-color);
}

.settings-checkboxes {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.settings-checkboxes .setting-item {
    margin-bottom: 0;
}

.setting-item-with-button {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item-with-button > div {
    flex: 1;
}

.update-all-btn {
    padding: 8px 12px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.update-all-btn:hover:not(:disabled) {
    background-color: #5a6268;
}

.update-all-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    justify-content: flex-start;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

.checkbox-group label {
    margin: 0;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}

/* Music Upload */
.music-upload-area {
    border: 2px dashed #4CAF50;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.music-upload-area:hover {
    border-color: #45a049;
    background-color: rgba(61, 141, 64, 0.05);
}

.music-info {
    padding: 10px;
    background-color: var(--content-bg-color);
    border-radius: 5px;
    margin-top: 10px;
}

.music-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}

.music-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.music-controls button {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background-color: var(--bg-color);
    color: var(--font-color);
    cursor: pointer;
    font-size: 12px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-full-width {
    width: 100%;
    max-width: none;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Fullscreen Slideshow */
.slideshow-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: black;
    z-index: 9999;
    display: none;
}

.slideshow-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 30px; /* Add padding to the slide container */
    box-sizing: border-box;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: calc(100vw - 60px);
    height: calc(100vh - 140px); /* Reduced height to account for controls and counter */
    object-fit: contain;
    object-position: center;
    margin: 10px 30px 30px 30px;
}

/* When controls are hidden, use full height */
.slideshow-fullscreen.no-controls .slide img {
    height: calc(100vh - 60px); /* Full height when controls are hidden */
    margin: 30px;
}

/* Slide counter styling */
.slide-counter {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    z-index: 100;
}

/* Hide counter when disabled */
.slide-counter.hidden {
    display: none !important;
}

/* Transition Effects */
.slide.fade {animation: fadeIn 0.5s ease;}
.slide.slide-left {animation: slideInLeft 0.6s ease-out;}
.slide.slide-right {animation: slideInRight 0.6s ease-out;}
.slide.slide-up {animation: slideInUp 0.6s ease-out;}
.slide.slide-down {animation: slideInDown 0.6s ease-out;}
.slide.rotate-in { animation: rotateIn 0.8s ease-out;}
.slide.rotate-out { animation: rotateOut 0.8s ease-out;}
.slide.zoom-in {animation: zoomIn 0.5s ease;}
.slide.zoom-out { animation: zoomOut 0.7s ease-out;}
.slide.zoom-out {animation: zoomOut 0.5s ease;}
.slide.rotate-in {animation: rotateIn 0.8s ease;}
.slide.flip-horizontal {animation: flipInX 0.8s ease;}
.slide.flip-vertical {animation: flipInY 0.8s ease;}
.slide.bounce {animation: bounceIn 1s ease;}
.slide.elastic { animation: elastic 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.slide.blur-in {animation: blurIn 0.6s ease;}
.slide.blur-out { animation: blurOut 0.6s ease-out; }
.slide.wipe-left {animation: wipeInLeft 0.8s ease-out;}
.slide.wipe-right {animation: wipeInRight 0.8s ease-out;}
.slide.wipe-up {animation: wipeInUp 0.8s ease-out;}
.slide.wipe-down {animation: wipeInDown 0.8s ease-out;}
.slide.spiral {animation: spiral 1s ease;}
.slide.cube {animation: cube 0.8s ease;}
.slide.dissolve {animation: dissolve 0.8s ease;}
.slide.matrix { animation: matrix 1s ease-out; }
.slide.glitch { animation: glitch 0.6s ease-out; }

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

@keyframes zoomOut {
    from { transform: scale(2); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes rotateIn {
    from { transform: rotate(-180deg) scale(0); opacity: 0; }
    to { transform: rotate(0deg) scale(1); opacity: 1; }
}

@keyframes rotateOut {
    from { transform: rotate(180deg) scale(2); opacity: 0; }
    to { transform: rotate(0deg) scale(1); opacity: 1; }
}

@keyframes flipInX {
    from { 
        transform: perspective(400px) rotateX(-90deg);
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotateX(-10deg);
    }
    70% {
        transform: perspective(400px) rotateX(10deg);
    }
    to { 
        transform: perspective(400px) rotateX(0deg);
        opacity: 1;
    }
}

@keyframes flipInY {
    from { 
        transform: perspective(400px) rotateY(-90deg);
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotateY(-10deg);
    }
    70% {
        transform: perspective(400px) rotateY(10deg);
    }
    to { 
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    75% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes elastic {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); opacity: 0.8; }
    75% { transform: scale(0.9); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes blurIn {
    from { filter: blur(20px); opacity: 0; transform: scale(1.1); }
    to { filter: blur(0px); opacity: 1; transform: scale(1); }
}

@keyframes blurOut {
    from { filter: blur(0px); opacity: 0; transform: scale(0.9); }
    to { filter: blur(0px); opacity: 1; transform: scale(1); }
}

@keyframes wipeInLeft {
    from { 
        clip-path: polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%);
        opacity: 1;
    }
    to { 
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
        opacity: 1;
    }
}

@keyframes wipeInRight {
    from { 
        clip-path: polygon(100% 0%, 100% 0%, 100% 100%, 100% 100%);
        opacity: 1;
    }
    to { 
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
        opacity: 1;
    }
}

@keyframes wipeInUp {
    from { 
        clip-path: polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%);
        opacity: 1;
    }
    to { 
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
        opacity: 1;
    }
}

@keyframes wipeInDown {
    from { 
        clip-path: polygon(0% 0%, 100% 0%, 100% 0%, 0% 0%);
        opacity: 1;
    }
    to { 
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
        opacity: 1;
    }
}

@keyframes spiral {
    from { transform: rotate(720deg) scale(0); opacity: 0; }
    to { transform: rotate(0deg) scale(1); opacity: 1; }
}

@keyframes cube {
    0% { transform: rotateY(-90deg) rotateX(-90deg); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: rotateY(0deg) rotateX(0deg); opacity: 1; }
}

@keyframes dissolve {
    0% { opacity: 0; filter: contrast(0) brightness(2); transform: scale(1.1); }
    50% { opacity: 0.5; filter: contrast(0.5) brightness(1.5); }
    100% { opacity: 1; filter: contrast(1) brightness(1); transform: scale(1); }
}

@keyframes matrix {
    0% { opacity: 0; transform: scaleY(0) skewX(10deg); filter: hue-rotate(90deg); }
    25% { transform: scaleY(0.25) skewX(5deg); }
    50% { opacity: 0.7; transform: scaleY(0.75) skewX(-5deg); }
    100% { opacity: 1; transform: scaleY(1) skewX(0deg); filter: hue-rotate(0deg); }
}

@keyframes glitch {
    0% { transform: translateX(0); opacity: 1; filter: hue-rotate(0deg); }
    10% { transform: translateX(-10px) scaleX(1.1); filter: hue-rotate(90deg); }
    20% { transform: translateX(10px) scaleX(0.9); opacity: 0.8; }
    30% { transform: translateX(-5px); filter: hue-rotate(180deg); }
    40% { transform: translateX(5px) scaleY(1.1); opacity: 0.9; }
    50% { transform: translateX(0) scaleY(0.9); filter: hue-rotate(270deg); }
    60% { transform: translateX(-3px); opacity: 1; }
    70% { transform: translateX(3px) scaleX(1.05); }
    80% { transform: translateX(-1px) scaleX(0.95); filter: hue-rotate(360deg); }
    90% { transform: translateX(1px); opacity: 0.95; }
    100% { transform: translateX(0) scale(1); opacity: 1; filter: hue-rotate(0deg); }
}

/* Enhanced progress bar animation */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #45a049, #66bb6a);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    z-index: 10;
}

/* Hide progress bar when disabled */
.progress-bar.hidden {
    display: none !important;
}

/* Hide controls when showControls is false */
.slideshow-controls.hidden {
    display: none !important;
}

/* Fix slideshow controls - replace existing .slideshow-controls rule */
.slideshow-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 25px;
    z-index: 100;
}

.slideshow-controls button {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    border-radius: 50%; /* Make buttons circular */
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.slideshow-controls button:hover {
    background-color: white;
    color: black;
}

/* Fix notification positioning - replace existing .status-messages rule */
.status-messages {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 10000; /* Higher z-index to appear above slideshow */
    max-width: 350px;
}

.status-message {
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease;
    word-wrap: break-word;
    border-left: 4px solid;
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
    border-left-color: #28a745;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
    border: 1px solid #f5c6cb;
}

.status-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
    border: 1px solid #bee5eb;
}

.status-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
    border: 1px solid #ffeaa7;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Dark mode support for notifications */
@media (prefers-color-scheme: dark) {
    .status-message.success {
        background-color: #1e4620;
        color: #a3d9a5;
        border-color: #28a745;
    }
    
    .status-message.error {
        background-color: #4a1e21;
        color: #f5b7b1;
        border-color: #dc3545;
    }
    
    .status-message.info {
        background-color: #1e3a42;
        color: #a8dadc;
        border-color: #17a2b8;
    }
    
    .status-message.warning {
        background-color: #3d3a1e;
        color: #f1c40f;
        border-color: #ffc107;
    }
}

@media (max-width: 768px) {
    .slideshow-controls {
        bottom: 15px;
        padding: 8px 16px;
        gap: 12px;
        border-radius: 20px;
    }
    
    .slideshow-controls button {
        width: 35px;
        height: 35px;
        font-size: 14px;
        border-radius: 50%; /* Keep circular on mobile */
    }
    
    .status-messages {
        top: 50px;
        right: 15px;
        left: 15px;
        max-width: none;
    }
    
    .status-message {
        padding: 10px 15px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .slideshow-controls {
        bottom: 10px;
        padding: 6px 12px;
        gap: 10px;
    }
    
    .slideshow-controls button {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .status-messages {
        top: 45px;
        right: 10px;
        left: 10px;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .settings-section {
        grid-template-columns: 1fr;
    }
    
    /* Stack settings vertically on mobile */
    .settings-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .settings-checkboxes {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .checkbox-group label {
        white-space: normal;
        font-size: 14px;
    }
    
    .setting-item-with-button {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .vertical-drop-line {
        width: 3px;
        height: calc(100% + 8px);
        top: -4px;
    }
    
    .settings-checkboxes {
        gap: 10px;
    }
    
    .checkbox-group {
        font-size: 13px;
    }
    
    .checkbox-group label {
        font-size: 13px;
    }
}