* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0d0d1a 50%, #000000 100%);
    overflow: hidden;
    font-family: 'Noto Serif SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: white;
    user-select: none;
    -webkit-user-select: none;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    background: radial-gradient(ellipse at center, rgba(26, 26, 46, 0.95) 0%, rgba(13, 13, 26, 0.98) 50%, rgba(0, 0, 0, 1) 100%);
    transition: opacity 1.5s ease;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid transparent;
    border-top: 3px solid rgba(138, 180, 248, 0.8);
    border-right: 3px solid rgba(196, 181, 253, 0.6);
    border-radius: 0;
    animation: spin 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    margin-bottom: 30px;
    box-shadow: 0 0 30px rgba(138, 180, 248, 0.4);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-text {
    font-size: 14px;
    font-weight: 400;
    color: rgba(200, 220, 255, 0.7);
    letter-spacing: 4px;
    animation: textFade 4s ease-in-out infinite;
    text-transform: uppercase;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    margin-top: 10px;
}

@keyframes textFade {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

#container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.countdown {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    background: radial-gradient(ellipse at center, rgba(26, 26, 46, 0.95) 0%, rgba(13, 13, 26, 0.98) 50%, rgba(0, 0, 0, 1) 100%);
    opacity: 1;
    transition: opacity 1.5s ease;
}

.countdown.hidden {
    opacity: 0;
    pointer-events: none;
}

.countdown-number {
    font-size: 200px;
    font-weight: 100;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 30px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    font-feature-settings: "tnum";
    font-family: 'Noto Serif SC', -apple-system, BlinkMacSystemFont, serif;
    text-shadow: 0 0 50px rgba(138, 180, 248, 0.7), 0 0 100px rgba(196, 181, 253, 0.5), 0 0 150px rgba(255, 255, 255, 0.3);
}

.countdown-text {
    font-size: 18px;
    margin-top: 40px;
    color: rgba(200, 220, 255, 0.5);
    letter-spacing: 15px;
    font-weight: 300;
    text-transform: uppercase;
    font-family: 'Noto Serif SC', -apple-system, BlinkMacSystemFont, serif;
    text-shadow: 0 0 20px rgba(138, 180, 248, 0.4);
}

.start-button {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 60px;
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    background: linear-gradient(135deg, rgba(138, 180, 248, 0.2) 0%, rgba(196, 181, 253, 0.2) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    cursor: pointer;
    z-index: 90;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 3px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(138, 180, 248, 0.3);
    font-family: 'Noto Serif SC', -apple-system, BlinkMacSystemFont, serif;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.start-button:hover {
    background: linear-gradient(135deg, rgba(138, 180, 248, 0.3) 0%, rgba(196, 181, 253, 0.3) 100%);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 12px 40px rgba(138, 180, 248, 0.5);
}

.start-button:active {
    transform: translate(-50%, -50%) scale(0.99);
}

.start-button.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.95);
}

.start-button .main-text {
    font-size: 16px;
    font-weight: 500;
}

.start-button .sub-text {
    font-size: 12px;
    font-weight: 400;
    color: rgba(200, 220, 255, 0.7);
    letter-spacing: 2px;
}

.start-button:hover {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%) scale(1.03);
    box-shadow: 0 0 60px rgba(138, 180, 248, 0.5);
}

.start-button:active {
    transform: translate(-50%, -50%) scale(0.99);
}

.start-button.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.95);
}

.click-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 26px;
    font-weight: 300;
    text-align: center;
    z-index: 20;
    pointer-events: none;
    padding: 40px 60px;
    white-space: pre-wrap;
    line-height: 2;
    opacity: 0;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 4px;
    font-family: 'Noto Serif SC', -apple-system, BlinkMacSystemFont, serif;
    background: rgba(10, 22, 40, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(138, 180, 248, 0.3), inset 0 0 60px rgba(138, 180, 248, 0.1);
    max-width: 80%;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-10px);
    }
}

.click-message.visible {
    opacity: 1;
}

.click-message::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(138, 180, 248, 0.3), rgba(196, 181, 253, 0.3), rgba(255, 182, 193, 0.3), rgba(138, 180, 248, 0.3));
    border-radius: 42px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.8s ease;
    animation: borderRotate 4s linear infinite;
}

.click-message.visible::before {
    opacity: 1;
}

@keyframes messageGlow {
    0%, 100% { box-shadow: 0 20px 60px rgba(138, 180, 248, 0.3), 0 0 100px rgba(196, 181, 253, 0.2), inset 0 0 60px rgba(255, 255, 255, 0.05); }
    50% { box-shadow: 0 20px 80px rgba(138, 180, 248, 0.5), 0 0 140px rgba(196, 181, 253, 0.4), inset 0 0 80px rgba(255, 255, 255, 0.1); }
}

@keyframes borderRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.click-message.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.audio-visualization {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 60px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    z-index: 10;
    pointer-events: none;
    padding: 0 20px;
}

.audio-bar {
    flex: 1;
    min-width: 2px;
    max-width: 8px;
    height: 2px;
    border-radius: 1px;
    transition: height 0.1s ease, background 0.1s ease;
}

.instructions {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: rgba(200, 220, 255, 0.4);
    z-index: 10;
    pointer-events: none;
    letter-spacing: 5px;
    font-weight: 300;
    font-family: 'Noto Serif SC', -apple-system, BlinkMacSystemFont, serif;
    text-shadow: 0 0 15px rgba(138, 180, 248, 0.3);
}

.input-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    width: 90%;
    max-width: 500px;
    padding: 0 1rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.input-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.input-container.visible {
    opacity: 1;
    pointer-events: auto;
}

.input-wrapper {
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.7) 0%, rgba(26, 10, 46, 0.7) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 0.6rem;
    display: flex;
    gap: 0.6rem;
    box-shadow: 0 8px 32px rgba(138, 180, 248, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper:hover {
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.8) 0%, rgba(26, 10, 46, 0.8) 100%);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 40px rgba(138, 180, 248, 0.4);
}

#userInput {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    font-weight: 400;
    font-family: 'Noto Serif SC', -apple-system, BlinkMacSystemFont, serif;
}

#userInput:focus {
    outline: none;
}

#userInput::placeholder {
    color: rgba(200, 220, 255, 0.5);
}

#morphButton {
    background: linear-gradient(135deg, rgba(138, 180, 248, 0.3) 0%, rgba(196, 181, 253, 0.3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.85rem 1.8rem;
    color: rgba(255, 255, 255, 0.95);
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Noto Serif SC', -apple-system, BlinkMacSystemFont, serif;
    box-shadow: 0 4px 15px rgba(138, 180, 248, 0.2);
}

#morphButton:hover {
    background: linear-gradient(135deg, rgba(138, 180, 248, 0.4) 0%, rgba(196, 181, 253, 0.4) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(138, 180, 248, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

#morphButton:active {
    transform: translateY(0);
}

.button-content {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.button-content svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

#morphButton:hover .button-content svg {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .countdown-number {
        font-size: 100px;
        letter-spacing: 15px;
    }
    
    .countdown-text {
        font-size: 16px;
        letter-spacing: 6px;
    }
    
    .start-button {
        padding: 16px 50px;
        font-size: 16px;
    }
    
    .click-message {
        font-size: 18px;
        padding: 40px 50px;
        max-width: 85%;
        background: linear-gradient(135deg, rgba(10, 22, 40, 0.7) 0%, rgba(26, 10, 46, 0.7) 100%);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 30px;
        box-shadow: 0 20px 60px rgba(138, 180, 248, 0.3), 0 0 100px rgba(196, 181, 253, 0.2), inset 0 0 60px rgba(255, 255, 255, 0.05);
        text-shadow: 0 0 30px rgba(138, 180, 248, 0.8), 0 0 60px rgba(196, 181, 253, 0.5), 0 0 90px rgba(255, 255, 255, 0.3);
    }
    
    .audio-visualization {
        width: 300px;
        height: 50px;
        bottom: 70px;
    }
    
    .instructions {
        font-size: 11px;
        bottom: 30px;
    }
}

@media (max-width: 480px) {
    .countdown-number {
        font-size: 80px;
        letter-spacing: 10px;
    }
    
    .countdown-text {
        font-size: 14px;
        letter-spacing: 4px;
    }
    
    .start-button {
        padding: 18px 40px;
    }
    
    .start-button .main-text {
        font-size: 15px;
    }
    
    .start-button .sub-text {
        font-size: 11px;
        letter-spacing: 1px;
    }
    
    .click-message {
        font-size: 18px;
        padding: 20px 30px;
        line-height: 1.6;
        letter-spacing: 2px;
        max-width: 85%;
    }
    
    .instructions {
        font-size: 10px;
        bottom: 20px;
        letter-spacing: 3px;
    }
    
    .input-container {
        bottom: 70px;
        padding: 0 0.75rem;
    }
    
    .input-wrapper {
        padding: 0.5rem;
    }
    
    #userInput {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }
    
    #morphButton {
        padding: 0.75rem 1.5rem;
    }
    
    .button-content span {
        font-size: 0.9rem;
    }
}
    
    .countdown-text {
        font-size: 14px;
        letter-spacing: 4px;
    }
    
    .start-button {
        padding: 14px 40px;
        font-size: 15px;
    }

    .click-message {
        font-size: 18px;
        padding: 30px 40px;
        line-height: 1.8;
        letter-spacing: 2px;
        max-width: 85%;
        background: linear-gradient(135deg, rgba(10, 22, 40, 0.7) 0%, rgba(26, 10, 46, 0.7) 100%);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 25px;
        box-shadow: 0 15px 50px rgba(138, 180, 248, 0.3), 0 0 80px rgba(196, 181, 253, 0.2), inset 0 0 40px rgba(255, 255, 255, 0.05);
        text-shadow: 0 0 20px rgba(138, 180, 248, 0.8), 0 0 40px rgba(196, 181, 253, 0.5), 0 0 60px rgba(255, 255, 255, 0.3);
    }

    .instructions {
        font-size: 10px;
        bottom: 20px;
        letter-spacing: 3px;
    }
    
    .input-container {
        bottom: 70px;
        padding: 0 0.75rem;
    }
    
    .input-wrapper {
        padding: 0.5rem;
    }
    
    #userInput {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }
    
    #morphButton {
        padding: 0.75rem 1.5rem;
    }
    
.button-content span {
        font-size: 0.9rem;
    }
}

@media (min-width: 481px) {
    .start-tips .orientation-hint {
        display: none;
    }
}
    
    .orientation-hint {
        display: block;
    }
}

@media (min-width: 481px) {
    .orientation-hint {
        display: none;
    }
}