:root {
    --primary-color: #1a73e8;
    --secondary-color: #34a853;
    --text-color: #333333;
    --light-text: #757575;
    --accent-color: #ea4335;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --border-color: #dadce0;
    --circle-color: #555555;
    --mic-color: #ffffff;
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #000;
    color: #fff;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Background image is set in the HTML with template variables */
    filter: blur(8px);
    z-index: -1;
}

.portal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    padding: 20px;
    max-width: 100%;
    z-index: 1;
    position: relative;
}

.influencer-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-top: 20px;
    margin-bottom: 20px;
}

.influencer-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.influencer-profession {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    text-align: center;
}

.avatar-area {
    height: 40vh;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    position: relative;
}

.circle-content {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-out;
    overflow: hidden;
    position: relative;
}

.circle-content::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.circle-content.speaking {
    animation: pulse 1.5s infinite ease-in-out;
    box-shadow: 0 8px 32px rgba(234, 67, 53, 0.5);
    border: 3px solid rgba(234, 67, 53, 0.6);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 8px 32px rgba(234, 67, 53, 0.5);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 42px rgba(234, 67, 53, 0.7);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 8px 32px rgba(234, 67, 53, 0.5);
    }
}

.icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.icon .material-icons {
    font-size: 80px;
    color: #fff;
}

.avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sound wave animation */
.sound-waves {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.sound-waves.active {
    opacity: 1;
}

.sound-waves .wave {
    position: absolute;
    border: 2px solid rgba(234, 67, 53, 0.4);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation-name: wave;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}

.sound-waves .wave:nth-child(1) {
    animation-delay: 0s;
}

.sound-waves .wave:nth-child(2) {
    animation-delay: 0.5s;
}

.sound-waves .wave:nth-child(3) {
    animation-delay: 1s;
}

@keyframes wave {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.subtitle-area {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
}

.subtitle-container {
    width: 100%;
    text-align: center;
    position: absolute;
}

.subtitle {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 24px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 36px;
    display: inline-block;
    min-width: 200px;
    max-width: 90%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.controls-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    width: 100%;
    padding-bottom: 20px;
}

.voice-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: rgba(234, 67, 53, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(234, 67, 53, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.voice-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 60%);
    border-radius: 50%;
}

.voice-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(234, 67, 53, 0.5);
}

.voice-button:active {
    transform: scale(0.95);
}

.voice-button .material-icons {
    font-size: 28px;
}

.voice-button.active {
    background-color: #ea4335;
    animation: breathe 1.5s infinite alternate;
}

@keyframes breathe {
    0% {
        box-shadow: 0 4px 12px rgba(234, 67, 53, 0.4);
    }

    100% {
        box-shadow: 0 4px 20px rgba(234, 67, 53, 0.8);
    }
}

.voice-button.active:hover {
    background-color: #d73c2c;
}

.hidden {
    display: none;
}

/* Volume animation effects */
@keyframes volume {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.speaking .material-icons {
    animation: volume 1s infinite ease-in-out;
}

.influencer-info {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    padding: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 450px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #ea4335;
}

.info-content {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tag {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.9);
}

.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.back-button:hover {
    background: rgba(0, 0, 0, 0.7);
}

.powered-by {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.powered-by img {
    height: 20px;
    vertical-align: middle;
}

.powered-by a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.powered-by a:hover {
    color: white;
}