.emotion-widget {
    background-color: transparent;
    background-image: linear-gradient(180deg, #d6cafa 0%, #c6b4fb00 100%), repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255, 255, 255, 0.08) 20px, rgba(255, 255, 255, 0.08) 40px), repeating-linear-gradient(-45deg, transparent, transparent 20px, rgba(255, 255, 255, 0.06) 20px, rgba(255, 255, 255, 0.06) 40px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
    max-width: 100%;
    margin: 0 auto;
    min-height: 400px;
}

.emotion-widget .eyes-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    transition: all 0.5s ease;
}

.emotion-widget .eye {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.emotion-widget .pupil {
    width: 16px;
    height: 16px;
    background: #333;
    border-radius: 50%;
    position: absolute;
    transition: all 0.3s ease;
}

.emotion-widget .title {
    font-size: 48px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2rem;
    line-height: 1.3;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.5s ease;
}

.emotion-widget .initial-title {
    opacity: 1;
    transform: translateY(0);
}

.emotion-widget .result-title {
    opacity: 0;
    transform: translateY(20px);
    font-size: 36px;
    margin-bottom: 2.5rem;
}

.emotion-widget .emotions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.5s ease;
    opacity: 1;
    transform: translateY(0);
}

.emotion-widget .emotion-btn {
    background: transparent;
    border: 1px solid #333;
    border-radius: 25px;
    padding: 0.8rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

.emotion-widget .emotion-btn:hover {
    border-color: #6c5ce7;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.2);
}

.emotion-widget .emotion-btn.selected {
    border-color: #6c5ce7;
    background: #6c5ce7;
    color: white;
    transform: scale(1.05);
}

.emotion-widget .result-container {
    display: none;
    animation: fadeInUp 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
}

.emotion-widget .result-container.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.emotion-widget .result-container.show .result-title {
    opacity: 1;
    transform: translateY(0);
}

.emotion-widget .result-message {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
}

.emotion-widget .download-btn {
    background: #4318BE;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(67, 24, 190, 0.3);
}

.emotion-widget .download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 24, 190, 0.4);
    text-decoration: none;
    color: white;
}

/* Emotion-specific colors - only during transition */
.emotion-widget.transitioning {
    background-image: linear-gradient(180deg, #d6cafa 0%, #c6b4fb00 100%), repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255, 255, 255, 0.08) 20px, rgba(255, 255, 255, 0.08) 40px), repeating-linear-gradient(-45deg, transparent, transparent 20px, rgba(255, 255, 255, 0.06) 20px, rgba(255, 255, 255, 0.06) 40px);
}

.emotion-widget.transitioning.happy {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
}

.emotion-widget.transitioning.sad {
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8c0 100%);
}

.emotion-widget.transitioning.angry {
    background: linear-gradient(135deg, #ff7675 0%, #e17055 100%);
}

.emotion-widget.transitioning.anxious {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
}

.emotion-widget.transitioning.neutral {
    background: linear-gradient(135deg, #dfe6e9 0%, #b2bec3 100%);
}

/* Hide elements when emotion is selected */
.emotion-widget.emotion-selected .initial-title {
    opacity: 0;
    transform: translateY(-20px);
    display: none;
}

.emotion-widget.emotion-selected .emotions-grid {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    display: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

.emotion-widget.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .emotion-widget {
        padding: 1.5rem 0;
        margin: 0.5rem;
        min-height: 350px;
    }

    .emotion-widget .title {
        font-size: 1.2rem;
        max-width: 250px;
    }

    .emotion-widget .result-title {
        font-size: 1.1rem;
    }

    .emotion-widget .emotions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
        max-width: 300px;
    }

    .emotion-widget .emotion-btn {
        font-size: 0.75rem;
        padding: 0.6rem 0.3rem;
        min-height: 45px;
        border-radius: 20px;
    }

    .emotion-widget .eye {
        width: 45px;
        height: 45px;
    }

    .emotion-widget .pupil {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .emotion-widget {
        padding: 1rem 0;
        min-height: 320px;
    }

    .emotion-widget .emotions-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 280px;
    }

    .emotion-widget .title {
        font-size: 1.1rem;
        max-width: 220px;
    }

    .emotion-widget .result-title {
        font-size: 1rem;
    }

    .emotion-widget .result-message {
        font-size: 0.95rem;
    }

    .emotion-widget .emotion-btn {
        font-size: 0.7rem;
        min-height: 40px;
    }
}
