/* Appearance Dropdown Menu Styles */

.appearance-dropdown {
    position: relative;
    display: inline-block;
}

.appearance-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--info-bg);
    border: 1px solid var(--block-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.appearance-trigger:hover {
    background: var(--block-bg);
    border-color: var(--accent);
}

.appearance-trigger-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.appearance-trigger:hover .appearance-trigger-icon {
    transform: rotate(30deg);
}

.appearance-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    background: var(--foreground);
    border: 1px solid var(--block-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.appearance-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.appearance-menu-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--block-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.appearance-menu-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.appearance-menu-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.appearance-menu-close:hover {
    background: var(--block-bg);
}

.appearance-menu-close svg {
    width: 16px;
    height: 16px;
    color: var(--text-primary);
}

.appearance-menu-content {
    padding: 12px 0;
    max-height: 400px;
    overflow-y: auto;
}

.appearance-section {
    padding: 8px 0;
}

.appearance-section:not(:last-child) {
    border-bottom: 1px solid var(--block-border);
}

.appearance-section-title {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.appearance-section-title svg {
    width: 14px;
    height: 14px;
}

.appearance-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.appearance-option:hover {
    background: var(--block-bg);
}

.appearance-option.active {
    background: var(--info-bg);
}

.appearance-option-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--block-bg);
    border: 1px solid var(--block-border);
    border-radius: 8px;
    flex-shrink: 0;
}

.appearance-option-icon svg,
.appearance-option-icon img {
    width: 20px;
    height: 20px;
}

.appearance-option-content {
    flex: 1;
    min-width: 0;
}

.appearance-option-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.appearance-option-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 2px 0 0 0;
}

.appearance-option-check {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex-shrink: 0;
    display: none;
}

.appearance-option.active .appearance-option-check {
    display: block;
}

/* Color Theme Swatches */
.theme-swatch {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid rgba(90, 63, 138, 0.15);
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.theme-swatch-color {
    flex: 1;
    width: 100%;
}

.theme-swatch-color:first-child {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Full Settings Link */
.appearance-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--block-border);
    background: var(--info-bg);
    border-radius: 0 0 12px 12px;
}

.appearance-footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--block-bg);
    border: 1px solid var(--block-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.appearance-footer-link:hover {
    background: var(--info-bg);
}

.appearance-footer-link svg {
    width: 16px;
    height: 16px;
}

/* Icon Preview Grid */
.icon-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 4px;
    background: var(--info-bg);
    border-radius: 6px;
}

.icon-preview-item {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--block-bg);
    border: 1px solid var(--block-border);
    border-radius: 4px;
}

.icon-preview-item svg {
    width: 14px;
    height: 14px;
    color: var(--accent);
}

/* Scrollbar Styling */
.appearance-menu-content::-webkit-scrollbar {
    width: 6px;
}

.appearance-menu-content::-webkit-scrollbar-track {
    background: var(--info-bg);
    border-radius: 3px;
}

.appearance-menu-content::-webkit-scrollbar-thumb {
    background: var(--block-border);
    border-radius: 3px;
}

.appearance-menu-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .appearance-menu {
        right: -16px;
        min-width: 260px;
    }

    .appearance-trigger span {
        display: none;
    }
}

/* New Year Patterns - Toggle Switch */
.ny-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.ny-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ny-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.ny-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.ny-toggle input:checked + .ny-toggle-slider {
    background-color: #6DB8D4;
}

.ny-toggle input:checked + .ny-toggle-slider:before {
    transform: translateX(20px);
}

/* New Year Patterns Container */
#newYearPatterns {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

#newYearPatterns img {
    opacity: 0.5;
    transition: opacity 0.4s ease;
    pointer-events: none;
    user-select: none;
}
