:root {
    --primary-color: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #3b82f6, #60a5fa);
    --secondary-color: #f8fafc;
    --accent-color: #10b981;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* 左下オーバーレイアイコンのスタイル */
#voice-chat-overlay {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.voice-chat-icon {
    width: 80px;
    height: 80px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.voice-chat-icon:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

.voice-chat-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.voice-chat-icon.recording {
    animation: pulse 1.5s infinite;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(248, 113, 113, 0.9));
    backdrop-filter: blur(20px);
}

.voice-chat-icon.disabled {
    cursor: not-allowed;
    opacity: 0.6;
    filter: grayscale(100%);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 12px 40px rgba(239, 68, 68, 0.5), 0 0 30px rgba(239, 68, 68, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3);
    }
}

/* ツールチップスタイル */
.voice-chat-tooltip {
    position: absolute;
    bottom: 90px;
    right: 50%;
    transform: translateX(50%);
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(12px);
    color: white;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-medium);
}

.voice-chat-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.voice-chat-icon:hover .voice-chat-tooltip {
    opacity: 1;
    visibility: visible;
}

.voice-chat-icon.open img {
    filter: brightness(0.9);
}

.voice-chat-tooltip.recording {
    background: rgba(255, 107, 107, 0.9);
}

.voice-chat-tooltip.recording::after {
    border-top-color: rgba(255, 107, 107, 0.9);
}

.voice-chat-tooltip.connecting {
    background: rgba(255, 193, 7, 0.9);
}

.voice-chat-tooltip.connecting::after {
    border-top-color: rgba(255, 193, 7, 0.9);
}

.voice-chat-tooltip.error {
    background: rgba(220, 53, 69, 0.9);
}

.voice-chat-tooltip.error::after {
    border-top-color: rgba(220, 53, 69, 0.9);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    #voice-chat-overlay {
        bottom: 15px;
        right: 15px;
    }

    .voice-chat-icon {
        width: 70px;
        height: 70px;
    }

    .voice-chat-tooltip {
        font-size: 11px;
        padding: 6px 10px;
        bottom: 80px;
    }
}

/* アクセシビリティ */
.voice-chat-icon:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* 動的状態アニメーション */
.voice-chat-icon.talking img {
    animation: talking 0.3s ease-in-out infinite alternate;
}

@keyframes talking {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}