/* Logo GODUBAI */
#logo {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    width: 269px;
    height: auto;
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#logo img {
    width: 269px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Menu container */
#top-menu-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    gap: 8px;
    pointer-events: all;
}

/* Menu button */
#menu-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(0, 0, 0, 0.8);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    touch-action: manipulation;
}

#menu-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-text {
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Dropdown menu */
#dropdown-menu {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 8px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
}

#dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    color: rgba(0, 0, 0, 0.8);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    touch-action: manipulation;
}

.dropdown-item:hover {
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
    transform: translateX(2px);
}

.dropdown-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Filters toggle button */
#filters-toggle {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 997;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(0, 0, 0, 0.8);
    padding: 12px 20px;
    border-radius: 22px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    letter-spacing: -0.01em;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    gap: 8px;
}

#filters-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.filter-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Filters container */
#filters-container {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 34%;
    z-index: 998;
    transition: bottom 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    pointer-events: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

#filters-container.open {
    bottom: 0;
    pointer-events: all;
    touch-action: manipulation;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Filters close icon */
#filters-close-icon {
    position: fixed;
    top: auto;
    bottom: calc(34% + 10px);
    right: 20px;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(0, 0, 0, 0.7);
    padding: 6px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    touch-action: manipulation;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
}

#filters-close-icon.show {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
}

#filters-close-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(0) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    color: rgba(0, 0, 0, 0.9);
}

/* Filters content */
#filters-content {
    display: flex;
    gap: 8px;
    padding: 8px;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    background: transparent;
    touch-action: manipulation;
    overscroll-behavior-x: contain;
    -webkit-overscroll-behavior-x: contain;
    scroll-behavior: smooth;
}

/* Filter columns */
.filter-column {
    min-width: calc(40% - 4px);
    max-width: calc(40% - 4px);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    touch-action: manipulation;
}

.filter-column h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.7);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    flex-shrink: 0;
}

.filter-column h4 svg {
    color: rgba(0, 122, 255, 0.8);
}

/* Filter search */
.filter-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    color: rgba(0, 0, 0, 0.8);
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.filter-search:focus {
    outline: none;
    border-color: rgba(0, 122, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
}

/* Filter items */
.filter-items {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
    overscroll-behavior: contain;
    touch-action: pan-y;
    overflow-x: hidden;
}

.filter-item {
    margin: 4px 0;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.filter-item.visible {
    display: block;
}

.filter-item.top-3 {
    display: block;
}

.filter-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.filter-item label {
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    color: rgba(0, 0, 0, 0.85);
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    letter-spacing: -0.01em;
}

.filter-item input[type="checkbox"] {
    margin-right: 6px;
    transform: scale(0.9);
}

/* Settings styles */
.settings-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setting-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.setting-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.setting-toggle input[type="checkbox"]:checked + .toggle-slider {
    background: rgba(0, 122, 255, 0.8);
    border-color: rgba(0, 122, 255, 0.9);
}

.setting-toggle input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: rgba(255, 255, 255, 1);
}

.setting-label {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.8);
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.setting-description {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1.4;
    margin-left: 54px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

/* Debug styles */
#debug-toggle {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 1001;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

#debug-toggle:hover {
    background: #555;
}

#debug-window {
    position: absolute;
    bottom: 60px;
    right: 15px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    color: #00ff00;
    padding: 15px;
    border-radius: 8px;
    max-height: 300px;
    width: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    transform: translateY(100%) scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
    border: 1px solid #333;
}

#debug-window.open {
    transform: translateY(0) scale(1);
    opacity: 1;
}

#debug-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}