/* App Container */
.app-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    transition: background-color var(--transition-slow) ease;
    background-color: #f3f4f6;
}



/* Main Container */
.main-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

/* Canvas Container */
#container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 90vh;
    z-index: 10;
}

/* Loading Progress */
.loading-progress-container {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 50%;
    height: 6px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    overflow: hidden;
    display: none;
    /* 默认隐藏，加载开始时显示 */
    z-index: 20;
    /* 高于canvas的z-index */
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}

.loading-progress-bar {
    height: 100%;
    width: 0;
    background: #0c83df;
    /* 将在JS中被highlightColor覆盖 */
    transition: width 0.2s ease;
}

.webgl {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    position: relative;
    z-index: 10;
}

/* Highlight Area */
.highlight {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -50%;
    width: 80%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    background-color: rgb(255 229 187);
    filter: blur(300px);
    opacity: 0.4;
    transition: all var(--transition-slow) ease;
}

header .main-navbar {
    position: relative;
    z-index: 1000;
}

/* Swatch Styles */
.swatch-item {
    cursor: pointer;
    width: 24px;
    height: 24px;
    padding: 4px;
    border-radius: 50%;
    box-shadow: var(--shadow-light);
    /* background-color: white; */
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

/* .swatch-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: currentColor;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.2;
    transition: all 0.3s ease;
    z-index: -1;
} */

.swatch-item:hover {
    transform: scale(1.25);
    box-shadow: var(--shadow-medium);
}

.swatch-item:hover::after {
    transform: translate(-50%, -50%) scale(1.5);
}

.swatch-item.active {
    transform: scale(1.25);
    box-shadow: rgba(100, 100, 111, 0.2) 0px 2px 6px 0px;
}

.swatch-item.focus-visible {
    outline: 2px solid #4A6E6A;
    outline-offset: 3px;
}

.swatch-color {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: all var(--transition-speed) ease;
    background-color: #333;
}

/* Ripple effect for swatch clicks */
.swatch-ripple-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.swatch-ripple {
    position: absolute;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    transform: scale(0);
    opacity: 0.7;
    pointer-events: none;
}

/* Keyframes */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Removed: Loading Animation Content styles (element deleted from DOM) */

/* Swatch Wrapper */
#swatch-wrapper {
    /* height: fit-content;
    position: absolute; */
    z-index: 20;
    width: 100%;
    bottom: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

/* Removed: Content Styles, Icon Styles (elements deleted from DOM) */

/* Enhanced Media Queries */
@media (max-width: 768px) {
    .swatch-item {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .highlight {
        width: 80% !important;
        left: 10% !important;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}