/* --- THE FIXED CONTAINER --- */
/* This holds both the button and the menu together in the corner */
.settings-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10; 
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Aligns menu to the right */
}

/* --- SETTINGS --- */
#settings-btn {
    background-color: #333;
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;

    border-radius: 50%; 
    width: 50px;
    height: 50px;
    cursor: pointer;
    
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

#settings-btn:hover {
    transform: rotate(90deg);
    background-color: #555;
}

 /* --- THE POP-UP MENU --- */
.settings-menu {
    /* Hidden by default */
    display: none;
    
    /* Positioning relative to the container */
    margin-top: 10px;
    background-color: white;
    width: 200px;
    border-radius: 8px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid #e1e1e1;
    
    /* Animation state */
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* The class Javascript adds to show the menu */
.settings-menu.show {
    display: block;
    /* Small delay to allow display:block to apply before animating opacity */
    animation: fadeIn 0.3s forwards;
}

/* Menu Items */
.settings-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.settings-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.settings-menu li:last-child {
    border-bottom: none;
}

.settings-menu a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.2s;
}

.settings-menu a:hover {
    background-color: #f9f9f9;
    color: #007bff;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}