/* Songs Page Styling */

.admin-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px 0;
}

.btn-admin {
    padding: 10px 16px;
    font-size: 0.95rem;
    border: 2px solid #7a5a5a;
    background-color: #2a1a1a;
    color: #9a7a7a;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
}

.btn-admin:hover {
    background-color: #3a2a2a;
    color: #b0a0a0;
    border-color: #9a7a7a;
}

.btn-admin.active {
    background-color: #6a4a4a;
    color: #d0a0a0;
    border-color: #9a7a7a;
}

.btn-admin:disabled {
    background-color: #1a0f0f;
    color: #5a4a4a;
    border-color: #3a2a2a;
    cursor: not-allowed;
    opacity: 0.6;
}

.admin-status {
    font-size: 0.9rem;
    color: #6a4a4a;
    font-weight: bold;
}

.admin-status.hidden {
    display: none;
}

.admin-status.show {
    display: inline;
}

.songs-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: #0f0f0f;
}

.songs-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #a08080;
    font-size: 2rem;
    border-bottom: 2px solid #5a3a3a;
    padding-bottom: 15px;
}

/* Controls */
.songs-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.search-container {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    font-size: 1rem;
    border: 2px solid #7a5a5a;
    background-color: #1a1a1a;
    color: #c0a0a0;
    border-radius: 0;
    transition: all 0.2s ease;
}

.search-input::placeholder {
    color: #7a5a5a;
}

.search-input:focus {
    outline: none;
    border-color: #9a7a7a;
    background-color: #2a1a1a;
    box-shadow: 0 0 8px rgba(160, 128, 128, 0.2);
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    font-size: 1rem;
    border: 2px solid #7a5a5a;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
}

.btn-primary {
    background-color: #6a4a4a;
    color: #d0a0a0;
}

.btn-primary:hover {
    background-color: #7a5a5a;
    color: #e0b0b0;
}

.btn-secondary {
    background-color: #2a1a1a;
    color: #9a7a7a;
}

.btn-secondary:hover {
    background-color: #3a2a2a;
    color: #b0a0a0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
}

.modal.hidden {
    display: none;
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: #1a1a1a;
    color: #b0b0b0;
    margin: 5% auto;
    padding: 30px;
    border: 2px solid #5a3a3a;
    border-radius: 0;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
}

.close-btn {
    color: #9a7a7a;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #d0a0a0;
}

.modal-content h2 {
    margin-top: 0;
    color: #a08080;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #9a7a7a;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #3a2a2a;
    border-radius: 0;
    font-size: 1rem;
    font-family: inherit;
    background-color: #0f0f0f;
    color: #b0b0b0;
    box-sizing: border-box;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #7a5a5a;
    box-shadow: 0 0 5px rgba(122, 90, 90, 0.5);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Songs List */
.songs-list {
    display: grid;
    gap: 30px;
}

.song-card {
    background-color: #1a1a1a;
    border: 2px solid #5a3a3a;
    border-radius: 0;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.song-details {
    padding-top: 20px;
    animation: slideDown 0.2s ease;
}

.song-details.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

.song-header {
    border-bottom: 2px solid #5a3a3a;
    padding-bottom: 15px;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.song-header.clickable {
    cursor: pointer;
    user-select: none;
}

.song-card:has(.song-header:hover) {
    background-color: #252525;
    border-color: #7a5a5a;
}


.expand-indicator {
    color: #9a7a7a;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.song-header.expanded .expand-indicator {
    transform: rotate(180deg);
}

.song-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: #a08080;
    margin: 0 0 8px 0;
    flex: 1;
}

.song-key {
    font-size: 1rem;
    color: #666666;
    font-style: italic;
    margin: 0;
    flex-shrink: 0;
    padding-left: 10px;
}

.song-section {
    margin-bottom: 20px;
}

.song-section-title {
    font-weight: bold;
    color: #9a7a7a;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.song-section-content {
    color: #b0b0b0;
    line-height: 1.6;
    padding-left: 15px;
    border-left: 2px solid #3a2a2a;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.song-lyrics {
    background-color: #0f0f0f;
    padding: 15px;
    border-radius: 0;
    border: 1px solid #3a2a2a;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    color: #808080;
    line-height: 1.8;
}

.song-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.btn-edit, .btn-delete {
    padding: 8px 16px;
    font-size: 0.9rem;
    border: 2px solid;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
}

.btn-edit {
    background-color: transparent;
    color: #9a7a7a;
    border-color: #7a5a5a;
}

.btn-edit:hover {
    background-color: #5a3a3a;
    color: #d0a0a0;
}

.btn-delete {
    background-color: transparent;
    color: #b08080;
    border-color: #8a6a6a;
}

.btn-delete:hover {
    background-color: #5a3a3a;
    color: #d0a0a0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #555555;
}

.empty-state p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #666666;
}

/* Tab Form Styling */
.tab-item {
    background-color: #0f0f0f;
    border: 1px solid #3a2a2a;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 0;
}

.tab-item-header {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.tab-item-header input {
    flex: 1;
    padding: 8px;
    border: 1px solid #3a2a2a;
    background-color: #1a1a1a;
    color: #b0b0b0;
    border-radius: 0;
}

.tab-item-header button {
    padding: 8px 12px;
    background-color: transparent;
    color: #b08080;
    border: 2px solid #8a6a6a;
    cursor: pointer;
    border-radius: 0;
    font-weight: bold;
}

.tab-item-header button:hover {
    background-color: #5a3a3a;
}

.tab-item textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #3a2a2a;
    background-color: #0f0f0f;
    color: #b0b0b0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    min-height: 120px;
    resize: vertical;
    box-sizing: border-box;
    border-radius: 0;
}

.tab-item textarea:focus {
    outline: none;
    border-color: #7a5a5a;
}

/* Tab Display Styling */
.song-tabs {
    margin-top: 20px;
}

.song-tab {
    background-color: #0f0f0f;
    border: 1px solid #3a2a2a;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 0;
}

.song-tab-title {
    font-weight: bold;
    color: #9a7a7a;
    font-size: 1rem;
    margin-bottom: 10px;
}

.song-tab-content {
    background-color: #0f0f0f;
    border: 1px solid #3a2a2a;
    padding: 12px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    color: #808080;
    line-height: 1.4;
    white-space: pre;
    word-break: break-all;
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    * {
        font-family: Arial, Helvetica, sans-serif;
    }

    .songs-container {
        padding: 10px;
        max-width: 100%;
    }

    .songs-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 20px;
    }

    .search-container {
        min-width: 0;
        max-width: 100%;
    }

    .search-input {
        font-size: 0.95rem;
        padding: 8px 10px;
    }

    .btn-primary, .btn-secondary {
        font-size: 0.95rem;
        padding: 8px 12px;
    }

    .songs-container h1 {
        font-size: 1.3rem;
        padding-bottom: 8px;
        margin-bottom: 15px;
    }

    .modal-content {
        width: 90%;
        margin: 20% auto;
        padding: 20px;
        max-width: 95%;
    }

    .modal-content h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 8px;
        font-size: 0.9rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 8px;
    }

    .form-actions button {
        width: 100%;
    }

    .song-card {
        padding: 15px;
        margin-bottom: 15px;
    }

    .song-name {
        font-size: 1.3rem;
        margin-bottom: 5px;
    }

    .song-key {
        font-size: 0.9rem;
    }

    .song-section {
        margin-bottom: 15px;
    }

    .song-section-title {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }

    .song-section-content {
        font-size: 0.9rem;
        padding-left: 10px;
    }

    .song-lyrics {
        font-size: 0.85rem;
        padding: 10px;
        line-height: 1.6;
    }

    .song-tab {
        padding: 12px;
        margin-bottom: 12px;
    }

    .song-tab-title {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .song-tab-content {
        font-size: 0.75rem;
        padding: 10px;
        overflow-x: auto;
        line-height: 1.3;
    }

    .song-actions {
        flex-direction: column;
        gap: 8px;
        margin-top: 15px;
    }

    .btn-edit, .btn-delete {
        width: 100%;
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .tab-item {
        padding: 12px;
        margin-bottom: 12px;
    }

    .tab-item-header {
        flex-direction: column;
        gap: 8px;
    }

    .tab-item-header input {
        width: 100%;
    }

    .tab-item-header button {
        width: 100%;
    }

    .tab-item textarea {
        font-size: 0.85rem;
        min-height: 100px;
    }

    .close-btn {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .songs-container {
        padding: 4px;
    }

    .songs-controls {
        gap: 6px;
    }

    .search-input {
        font-size: 0.9rem;
        padding: 6px 6px;
    }

    .btn-primary, .btn-secondary {
        font-size: 0.9rem;
        padding: 6px 8px;
    }

    .songs-container h1 {
        font-size: 1.1rem;
        padding-bottom: 4px;
        margin-bottom: 8px;
    }

    .empty-state {
        padding: 40px 15px;
    }

    .empty-state p {
        font-size: 1rem;
    }
}
