body {
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    position: relative;
    background-color: #ffffff;
}

.bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: url('images/stickerbg.png') center/cover no-repeat;

    opacity: 0;
    transform: scale(1.5);

    animation: intro 5s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.5s;

    z-index: -10;
    pointer-events: none;
}

@keyframes intro {
    from {
        opacity: 0;
        transform: scale(1.5);
    }
    to {
        opacity: 0.5;
        transform: scale(1);
    }
}

.wrapper {
    position: relative;
}

.rect-back {
    position: absolute;
    width: 420px;
    height: 170px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: #cccccc;
    animation: grow 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    z-index: -2;
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
}

.rect-mask {
    position: absolute;
    width: 400px;
    height: 150px;
    left: 50%;
    top: 50%;
    background: #e3e3e3;
    transform: translate(-50%, -50%) scale(0);
    animation: grow 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
    z-index: 1;
    pointer-events: none;
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
}

.text-ct {
    display: flex;
    flex-direction: column;
    position: absolute;
    width: 400px;
    height: 150px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    align-items: center;
    justify-content: center;
    clip-path: inset(50% 50% 50% 50%);
    animation: reveal-mask 1.2s cubic-bezier(0.16,1,0.3,1) forwards 0.2s;
    z-index: 2;
}

.hd {
    font-size: 4rem;
    font-family: 'JetBrainsMono', monospace;
    background: linear-gradient(to right, #a4d0ff, #b1b5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text {
    font-size: 1.2rem;
    font-family: 'JetBrainsMono', monospace;
    color: #818181;
}
@keyframes grow {
    from { transform: translate(-50%, -50%) scale(0); }
    to { transform: translate(-50%, -50%) scale(1); }
}

@keyframes reveal-mask {
    from { clip-path: inset(50% 50% 50% 50%); }
    to { clip-path: inset(0 0 0 0); }
}
body.dark {
    background-color: #0f0f0f;
    background-image: radial-gradient(#222 2px, transparent 0);
}

body.dark .rect-back {
    background: #222;
}

body.dark .rect-mask {
    background: #444;
}

body.dark .text {
    color: #aaa;
}

.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 1.5rem;
    font-family: 'JetBrainsMono', monospace;
    color: #333;
    border-radius: 4px;
    padding: 5px 9px;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

body.dark .theme-toggle {
    background-color: rgba(30, 30, 30, 0.8);
    color: #eee;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
