/* Mouse trail canvas styling */
#mouseTrail {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2;
}
/* Catppuccin color variables */
:root {
    --ctp-rosewater: 245, 224, 220;
    --ctp-flamingo: 242, 205, 205;
    --ctp-pink: 245, 194, 231;
    --ctp-mauve: 203, 166, 247;
    --ctp-red: 243, 139, 168;
    --ctp-maroon: 235, 160, 172;
    --ctp-peach: 250, 179, 135;
    --ctp-yellow: 249, 226, 175;
    --ctp-green: 166, 227, 161;
    --ctp-teal: 148, 226, 213;
    --ctp-sky: 137, 220, 235;
    --ctp-sapphire: 116, 199, 236;
    --ctp-blue: 137, 180, 250;
    --ctp-lavender: 180, 190, 254;
    --ctp-text: 205, 214, 244;
    --ctp-subtext1: 186, 194, 222;
    --ctp-subtext0: 166, 173, 200;
    --ctp-overlay2: 147, 153, 178;
    --ctp-overlay1: 127, 132, 156;
    --ctp-overlay0: 108, 112, 134;
    --ctp-surface2: 88, 91, 112;
    --ctp-surface1: 69, 71, 90;
    --ctp-surface0: 49, 50, 68;
    --ctp-base: 30, 30, 46;
    --ctp-mantle: 24, 24, 37;
    --ctp-crust: 17, 17, 27;
}

/* Global reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Import fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@300;400;500&display=swap');

/* Main body styling with dark theme */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: rgb(var(--ctp-crust));
    color: rgb(var(--ctp-text));
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    line-height: 1.5;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

/* Fixed background canvas with Japanese characters */
.japanese-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: auto;
    opacity: 1;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Mouse glow effect that follows cursor */
.mouse-glow {
    position: fixed;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(137, 180, 250, 0.15) 0%, rgba(137, 180, 250, 0.05) 40%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.1s ease-out;
    opacity: 0;
}

.mouse-glow.active {
    opacity: 1;
}



.background-gradient {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(17, 17, 27, 0.3) 50%, rgb(var(--ctp-crust)) 100%);
    pointer-events: none;
}

/* Entry overlay - gate content until user interaction */
.entry-overlay {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 17, 27, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
    transition: opacity 0.4s ease;
    pointer-events: auto;
}

.entry-overlay::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(137, 180, 250, 0.25) 0%, rgba(137, 180, 250, 0.08) 25%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: entry-glow-float 12s ease-in-out infinite;
    z-index: 0;
    filter: blur(40px);
}

.entry-overlay::after {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(203, 166, 247, 0.15) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
    animation: entry-glow-float-secondary 15s ease-in-out infinite reverse;
    z-index: 0;
    filter: blur(50px);
}

.entry-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Animated gradient text for entry prompt with enhanced interactivity */
.entry-overlay .entry-text {
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.9rem;
    background: linear-gradient(90deg, rgb(var(--ctp-mauve)), rgb(var(--ctp-blue)), rgb(var(--ctp-sky)));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
    border: 2px solid rgba(var(--ctp-blue), 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(var(--ctp-sapphire), 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.entry-overlay .entry-text::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.entry-overlay .entry-text:hover {
    transform: scale(1.08);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(var(--ctp-blue), 0.5);
    border: 2px solid rgba(var(--ctp-blue), 0.9);
}

.entry-overlay .entry-text:hover::before {
    left: 100%;
}

.entry-overlay .entry-text:active {
    transform: scale(0.95);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), 0 0 15px rgba(var(--ctp-sapphire), 0.2);
}

/* Entry overlay glow animation - floating subtle background glow */
@keyframes entry-glow-float {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.7;
    }
    20% {
        transform: translate(50px, -40px);
        opacity: 0.5;
    }
    40% {
        transform: translate(-60px, 50px);
        opacity: 0.6;
    }
    60% {
        transform: translate(40px, 60px);
        opacity: 0.55;
    }
    80% {
        transform: translate(-50px, -30px);
        opacity: 0.65;
    }
}

@keyframes entry-glow-float-secondary {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.5;
    }
    25% {
        transform: translate(-40px, 40px);
        opacity: 0.4;
    }
    50% {
        transform: translate(50px, -50px);
        opacity: 0.45;
    }
    75% {
        transform: translate(-30px, -40px);
        opacity: 0.55;
    }
}

/* Main container with fade-in animation */
.container {
    max-width: 640px;
    width: 100%;
    border: 1px solid rgb(var(--ctp-overlay2));
    border-left: 2px solid rgb(var(--ctp-overlay2));
    border-right: 2px solid rgb(var(--ctp-overlay2));
    background: rgb(var(--ctp-crust));
    padding: 3rem;
    margin: 1rem auto;
    position: relative;
    z-index: 2;
    transform: translateZ(0);
    backface-visibility: hidden;
    animation: fadeIn 0.5s ease-out;
    opacity: 1;
    transition: opacity 0.35s ease, filter 0.35s ease;
    box-sizing: border-box;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animated gradient local time display (UTC +05:30) */
.local-time {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-family: 'Inter', ui-monospace, SFMono-Regular, monospace;
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(90deg, rgb(var(--ctp-mauve)), rgb(var(--ctp-blue)), rgb(var(--ctp-sky)));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
    white-space: nowrap;
}

/* Gradient shift animation used for text and borders */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Content visibility gate - blur and hide until user clicks entry overlay */
body.content-locked .container,
body.content-locked .audio-control,
body.content-locked .local-time,
body.content-locked .mouse-glow,
body.content-locked .background-gradient {
    opacity: 0;
    filter: blur(8px);
    pointer-events: none;
}

body:not(.content-locked) .container,
body:not(.content-locked) .audio-control,
body:not(.content-locked) .local-time,
body:not(.content-locked) .mouse-glow,
body:not(.content-locked) .background-gradient {
    opacity: 1;
    filter: none;
    pointer-events: auto;
}

/* Audio control button and slider positioning */
.audio-control {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    z-index: 3;
    opacity: 0.75;
    transition: opacity 0.2s ease;
    transform: scale(0.85);
}

.audio-control:hover {
    opacity: 1;
}

/* Audio toggle button with animated border gradient on hover */
.audio-toggle {
    width: 28px;
    height: 28px;
    border: 1px solid rgb(var(--ctp-surface1));
    background: rgb(var(--ctp-surface0));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.audio-toggle:hover {
    border: 1px solid transparent;
    background: linear-gradient(rgb(var(--ctp-surface0)), rgb(var(--ctp-surface0))) padding-box,
                linear-gradient(90deg, rgb(var(--ctp-mauve)), rgb(var(--ctp-blue)), rgb(var(--ctp-sky))) border-box;
    background-size: 100%, 200% 200%;
    animation: audio-border-shift 3s ease infinite;
}

.audio-toggle.playing {
    border-color: rgb(var(--ctp-blue));
}

/* Audio border shift animation */
@keyframes audio-border-shift {
    0% {
        background-position: 100%, 0% 50%;
    }
    50% {
        background-position: 100%, 100% 50%;
    }
    100% {
        background-position: 100%, 0% 50%;
    }
}

/* Audio icon styling */
.audio-icon {
    width: 16px;
    height: 16px;
    fill: rgb(var(--ctp-text));
}

/* Volume slider styling */
.volume-slider {
    width: 80px;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: rgb(var(--ctp-surface1));
    outline: none;
    border-radius: 2px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: rgb(var(--ctp-blue));
    cursor: pointer;
    border-radius: 50%;
}

.volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: rgb(var(--ctp-blue));
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Profile section with image and content grid */
.profile-section {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 1rem;
    margin-bottom: 0;
    justify-self: start;
}

/* Profile image with dashed animated gradient border */
.profile-image {
    width: 137px;
    height: auto;
    position: relative;
    z-index: 1;
    transform: translateX(-17px);
    border: 1px solid transparent;
    background: linear-gradient(rgb(var(--ctp-base)), rgb(var(--ctp-base))) padding-box,
                linear-gradient(90deg, rgb(var(--ctp-mauve)), rgb(var(--ctp-blue)), rgb(var(--ctp-sky))) border-box;
    padding: 0.25rem;
    align-self: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    animation: border-gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}

/* Pseudo-element for dashed border effect */
.profile-image::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 0;
    border-radius: 2px;
    padding: 1px;
    background: linear-gradient(90deg, rgb(var(--ctp-mauve)), rgb(var(--ctp-blue)), rgb(var(--ctp-sky)));
    background-size: 200% 200%;
    animation: border-gradient-shift 3s ease infinite;
    mask: linear-gradient(#fff 0 0) padding-box,
          repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 16px) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box,
                  repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 16px) border-box;
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
    pointer-events: none;
}

/* Border gradient shift animation */
@keyframes border-gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Profile content area */
.profile-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-content p {
    margin: 0;
    line-height: 1.6;
}

.name {
    font-weight: normal;
}

.name strong {
    font-weight: bolder;
}

/* Pronouns badge styling */
.pronouns-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    background: rgb(var(--ctp-surface0));
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.25rem;
}

/* Age canvas inline display */
.age-canvas {
    display: inline-block;
    vertical-align: middle;
    margin: 0 0.25rem;
}

/* Muted text overlay color */
.text-overlay0 {
    color: rgb(var(--ctp-overlay0));
}

/* Emoji codes styling */
.emoji-codes {
    margin-top: 0.5rem;
}

.emoji-codes code {
    font-family: 'Inter', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    padding: 0;
    background: transparent;
    font-size: inherit;
}

.emoji-codes code:nth-child(1) {
    color: rgb(var(--ctp-overlay2));
}

.emoji-codes code:nth-child(2) {
    color: rgb(var(--ctp-overlay0));
}

.emoji-codes code:nth-child(3) {
    color: rgb(var(--ctp-surface1));
}

/* Links container */
.links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

/* Link box styling with animated gradient border on hover */
.link-box {
    border: 1px solid rgb(var(--ctp-surface0));
    background: rgb(var(--ctp-crust));
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-decoration: none;
    color: inherit;
    pointer-events: auto;
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-height: 44px;
}

.link-box:hover {
    border: 1px solid transparent;
    background: linear-gradient(rgb(var(--ctp-crust)), rgb(var(--ctp-crust))) padding-box,
                linear-gradient(90deg, rgb(var(--ctp-mauve)), rgb(var(--ctp-blue)), rgb(var(--ctp-sky))) border-box;
    background-size: 100%, 200% 200%;
    animation: link-border-shift 3s ease infinite;
}

/* Link box border shift animation */
@keyframes link-border-shift {
    0% {
        background-position: 100%, 0% 50%;
    }
    50% {
        background-position: 100%, 100% 50%;
    }
    100% {
        background-position: 100%, 0% 50%;
    }
}

/* Link icon styling */
.link-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.25rem;
    fill: rgb(var(--ctp-text));
}

.link-icon.stroke {
    fill: none;
    stroke: rgb(var(--ctp-text));
    stroke-width: 1.5;
}

.link-icon.fill {
    width: 16px;
    height: 16px;
}

/* Radial gradient overlay for depth effect */
.background-gradient {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(17, 17, 27, 0.3) 50%, rgb(var(--ctp-crust)) 100%);
    pointer-events: none;
}

/* Tablet and medium devices */
@media (max-width: 768px) {
    body {
        padding: 0.75rem;
    }

    .container {
        padding: 2rem 1.5rem;
        margin: 0.75rem auto;
    }

    .profile-section {
        gap: 1rem;
    }

    .links {
        gap: 0.85rem;
    }
}

/* Mobile devices */
@media (max-width: 640px) {
    body {
        padding: 0.5rem;
    }

    .container {
        padding: 1.25rem 1rem;
        max-width: 100%;
        margin: 0.5rem auto;
    }

    .local-time {
        font-size: 0.65rem;
        top: 0.65rem;
        left: 0.65rem;
    }

    .audio-control {
        top: 0.65rem;
        right: 0.65rem;
        transform: scale(0.7);
    }

    .profile-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
        margin-bottom: 0.5rem;
    }

    .profile-image {
        width: 110px;
        justify-self: center;
    }

    .profile-image::before {
        display: none;
    }

    .profile-content {
        font-size: 0.925rem;
    }

    .profile-content p {
        line-height: 1.7;
    }

    .links {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 0.75rem;
    }

    .link-box {
        width: 100%;
        padding: 0.75rem 0.85rem;
        font-size: 0.925rem;
    }

    .link-icon {
        width: 20px;
        height: 20px;
    }

    .link-icon.fill {
        width: 16px;
        height: 16px;
    }
}

/* Very small mobile devices */
@media (max-width: 375px) {
    body {
        padding: 0.25rem;
    }

    .container {
        padding: 1rem 0.75rem;
        margin: 0.25rem auto;
    }

    .local-time {
        font-size: 0.6rem;
        top: 0.5rem;
        left: 0.5rem;
    }

    .audio-control {
        top: 0.5rem;
        right: 0.5rem;
        transform: scale(0.65);
    }

    .profile-image {
        width: 95px;
    }

    .profile-content {
        font-size: 0.875rem;
    }

    .link-box {
        padding: 0.7rem 0.75rem;
        font-size: 0.875rem;
    }
}

