/* CEFR-JLPT Interactive Widget Styles */

.cefr-widget-wrapper {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.cefr-widget-container {
    width: 100%;
    max-width: 800px;
    background: var(--card-bg, #252b3b);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
    padding: 40px;
    box-sizing: border-box;
    margin: 0 auto;
}

.cefr-widget-header {
    text-align: center;
    margin-bottom: 40px;
}

.cefr-widget-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: linear-gradient(90deg, #fff, #a0aab5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cefr-widget-subtitle {
    color: var(--text-sub, #a0aab5);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Display Area */
.cefr-display-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 300px;
    position: relative;
}

/* JLPT Section */
.cefr-jlpt-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.cefr-jlpt-badge {
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, #ff6b6b, #c0392b);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3.5rem;
    font-weight: 900;
    color: white;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
    border: 4px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.cefr-jlpt-label {
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-main, #ffffff);
}

/* Connector Section */
.cefr-connector-section {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 100%;
}

.cefr-arrow-container {
    width: 100%;
    height: 6px;
    background: #364055;
    border-radius: 3px;
    position: relative;
    margin: 20px 0;
    overflow: hidden;
}

.cefr-arrow-fill {
    width: 0%;
    height: 100%;
    background: var(--accent-pass, #4ecdc4);
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.cefr-arrow-fill.high-score-mode {
    background: linear-gradient(90deg, var(--accent-pass, #4ecdc4), var(--accent-high, #ffe66d));
}

.cefr-score-info {
    font-size: 0.9rem;
    color: var(--accent-pass, #4ecdc4);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
    text-align: center;
}

.cefr-score-info.visible {
    opacity: 1;
    transform: translateY(0);
}

.cefr-score-info.high {
    color: var(--accent-high, #ffe66d);
    font-weight: bold;
    margin-top: 10px;
}

/* CEFR Section */
.cefr-cefr-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 200px;
}

.cefr-card {
    width: 120px;
    height: 80px;
    background: #e9c46a;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.6);
    position: absolute;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.cefr-card.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 2;
}

.cefr-card.move-up {
    transform: translateY(-60px) scale(0.9);
    opacity: 0.6;
    filter: grayscale(50%);
}

.cefr-card.high-score-active {
    opacity: 1;
    transform: translateY(40px) scale(1.1);
    z-index: 3;
    box-shadow: 0 0 30px var(--accent-high, #ffe66d);
    border: 2px solid #fff;
}

/* Controls */
.cefr-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.cefr-dot {
    width: 10px;
    height: 10px;
    background: #364055;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.cefr-dot.active {
    background: var(--accent-pass, #4ecdc4);
    transform: scale(1.2);
}

.cefr-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--accent-gold, #D4AF37);
    width: 0%;
    transition: width 0.1s linear;
}

/* Message Box */
.cefr-message-box {
    text-align: center;
    margin-top: 20px;
    height: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cefr-message-text {
    font-size: 1.1rem;
    font-weight: bold;
    animation: cefrFadeIn 0.5s ease;
}

@keyframes cefrFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .cefr-display-area {
        flex-direction: column;
        height: auto;
        gap: 20px;
    }

    .cefr-connector-section {
        transform: rotate(90deg);
        margin: 10px 0;
    }

    .cefr-score-info {
        transform: rotate(-90deg);
        width: 200px;
    }

    .cefr-arrow-container {
        width: 100px;
    }

    .cefr-cefr-section {
        height: 150px;
    }

    .cefr-widget-container {
        padding: 20px;
    }
}