:root {
    --r-background-color: #0a0a0a;
    --r-main-color: #f0f0f0;
    --accent-color: #00d9ff;
}

.reveal {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.reveal .slides {
    text-align: center;
}

.reveal section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 20px 0px 20px;
    box-sizing: border-box;
}

.reveal section img {
    max-width: calc((100vw - 40px) * 0.9);
    max-height: calc((100vh - 44px) * 0.9);
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 217, 255, 0.3);
    border-radius: 4px;
}

.reveal section video {
    max-width: calc((100vw - 40px) * 0.9);
    max-height: calc((100vh - 44px) * 0.9);
    box-shadow: 0 20px 60px rgba(0, 217, 255, 0.3);
    border-radius: 4px;
}

.slide-counter {
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    color: var(--accent-color);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(0, 217, 255, 0.4);
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.left-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 100;
}

.filename-display {
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 12px;
    color: var(--accent-color);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(0, 217, 255, 0.4);
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
    font-weight: bold;
    height: 25px;
    display: flex;
    align-items: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.filename-display a {
    color: var(--accent-color);
    text-decoration: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.filename-display a:hover {
    text-decoration: underline;
}

.nav-buttons {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
    align-items: center;
}

.right-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 100;
}

.nav-button {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 217, 255, 0.4);
    backdrop-filter: blur(15px);
    width: 42px;
    height: 42px;
    border-radius: 21px;
    color: var(--accent-color);
    font-size: 26px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    box-sizing: border-box;
}

.nav-button:hover {
    background: rgba(0, 217, 255, 0.35);
    border-color: rgba(0, 217, 255, 0.6);
    transform: scale(1.05);
}

.nav-button:active {
    transform: scale(0.95);
}

.autoplay-toggle {
    width: 80px;
    height: 42px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 217, 255, 0.4);
    backdrop-filter: blur(15px);
    border-radius: 21px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 3px;
    box-sizing: border-box;
}

.autoplay-toggle:hover {
    border-color: rgba(0, 217, 255, 0.6);
}

.autoplay-toggle.active {
    background: rgba(0, 217, 255, 0.3);
}

.autoplay-knob {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.autoplay-toggle.active .autoplay-knob {
    transform: translateX(38px);
}

.control-button {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 217, 255, 0.4);
    backdrop-filter: blur(15px);
    width: 42px;
    height: 42px;
    border-radius: 21px;
    color: var(--accent-color);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    box-sizing: border-box;
}

.control-button:hover {
    background: rgba(0, 217, 255, 0.35);
    border-color: rgba(0, 217, 255, 0.6);
    transform: scale(1.05);
}

.control-button:active {
    transform: scale(0.95);
}

.favorites-button.active {
    color: #ff4444;
}

.delay-button {
    font-family: monospace;
    font-size: 18px;
}

.filter-button {
    font-size: 20px;
    line-height: 1;
}

.filter-dropdown {
    position: absolute;
    top: 52px;
    left: 484px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(0, 217, 255, 0.4);
    border-radius: 15px;
    backdrop-filter: blur(15px);
    padding: 8px;
    min-width: 150px;
    z-index: 200;
    transition: opacity 0.2s ease;
}

.filter-dropdown.hidden {
    opacity: 0;
    pointer-events: none;
}

.filter-option {
    color: var(--accent-color);
    font-family: monospace;
    font-size: 14px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-option:hover {
    background: rgba(0, 217, 255, 0.2);
}

.filter-check {
    width: 16px;
    text-align: center;
    font-weight: bold;
}

.tags-panel {
    position: fixed;
    top: 100px;
    right: 100px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(0, 217, 255, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    z-index: 3000;
    min-width: 110px;
    transition: opacity 0.3s ease;
}

.tags-panel.hidden {
    opacity: 0;
    pointer-events: none;
}

.tags-panel-header {
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 10px;
    border-radius: 18px 18px 0 0;
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--accent-color);
    font-family: monospace;
    font-weight: bold;
    font-size: 12px;
    user-select: none;
}

.tags-close {
    background: transparent;
    border: none;
    color: var(--accent-color);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.tags-close:hover {
    transform: scale(1.2);
}

.tags-panel-body {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tag-button {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 217, 255, 0.4);
    border-radius: 15px;
    color: var(--accent-color);
    font-family: monospace;
    font-size: 11px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.tag-button:hover {
    background: rgba(0, 217, 255, 0.3);
    border-color: rgba(0, 217, 255, 0.6);
}

.tag-button.active {
    background: rgba(0, 217, 255, 0.5);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
}

.tag-export-button {
    background: rgba(0, 217, 255, 0.3);
    border: 2px solid rgba(0, 217, 255, 0.6);
    border-radius: 15px;
    color: var(--accent-color);
    font-family: monospace;
    font-weight: bold;
    font-size: 11px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.tag-export-button:hover {
    background: rgba(0, 217, 255, 0.5);
    transform: scale(1.05);
}

.tag-export-button:active {
    transform: scale(0.95);
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--r-background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1000;
    transition: opacity 0.5s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 217, 255, 0.2);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--accent-color);
    font-size: 18px;
}

.jump-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.3s ease;
}

.jump-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.jump-input-container {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 217, 255, 0.4);
    border-radius: 25px;
    padding: 20px;
    backdrop-filter: blur(15px);
    display: flex;
    gap: 10px;
    align-items: center;
}

.jump-input {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 217, 255, 0.4);
    border-radius: 25px;
    color: var(--accent-color);
    font-family: monospace;
    font-weight: bold;
    font-size: 24px;
    padding: 10px 20px;
    width: 150px;
    text-align: center;
    outline: none;
    height: 50px;
    box-sizing: border-box;
}

.jump-input:focus {
    border-color: rgba(0, 217, 255, 0.8);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.jump-input::placeholder {
    color: rgba(0, 217, 255, 0.5);
}

.jump-button {
    background: rgba(0, 217, 255, 0.3);
    border: 2px solid rgba(0, 217, 255, 0.6);
    border-radius: 25px;
    color: var(--accent-color);
    font-size: 16px;
    font-weight: bold;
    font-family: monospace;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jump-button:hover {
    background: rgba(0, 217, 255, 0.5);
    transform: scale(1.05);
}

.jump-button:active {
    transform: scale(0.95);
}