* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background: #000;
    color: #fff;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    position: relative;
    z-index: 1;
}

.canvas-container {
    position: relative;
    width: 95vw;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.3s forwards;
}

#heart-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.pause-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pause-indicator.visible {
    opacity: 1;
}

.formula-display {
    text-align: center;
    margin-top: 16px;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.8s forwards;
    flex-shrink: 0;
}

.formula {
    font-size: 14px;
    margin-bottom: 4px;
}

.param-info {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 8px;
}

.t-value {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    color: #E07A5F;
    font-weight: 400;
    margin-top: 4px;
    transition: text-shadow 0.3s ease;
}

.t-value.glow {
    text-shadow: 0 0 20px rgba(224, 122, 95, 0.6), 0 0 40px rgba(224, 122, 95, 0.3);
}

#t-number {
    font-variant-numeric: tabular-nums;
    display: inline-block;
    min-width: 50px;
}

.controls {
    margin-top: 20px;
    text-align: center;
    flex-shrink: 0;
}

.replay-btn {
    background: transparent;
    border: 1.5px solid rgba(212, 114, 106, 0.5);
    color: #D4726A;
    padding: 10px 28px;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.5s ease, transform 0.3s ease;
    letter-spacing: 1px;
    visibility: hidden;
    opacity: 0;
    -webkit-tap-highlight-color: transparent;
}

.replay-btn.visible {
    visibility: visible;
    opacity: 1;
}

.replay-btn:active {
    background: rgba(212, 114, 106, 0.15);
    transform: scale(0.95);
}

.replay-icon {
    display: inline-block;
    font-size: 16px;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@media (max-height: 650px) {
    .container {
        padding: 12px 16px;
    }

    .canvas-container {
        width: 75vw;
    }

    .formula {
        font-size: 12px;
    }

    .t-value {
        font-size: 18px;
    }
}

@media (orientation: landscape) {
    .canvas-container {
        width: auto;
        height: 55vh;
        aspect-ratio: 1/1;
    }
}