:root {
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-hover-bg: rgba(255, 255, 255, 0.06);
    --sidebar-width: 260px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100vh;
}

.app-container {
    display: flex;
    flex: 1;
    height: 100%;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: var(--glass-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    z-index: 10;
    height: 100%;
    flex-shrink: 0;
}

.sidebar-header {
    margin-bottom: 40px;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom Scrollbar for Sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.nav-item {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dim);
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font);
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    text-align: left;
    width: 100%;
    font-size: 0.95rem;
}

.nav-item.active {
    background: rgba(61, 90, 254, 0.1);
    border-color: var(--primary);
    color: var(--text);
}

.nav-item:hover:not(.active) {
    background: var(--card-hover-bg);
    color: var(--text);
}

.section-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px 0 10px 10px;
    opacity: 0.6;
}

/* Main Content Area */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    scroll-behavior: smooth;
}

.gallery-header {
    margin-bottom: 40px;
}

.gallery-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.gallery-header p {
    color: var(--text-dim);
}

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}

.sticker-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.sticker-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover-bg);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.sticker-container {
    width: 100%;
    height: 100%;
}

.sticker-info {
    position: absolute;
    bottom: 10px;
    right: 12px;
    font-size: 0.7rem;
    color: var(--text-dim);
    font-family: var(--mono);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sticker-card:hover .sticker-info {
    opacity: 0.6;
}

.loading-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-dim);
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: 180px;
        padding: 20px 15px;
    }
    .sidebar .brand span {
        display: none;
    }
}

@media (max-width: 600px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        padding: 10px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .sidebar-header {
        margin-bottom: 0;
        margin-right: 20px;
    }
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }
    .nav-item {
        white-space: nowrap;
        padding: 8px 15px;
    }
    .section-label {
        display: none;
    }
}
