* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #000;
    overflow: hidden;
    cursor: none;
}

#container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
}

#status {
    position: absolute;
    top: 30px;
    left: 30px;
    color: #00ffff;
    font-size: 18px;
    text-shadow: 0 0 20px #00ffff;
    animation: pulse 2s infinite;
}

#chat-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 800px;
    background: rgba(0, 50, 100, 0.3);
    border: 2px solid #00ffff;
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    pointer-events: auto;
    opacity: 0.8;
}

#chat-messages {
    height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    color: #00ffff;
    font-size: 14px;
    line-height: 1.5;
}

#chat-input {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #00ffff;
    border-radius: 10px;
    color: #00ffff;
    font-size: 16px;
    outline: none;
}

#chat-input::placeholder {
    color: #006666;
}

#chat-input:focus {
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

#input-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

#mic-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(0, 100, 200, 0.3);
    border: 4px solid #00ffff;
    color: #00ffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    transition: all 0.3s ease;
    pointer-events: auto;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

#mic-button:hover {
    background: rgba(0, 150, 255, 0.5);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.6);
    transform: scale(1.05);
}

#mic-button.active {
    background: rgba(255, 0, 100, 0.5);
    border-color: #ff0066;
    animation: micPulse 1s ease-in-out infinite;
    box-shadow: 0 0 50px rgba(255, 0, 100, 0.6);
}

@keyframes micPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

#voice-status {
    position: fixed;
    bottom: 170px;
    right: 30px;
    background: rgba(0, 0, 0, 0.8);
    color: #00ffff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid #00ffff;
}

#voice-status.show {
    opacity: 1;
}

.message {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 8px;
    animation: fadeIn 0.5s ease-in;
}

.user-message {
    background: rgba(0, 100, 200, 0.3);
    text-align: right;
}

.ai-message {
    background: rgba(0, 200, 200, 0.3);
    text-align: left;
}

.system-message {
    background: rgba(200, 100, 0, 0.3);
    text-align: center;
    font-style: italic;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hologram-text {
    position: absolute;
    color: #00ffff;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 20px #00ffff;
    animation: hologramFloat 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hologramFloat {
    0%, 100% { transform: translateY(0px); opacity: 0.8; }
    50% { transform: translateY(-10px); opacity: 1; }
}

#voice-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 3px solid #00ffff;
    border-radius: 50%;
    display: none;
    animation: voicePulse 1s ease-in-out infinite;
}

@keyframes voicePulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

#fps-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #00ffff;
    font-size: 12px;
    opacity: 0.7;
}

/* 유튜브 API 키 입력 UI */
#api-key-container {
    position: fixed;
    top: 20px;
    right: 30px;
    background: rgba(0, 50, 100, 0.5);
    border: 1px solid #00ffff;
    border-radius: 10px;
    padding: 10px;
    color: #00ffff;
    backdrop-filter: blur(10px);
    z-index: 10;
    pointer-events: auto;
    display: flex;
    align-items: center;
}

#youtube-api-key {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #00ffff;
    border-radius: 5px;
    padding: 5px 10px;
    color: #00ffff;
    margin-left: 10px;
    outline: none;
    width: 200px;
}

#save-api-key {
    background: rgba(0, 100, 200, 0.5);
    border: 1px solid #00ffff;
    border-radius: 5px;
    padding: 5px 10px;
    color: #00ffff;
    margin-left: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

#save-api-key:hover {
    background: rgba(0, 150, 255, 0.7);
}

/* 유튜브 결과 슬라이더 */
#youtube-container {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: 300px;
    background-color: rgba(0,0,0,0.7);
    z-index: 90;
    display: none;
    overflow: hidden;
}

/* 친근한 폭발 효과 스타일 */
.floating-emoji {
    position: absolute;
    z-index: 110;
    pointer-events: none;
    transition: all 0.1s ease;
    opacity: 0.9;
    transform-origin: center;
    animation: emojiFloat 0.5s ease-in-out infinite alternate;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

@keyframes emojiFloat {
    0% { transform: scale(1) rotate(-3deg); }
    100% { transform: scale(1.1) rotate(3deg); }
}

/* 중앙 빛 플래시 효과 */
.center-flash {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(0,255,255,0.6) 30%, rgba(0,100,255,0) 70%);
    opacity: 0;
    pointer-events: none;
    z-index: 105;
    transition: opacity 0.3s ease;
}

#youtube-results {
    display: flex;
    height: 100%;
    transition: transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.youtube-item {
    flex: 0 0 360px;
    height: 100%;
    margin-right: 20px;
    background: rgba(0, 50, 100, 0.3);
    border: 1px solid #00ffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
}

.youtube-iframe-container {
    flex: 1;
    position: relative;
}

.youtube-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.youtube-title {
    padding: 10px;
    color: #00ffff;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.7);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.hologram-text {
    position: absolute;
    color: #00ffff;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 20px #00ffff;
    animation: hologramFloat 3s ease-in-out infinite;
    pointer-events: none;
}