/* General Styles */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
    font-family: "Open Sans", sans-serif;
    color: #333;
    position: relative;
}
  .content-wrapper {
    min-height: 100vh; /* Fallback */
    min-height: calc(var(--vh, 1vh) * 100);
    padding: 20px;
}
body {
    background-image: url('/assets/images/wallpaper removed.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: inherit;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.background-selection {
    text-align: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.background-selection h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #fff;
}

/* Background Grid */
.background-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.bg-option {
    position: relative;
    width: 100%;
    height: 150px;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
    background: rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.bg-option .bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bg-option .bg-image.loaded {
    opacity: 1;
}

.bg-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #00bcd4;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Loading Spinner */
.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.2rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 10;
    width: 100%;
    max-width: 720px;
    opacity: 1;
    color: #fff;
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Subtle white border */
    backdrop-filter: blur(15px) saturate(180%); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(15px) saturate(180%); 
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Soft shadow */
    transform: translate(-50%, -70%);
    padding: 20px;
    transition: transform 0.3s ease, opacity 0.1s;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.confirm-btn, .cancel-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.confirm-btn {
    background: #00bcd4;
    color: #fff;
}

.confirm-btn:hover {
    background: #0097a7;
}

.cancel-btn {
    background: #f0f0f0;
    color: #333;
}

.cancel-btn:hover {
    background: #ddd;
}