/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 25px 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 550px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    animation: fadeInModal 0.3s ease-out;
    max-height: 80vh;
    overflow-y: auto;
}

#modalItemName {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
    color: #333;
}

#modalItemImage {
    display: block;
    max-width: 60%;
    max-height: 200px;
    margin: 0 auto 20px auto;
    border-radius: 8px;
    object-fit: contain;
}

#modalRelations h3 {
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

#modalRelationList {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.related-item-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.related-item-preview:hover {
    transform: scale(1.05);
}

.related-item-preview img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 5px;
    border: 1px solid #ddd;
}

.related-item-preview span {
    font-size: 0.85em;
    color: #444;
    max-height: 2.6em;
    overflow: hidden;
    line-height: 1.3em;
}

.mystery-item {
    opacity: 0.7;
}

.mystery-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    color: #888;
    font-weight: bold;
    margin-bottom: 5px;
    border: 1px solid #ddd;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Confirm dialog styling */
.confirm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.2s ease-out;
}

.confirm-dialog-content {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.2s ease-out;
}

.confirm-dialog-content h3 {
    margin-top: 0;
    color: #d32f2f;
    font-size: 1.3rem;
}

.confirm-dialog-content p {
    margin-bottom: 20px;
    line-height: 1.5;
}

.confirm-dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.confirm-dialog-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.confirm-dialog-button:hover {
    transform: translateY(-2px);
}

.confirm-dialog-button:active {
    transform: translateY(0);
}

.confirm-dialog-button.cancel {
    background-color: #e0e0e0;
    color: #333;
}

.confirm-dialog-button.confirm {
    background-color: #2196f3;
    color: white;
}

.confirm-dialog-button.cancel:hover {
    background-color: #d5d5d5;
}

.confirm-dialog-button.confirm:hover {
    background-color: #1976d2;
}

/* Suggestions Modal Styling */
.suggestions-content {
    max-width: 800px !important;
    padding-bottom: 30px;
}

.suggestions-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.file-input-container {
    margin-top: 8px;
}

.preview-container {
    margin-top: 10px;
    max-width: 150px;
    max-height: 150px;
    overflow: hidden;
}

.preview-container img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

.suggestion-submit-btn {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'LuxeUno', sans-serif;
    font-weight: 500;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.suggestion-submit-btn:hover {
    background-color: #388e3c;
}

.suggestions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.suggestion-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.suggestion-card:hover {
    transform: translateY(-3px);
}

.suggestion-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.suggestion-card h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
}

.suggestion-card .suggestion-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.suggestion-card .play-audio {
    background-color: #2196f3;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.suggestion-card .play-audio:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Media queries for responsive design */
@media (min-width: 768px) {
    .suggestions-container {
        flex-direction: row;
    }
    
    .submit-suggestion, .view-suggestions {
        flex: 1;
    }
    
    .submit-suggestion {
        padding-right: 20px;
        border-right: 1px solid #eee;
    }
    
    .view-suggestions {
        padding-left: 20px;
    }
}