* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    overflow: hidden;
}

.container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.sketch-container {
    flex: 1;
    width: 100%;
    position: relative;
    overflow: hidden;
}

#sketch-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

.category-label {
    position: fixed;
    background: #000000;
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translateX(-50%) scale(0.8);
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    will-change: opacity, transform;
    visibility: hidden;
}

.category-label.visible {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    visibility: visible;
}

.thumbnail-bar {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 80px;
    background: #d3d3d395;
    border-radius: 8px;
    border: 1px solid #94949400;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    cursor: grab;
    display: flex;
    justify-content: center;
}

.thumbnail-container {
    display: flex;
    gap: 8px;
    padding: 8px;
    height: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0;
    position: relative;
    transform: translateZ(0);
    will-change: transform, scroll-position;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.thumbnail-container::-webkit-scrollbar {
    display: none;
}

.thumbnail-container.dragging {
    scroll-behavior: auto;
    cursor: grabbing;
    scroll-snap-type: none;
}

.thumbnail {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
    cursor: grab;
    transition: transform 0.2s ease;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

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

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.thumbnail-title {
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    transform-origin: bottom center;
}

.thumbnail:hover .thumbnail-title {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
    top: -120px;
}

.gradient-mask {
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.gradient-mask.left {
    left: 0;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 100%
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    mask-image: linear-gradient(
        to right,
        black 10%,
        black 10%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        black 10%,
        black 10%,
        transparent 100%
    );
}

.gradient-mask.right {
    right: 0;
    background: linear-gradient(
        to left,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 100%
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    mask-image: linear-gradient(
        to left,
        black 10%,
        black 10%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to left,
        black 10%,
        black 10%,
        transparent 100%
    );
}

.thumbnail-bar.dragging {
    cursor: grabbing;
}

.thumbnail-bar.dragging .thumbnail {
    cursor: grabbing;
}

@media (max-width: 1512px) {
    .thumbnail-bar {
        width: 90%;
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    .thumbnail-bar {
        height: 70px;
    }
    
    .thumbnail {
        width: 54px;
        height: 54px;
    }
    
    .gradient-mask {
        width: 100px;
    }
}

.info-button {
    position: fixed;
    top: 32px;
    right: 32px;
    z-index: 1000;
}

.info-button button {
    background: #ffffff24;
    color: #9f9f9f;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 16px;
}

.info-button button:hover {
    background: #ffffff74;
    transform: scale(1);
    color: #000000;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #ffffff 10%, #a1ff76 50%, #05c72bc5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 2000;
}

.modal-content {
    position: relative;
    margin: 0 auto;
    padding: 40px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0);

}

.modal-text {
    text-align: center;
    max-width: 600px;
}

.modal-text h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    margin-bottom: 8px;
    color: #000;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.modal-text h1 span {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    -webkit-font-smoothing: antialiased;
    width: 1.4em;
    height: 1.4em;
    vertical-align: middle;
    position: relative;
    top: -0.1em;
}

.modal-text h1 span:hover {
    transform: scale(1.2) rotate(10deg);
}

.modal-text h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    margin-bottom: 24px;
    color: #333;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.modal-text p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 32px;
}

.modal-text .small-text {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-top: 16px;
    margin-bottom: 32px;
}

.social-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 32px;
}

.social-links a {
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.social-links a:hover {
    color: #000;
}

.close {
    position: absolute;
    right: 42px;
    top: 32px;
    font-size: 32px;
    color: #333;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close:hover {
    transform: scale(1.1);
}

.info-button button {
    font-size: 18px;
    font-weight: 500;
}
