.gallery-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 200;
    display: flex;
    flex-direction: column;
}

.gallery-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.gallery-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.gallery-grid {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    align-content: start;
}

.cube-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.cube-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.cube-preview {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.cube-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cube-card:hover .cube-thumbnail {
    transform: scale(1.05);
}

.cube-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.cube-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
}

.cube-creator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.creator-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 1px solid var(--border-color);
}

.creator-name {
    font-size: 13px;
    opacity: 0.8;
}

.cube-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    opacity: 0.6;
}

.cube-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    opacity: 0.3;
}

.cube-reactions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.reaction-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    line-height: 1;
}

.reaction-btn:hover {
    background: var(--hover-bg);
    transform: scale(1.1);
}

.reaction-btn.reacted {
    animation: react 0.3s ease;
}

@keyframes react {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}