@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --brand-color: #338BFF;
    --text-muted: #666666;
    --border-color: #222222;
    --font-main: 'Space Grotesk', 'Noto Sans SC', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    /* Disable text selection globally during drag */
    user-select: none;
    -webkit-user-select: none;
}

/* UI Overlay Layer */
#ui-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.ui-element {
    position: absolute;
    pointer-events: auto;
}

.top-left {
    top: 2rem;
    left: 2rem;
}

.bottom-left {
    bottom: 2rem;
    left: 2rem;
}

.bottom-right {
    bottom: 2rem;
    right: 2rem;
}

/* 1. Logo Larger ~400px */
.logo {
    width: 400px;
    height: auto;
    display: block;
}

.jump-link {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.jump-link:hover,
.jump-link:active {
    opacity: 1;
    color: var(--brand-color);
    text-shadow: 0 0 10px rgba(51, 139, 255, 0.5);
}

.copyright {
    font-size: 0.8rem;
    color: #444;
}

/* 3D Scene Container */
#scene-container {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    z-index: 10;
}

#sphere {
    position: relative;
}

/* Card Styles */
.card-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 240px;
    /* Slightly larger cards */
    height: 240px;
    margin-left: -120px;
    margin-top: -120px;
    cursor: grab;
    /* Grab cursor default */
    transition: filter 0.3s ease;
}

.card-container:active {
    cursor: grabbing;
}

.card-content {
    width: 100%;
    height: 100%;
    background-color: #111;
    /* 2. Square Cards with minor radius instead of 50% */
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    position: relative;
    border: 2px solid #222;
}

.card-container:hover .card-content {
    border-color: var(--brand-color);
    box-shadow: 0 0 40px rgba(51, 139, 255, 0.4);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.card-container:hover .card-img {
    opacity: 0.8;
}

.card-title {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 1);
    pointer-events: none;
    z-index: 10;
}

.card-container:hover .card-title {
    opacity: 1;
}

/* ===== Unified Button Style ===== */
.glow-box {
    display: inline-block;
    padding: 1rem 2rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    background: transparent;
}

.glow-box:hover {
    border-color: var(--brand-color);
    box-shadow: 0 0 30px rgba(51, 139, 255, 0.4);
    color: var(--brand-color);
}

/* ===== Drawer Panel ===== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80vh;
    background: var(--bg-color);
    border-top: 2px solid var(--border-color);
    border-radius: 24px 24px 0 0;
    z-index: 10001;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 2rem;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.drawer::-webkit-scrollbar {
    display: none;
}

.drawer.active {
    transform: translateY(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.drawer-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-color);
}

.drawer-close {
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
}

.drawer-close:hover {
    color: var(--text-color);
}

.drawer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.drawer-meta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.drawer-meta-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.drawer-meta-value {
    font-size: 1.1rem;
    font-weight: 500;
}

.drawer-description {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
}

.drawer-image {
    width: 100%;
    border-radius: 12px;
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}

.drawer-link {
    margin-top: 2rem;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .top-left {
        top: 1rem;
        left: 1rem;
    }

    .bottom-left {
        bottom: 1rem;
        left: 1rem;
    }

    .bottom-right {
        bottom: 1rem;
        right: 1rem;
    }

    .logo {
        width: 300px;
    }

    .jump-link {
        font-size: 1rem;
    }

    .glow-box {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .drawer {
        height: 90vh;
        padding: 1.5rem;
    }

    .drawer-content {
        grid-template-columns: 1fr;
    }

    .drawer-title {
        font-size: 1.5rem;
    }
}