:root {
    --blue: #0952C1;
    --blue-dark: #073d92;
    --bg: #FAFAFA;
}

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

body {
    background-color: var(--bg);
    font-family: Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    cursor: crosshair;
}

body.shake {
    animation: screen-shake 0.3s ease-out;
}

@keyframes screen-shake {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-4px, 3px); }
    40% { transform: translate(4px, -3px); }
    60% { transform: translate(-3px, -2px); }
    80% { transform: translate(2px, 2px); }
    100% { transform: translate(0, 0); }
}

.top-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.sound-toggle,
.social-button {
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(9, 82, 193, 0.25);
}

.sound-toggle:hover,
.social-button:hover {
    background: var(--blue-dark);
    transform: scale(1.1);
}

.sound-toggle.muted {
    background: #8aa9d6;
}

.gallery-button {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.container {
    position: relative;
    text-align: center;
    z-index: 1;
    width: 90%;
    max-width: 90vw;
    min-height: 78vh;
    margin: 0 auto;
    padding: 46px 5% 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.logo {
    position: absolute;
    right: 100%;
    top: 7.9rem; /* visual center of the 16rem Anton caps, not the text block */
    transform: translateY(-50%);
    margin-right: 2.5rem;
    width: 180px;
    height: 180px;
}

.title-block {
    position: relative;
    text-align: right;
}

.title {
    font-family: 'Anton', sans-serif;
    font-size: 16rem;
    font-weight: bold;
    color: var(--blue);
    line-height: 1;
    margin-bottom: 0;
}

.on-usdc {
    font-family: 'Anton', sans-serif;
    font-size: 1.6rem;
    color: black;
    letter-spacing: 0.35em;
    margin-right: -0.35em;
    text-transform: uppercase;
    margin-top: -0.4rem;
}

.contract-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0.2rem 0 0.5rem;
}

.contract-label {
    font-family: 'Anton', sans-serif;
    color: black;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contract-card {
    min-width: 220px;
    background: white;
    color: var(--blue);
    border: 2px solid rgba(9, 82, 193, 0.18);
    border-radius: 14px;
    padding: 12px 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(9, 82, 193, 0.16);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.contract-card:hover {
    transform: translateY(-2px);
    border-color: rgba(9, 82, 193, 0.45);
    box-shadow: 0 8px 24px rgba(9, 82, 193, 0.22);
}

.contract-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.2;
}

.contract-hint {
    display: block;
    color: #5f7fb0;
    font-size: 0.78rem;
    font-weight: bold;
    margin-top: 3px;
    text-transform: uppercase;
}

.meme-link {
    display: inline-block;
    background: var(--blue);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(9, 82, 193, 0.3);
}

.meme-link:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(9, 82, 193, 0.4);
}

.home-gallery {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding: 4px 0 80px;
}

.home-gallery-title {
    font-family: 'Anton', sans-serif;
    color: var(--blue);
    font-size: 3rem;
    line-height: 1;
    text-align: center;
    margin-bottom: 24px;
}

.home-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}

.home-gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: none;
    border-radius: 15px;
    background: white;
    box-shadow: 0 4px 15px rgba(9, 82, 193, 0.18);
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(9, 82, 193, 0.28);
}

.home-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-loader {
    color: var(--blue);
    font-weight: bold;
    text-align: center;
    padding: 28px 0 0;
}

.gallery-loader.is-complete {
    display: none;
}

.gallery-sentinel {
    width: 100%;
    height: 1px;
}

.home-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.home-modal.is-open {
    display: block;
}

.home-modal img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

.home-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    line-height: 1;
}

/* 3D nose break-through effect */
.nose-scene {
    position: absolute;
    pointer-events: none;
    z-index: 10;
    perspective: 500px;
    perspective-origin: 50% 50%;
}

.dog-nose {
    width: 100%;
    height: 100%;
    display: block;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.shard {
    position: absolute;
    pointer-events: none;
    z-index: 9;
    will-change: transform, opacity;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .logo {
        position: static;
        transform: none;
        display: block;
        margin: 0 auto 1rem;
        width: 90px;
        height: 90px;
    }

    .title {
        font-size: 10rem;
        max-width: 90vw;
        word-wrap: break-word;
    }

    .on-usdc {
        font-size: 1.3rem;
    }

    .container {
        min-height: 72vh;
        padding-top: 74px;
        padding-bottom: 16px;
    }

    .contract-label {
        font-size: 1rem;
    }

    .contract-card {
        min-width: 200px;
        padding: 11px 18px;
    }

    .meme-link {
        font-size: 1.1rem;
        padding: 12px 24px;
        margin-top: 1rem;
    }

    .home-gallery {
        width: calc(100% - 20px);
        padding: 0 0 60px;
    }

    .home-gallery-title {
        font-size: 2rem;
    }

    .home-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 64px;
        height: 64px;
    }

    .title {
        font-size: 8rem;
        max-width: 90vw;
        word-wrap: break-word;
    }

    .on-usdc {
        font-size: 1.1rem;
    }

    .container {
        min-height: 68vh;
        padding-top: 62px;
    }

    .contract-card {
        min-width: 190px;
    }

    .meme-link {
        font-size: 1rem;
        padding: 10px 20px;
        margin-top: 1rem;
    }

    .home-gallery-title {
        font-size: 1.5rem;
    }

    .home-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 360px) {
    .title {
        font-size: 6rem;
        max-width: 90vw;
        word-wrap: break-word;
    }

    .on-usdc {
        font-size: 1rem;
    }

    .contract-label {
        font-size: 0.9rem;
    }

    .contract-value {
        font-size: 1rem;
    }

    .meme-link {
        font-size: 0.9rem;
        padding: 8px 16px;
        margin-top: 1rem;
    }
}
