* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

html {
    height: 100%;
    overflow-y: auto;
}

body {
    background-color: #121212;
    color: #f1f1f1;
    height: 100%;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    padding-top: 60px;
}

header {
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 2px solid #ff5500;
    padding-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    color: #ff5500;
    margin-bottom: 10px;
}

.title-link {
    color: #ff5500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.title-link:hover {
    color: #ff7733;
    text-decoration: none;
}

h2 {
    font-size: 1.8rem;
    color: #cccccc;
}

h3 {
    font-size: 1.5rem;
    color: #ff5500;
    margin-bottom: 20px;
}

h4 {
    font-size: 1.3rem;
    color: #ff5500;
    margin-bottom: 15px;
    margin-top: 30px;
}

.actions-bar {
    display: flex;
    justify-content: flex-start;
    margin-top: 4px;
    z-index: 10;
}

.search-actions-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    width: 100%;
}

.search-actions-container .search-container {
    flex-grow: 1;
    margin-right: 20px;
}

.search-actions-container .actions-bar {
    margin-bottom: 0;
    position: static;
    display: flex;
    align-items: center;
}

.btn-add, .btn-back {
    display: inline-block;
    background-color: #ff5500;
    color: #fff;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-add:hover, .btn-back:hover {
    background-color: #e64c00;
}

.btn-back {
    background-color: #444;
}

.btn-back:hover {
    background-color: #333;
}

.musikstuecke-liste, .musikstueck-details, .form-container {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Title with edit icon */
.title-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.title-container h3 {
    margin-bottom: 0;
    margin-right: 15px;
}

.duration-display {
    font-size: 0.7em;
    color: #888;
    font-weight: normal;
}

.edit-title-btn {
    color: #888;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.edit-title-btn:hover {
    color: #ff5500;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
}

th {
    background-color: #333;
    color: #ff5500;
    font-weight: bold;
    text-transform: uppercase;
}

th.sortable {
    cursor: pointer;
    position: relative;
    user-select: none;
}

th.sortable:hover {
    background-color: #3a3a3a;
}

th.sortable i {
    margin-left: 5px;
    font-size: 0.8em;
    opacity: 0.5;
}

th.sortable:hover i {
    opacity: 1;
}

tr:nth-child(even) {
    background-color: #252525;
}

tr:hover {
    background-color: #303030;
}

.keine-stuecke {
    color: #ff5500;
    font-size: 1.2rem;
    text-align: center;
    padding: 20px;
}

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-view {
    background-color: #555;
}

.btn-view:hover {
    background-color: #ff5500;
}

.btn-edit {
    background-color: #666;
    color: #fff;
}

.btn-edit:hover {
    background-color: #ff5500;
}

.btn-delete {
    background-color: #777;
}

.btn-delete:hover {
    background-color: #ff5500;
}

.btn-save {
    background-color: #ff5500;
}

.btn-save:hover {
    background-color: #e64c00;
}

.btn-cancel {
    background-color: #555;
}

.btn-cancel:hover {
    background-color: #444;
}

.delete-form {
    display: inline;
}

/* Details Seite */
.details-card {
    background-color: #252525;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.detail-row {
    margin-bottom: 15px;
    display: flex;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.label {
    font-weight: bold;
    color: #ff5500;
    width: 100px;
}

.value {
    color: #f1f1f1;
}

.actions-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Formular Styles */
.form-group {
    margin-bottom: 20px;
    position: relative; /* Für Autocomplete */
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #ff5500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #444;
    background-color: #252525;
    color: #f1f1f1;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #ff5500;
    box-shadow: 0 0 5px rgba(255, 85, 0, 0.5);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.error-message {
    background-color: #333;
    border-left: 4px solid #ff5500;
    color: white;
    padding: 10px 15px;
    border-radius: 0 4px 4px 0;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Autocomplete Styles */
.autocomplete-container {
    position: absolute;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background-color: #252525;
    border-radius: 0 0 4px 4px;
    transition: max-height 0.3s;
    z-index: 1000;
    border: 1px solid #444;
    border-top: none;
    display: none;
}

.autocomplete-container.show {
    max-height: 200px;
    overflow-y: auto;
    display: block;
}

.autocomplete-suggestion {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #333;
    transition: background-color 0.2s;
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.autocomplete-suggestion:hover, 
.autocomplete-suggestion.selected {
    background-color: #333;
    color: #ff5500;
}

/* Neue Styles für File Upload */
.files-section {
    margin-top: 30px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

.dropzone {
    border: 2px dashed #444;
    border-radius: 6px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.dropzone:hover {
    border-color: #ff5500;
    background-color: rgba(255, 85, 0, 0.05);
}

.dropzone.highlight {
    border-color: #ff5500;
    background-color: rgba(255, 85, 0, 0.1);
}

.dropzone-prompt p {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.small-text {
    font-size: 0.8rem;
    color: #888;
}

.files-list {
    margin-top: 15px;
}

.file-item {
    background-color: #252525;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-link {
    display: flex;
    align-items: center;
    color: #f1f1f1;
    text-decoration: none;
    flex-grow: 1;
}

.file-link:hover .file-name {
    text-decoration: underline;
    color: #ff5500;
}

.file-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.file-icon {
    font-size: 1.5rem;
    margin-right: 10px;
    color: #888;
}

.file-name {
    font-size: 1rem;
    transition: color 0.3s;
}

.btn-delete-file {
    background-color: transparent;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.btn-delete-file:hover {
    color: #ff5500;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-download-file {
    background-color: transparent;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.btn-download-file:hover {
    color: #00d084;
    text-decoration: none;
}

.no-files-message {
    color: #888;
    font-style: italic;
    margin-top: 10px;
}

.audio-player {
    display: flex;
    align-items: center;
    flex-grow: 1;
    flex-wrap: wrap;
}

.audio-player audio {
    margin-left: 15px;
    /* max-width: 250px; */
}

/* Volume Control Styles */
.volume-container {
    display: flex;
    align-items: center;
    margin-top: 8px;
    margin-left: 30px;
}

.volume-icon {
    color: #888;
    font-size: 1.2rem;
    margin-right: 8px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.volume-icon:hover, 
.volume-icon.active {
    color: #ff5500;
}

.volume-slider {
    -webkit-appearance: none;
    width: 80px;
    height: 5px;
    border-radius: 5px;
    background: #444;
    outline: none;
    margin: 0 5px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5500;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5500;
    cursor: pointer;
    border: none;
}

.volume-slider::-ms-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5500;
    cursor: pointer;
}

.volume-slider:focus {
    outline: none;
}

.volume-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 5px;
    cursor: pointer;
    border-radius: 5px;
}

.volume-slider::-moz-range-track {
    width: 100%;
    height: 5px;
    cursor: pointer;
    border-radius: 5px;
}

.volume-slider::-ms-track {
    width: 100%;
    height: 5px;
    cursor: pointer;
    border-radius: 5px;
}

.volume-value {
    color: #888;
    font-size: 0.8rem;
    min-width: 30px;
    text-align: center;
}

/* Toast Nachrichten */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s, transform 0.3s;
}

.toast.success {
    background-color: #333;
    border-left: 4px solid #ff5500;
}

.toast.error {
    background-color: #333;
    border-left: 4px solid #ff5500;
}

.toast.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

footer {
    margin-top: 50px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.readonly-field {
    background-color: #333 !important;
    color: #888 !important;
    cursor: not-allowed;
    border-color: #444 !important;
}

.field-hint {
    font-size: 0.8rem;
    color: #ff5500;
    margin-top: 5px;
    font-style: italic;
}

.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.clickable-audio {
    cursor: pointer;
    transition: color 0.3s;
}

.clickable-audio:hover {
    color: #ff5500;
    text-decoration: underline;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    color: #888;
    font-size: 1.1rem;
}

#search-input {
    width: 100%;
    padding: 12px 40px 12px 45px;
    border-radius: 30px;
    border: 2px solid #444;
    background-color: #252525;
    color: #f1f1f1;
    font-size: 1rem;
    transition: all 0.3s;
}

#search-input:focus {
    outline: none;
    border-color: #ff5500;
    box-shadow: 0 0 10px rgba(255, 85, 0, 0.3);
}

#search-input::placeholder {
    color: #666;
    font-style: italic;
}

.clear-search {
    position: absolute;
    right: 15px;
    background-color: transparent;
    border: none;
    color: #888;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s;
}

.clear-search:hover {
    color: #ff5500;
}

#no-results-message {
    color: #ff5500;
    font-style: italic;
    margin-top: 15px;
    text-align: center;
}

/* Player styles moved to player.css */

/* PDF Viewer Modal */
.pdf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.pdf-modal.show {
    display: flex;
}

.pdf-container {
    width: calc(100% - 40px);
    height: calc(100vh - 80px); /* Default: Account for bottom player (90px) + padding (40px) */
    position: relative;
    background-color: #252525;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    max-width: none;
}

.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333;
    padding: 10px 15px;
    border-bottom: 1px solid #444;
    flex-shrink: 0;
}

.pdf-title {
    color: #ff5500;
    font-weight: bold;
    font-size: 1.1rem;
    margin: 0;
}

.pdf-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-raw-btn, .pdf-download-btn, .pdf-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    padding: 5px;
    border-radius: 4px;
}

.pdf-raw-btn:hover {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

.pdf-download-btn:hover, .pdf-close-btn:hover {
    color: #ff5500;
    background-color: rgba(255, 85, 0, 0.1);
}

.pdf-viewer {
    width: 100%;
    height: calc(100% - 60px); /* Account for header height */
    border: none;
    background-color: #f5f5f5;
}

/* When there's no bottom player, use full height */
.pdf-modal.no-player .pdf-container {
    height: calc(100vh - 40px); /* Only account for padding when no player */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

.centered-title {
    margin: 0;
    text-align: center;
    flex-grow: 1;
    max-width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-container .btn-back, 
.header-container .delete-form {
    flex-shrink: 0;
    min-width: 120px;
}

.header-container .delete-form {
    display: flex;
    justify-content: flex-end;
}

/* Responsive Design für Header */
@media screen and (max-width: 768px) {
    .header-container {
        flex-wrap: nowrap;
    }
    
    .header-container .btn-back, 
    .header-container .delete-form,
    .header-container .btn-delete {
        min-width: auto;
    }
    
    .centered-title {
        max-width: 60%;
        font-size: 1.2rem;
    }
    
    .file-actions {
        gap: 10px;
    }
    
    .btn-download-file,
    .btn-delete-file {
        font-size: 1.7rem;
        padding: 5px 8px;
    }
}

/* Responsive PDF modal adjustments */
@media screen and (max-width: 768px) {
    .pdf-modal {
        padding: 10px;
    }
    
    .pdf-container {
        width: calc(100% - 20px);
        height: calc(100vh - 120px); /* Account for mobile player and padding */
        border-radius: 4px;
    }
    
    .pdf-header {
        padding: 8px 12px;
    }
    
    .pdf-title {
        font-size: 1rem;
    }
    
    .pdf-modal.no-player .pdf-container {
        height: calc(100vh - 20px);
    }
}

@media screen and (max-width: 480px) {
    .pdf-modal {
        padding: 5px;
    }
    
    .pdf-container {
        width: calc(100% - 10px);
        height: calc(100vh - 110px);
    }
    
    .pdf-modal.no-player .pdf-container {
        height: calc(100vh - 10px);
    }
} 