/* Expression Engine Animations */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 10px currentColor; }
    50% { transform: scale(1.05); box-shadow: 0 0 20px currentColor; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px currentColor; }
    50% { box-shadow: 0 0 15px currentColor, 0 0 30px currentColor; }
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    25% { opacity: 0.7; }
    50% { opacity: 0.4; }
    75% { opacity: 0.7; }
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Expression State Classes */
.expression-highlight {
    animation: pulse 2s infinite !important;
}

.expression-curious {
    border-color: #ff6b6b !important;
    background: rgba(255, 107, 107, 0.1) !important;
}

.expression-certain {
    border-color: #51cf66 !important;
    background: rgba(81, 207, 102, 0.1) !important;
}

.expression-confused {
    border-color: #ffd43b !important;
    background: rgba(255, 212, 59, 0.1) !important;
}

.expression-exploratory {
    border-color: #339af0 !important;
    background: rgba(51, 154, 240, 0.1) !important;
}

.expression-reflective {
    border-color: #ae3ec9 !important;
    background: rgba(174, 62, 201, 0.1) !important;
}

/* Animation Behavior Classes */
.expression-pulse {
    animation: pulse 2s infinite !important;
}

.expression-glow {
    animation: glow 3s infinite !important;
}

.expression-flicker {
    animation: flicker 1.5s infinite !important;
}

.expression-gentle-pulse {
    animation: gentlePulse 4s infinite !important;
}

/* Notification System */
.centrigon-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--panel);
    color: var(--light);
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid var(--primary);
    z-index: 10000;
    font-size: 0.9em;
    animation: slideInRight 0.3s ease;
    backdrop-filter: blur(10px);
    max-width: 300px;
    word-wrap: break-word;
}

.expression-notification {
    border-color: var(--accent);
    background: rgba(123, 0, 255, 0.1);
}

.notification-exit {
    animation: slideOutRight 0.3s ease forwards;
}

/* Thought Card Expression Enhancements */
.thought-card.expression-active {
    transition: all 0.3s ease;
}

.thought-card.expression-high-salience {
    box-shadow: 0 0 25px rgba(123, 0, 255, 0.4);
    border-width: 3px;
}

.thought-card.expression-novelty {
    animation: gentlePulse 3s infinite;
}

.thought-card.expression-urgent {
    animation: pulse 1s infinite;
    border-color: #ff6b6b !important;
}

/* Connection Line Expressions */
.connection-line.expression-strong {
    stroke-width: 3px;
    opacity: 0.9;
}

.connection-line.expression-weak {
    stroke-width: 1px;
    opacity: 0.4;
}

.connection-line.expression-flowing {
    animation: pulse 2s infinite;
}

/* Modality Indicator Expressions */
.modality-indicator.expression-active {
    animation: glow 2s infinite;
    opacity: 1;
}

.modality-indicator.expression-high-salience {
    animation: pulse 1s infinite;
    box-shadow: 0 0 20px currentColor;
}

/* Feedback Button Styles */
.expression-feedback {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    justify-content: center;
}

.expression-feedback button {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
    font-size: 0.8em;
}

.expression-feedback button:hover {
    opacity: 1;
    transform: scale(1.1);
    background: var(--primary);
}

.expression-feedback button:active {
    transform: scale(0.95);
}

/* Cognitive Transparency Panel */
#reasoning-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--panel);
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 20px;
    z-index: 10000;
    max-width: 500px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

#reasoning-panel h3 {
    margin: 0 0 15px 0;
    color: var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#reasoning-panel button {
    background: none;
    border: none;
    color: var(--light);
    cursor: pointer;
    font-size: 1.2em;
}

/* Expression Intensity Levels */
.expression-intensity-low {
    opacity: 0.6;
    transform: scale(0.95);
}

.expression-intensity-medium {
    opacity: 0.8;
    transform: scale(1);
}

.expression-intensity-high {
    opacity: 1;
    transform: scale(1.05);
}

/* Temporal Expression States */
.expression-fading {
    animation: gentlePulse 4s infinite;
    opacity: 0.7;
}

.expression-emerging {
    animation: slideInRight 0.5s ease;
}

.expression-departing {
    animation: slideOutRight 0.5s ease forwards;
}

/* Mobile Responsive Expressions */
@media (max-width: 768px) {
    .centrigon-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 0.8em;
    }
    
    .expression-feedback {
        gap: 3px;
    }
    
    .expression-feedback button {
        width: 22px;
        height: 22px;
        font-size: 0.7em;
    }
}

/* Add these to your expression-styles.css */

.reasoning-toggle {
    position: absolute;
    top: 5px;
    right: 30px;
    cursor: pointer;
    opacity: 0.7;
    font-size: 0.8em;
}

.cognitive-reasoning-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--panel);
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 20px;
    z-index: 10000;
    max-width: 500px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.reasoning-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.reasoning-header h3 {
    margin: 0;
    color: var(--primary);
}

.reasoning-close-btn {
    background: none;
    border: none;
    color: var(--light);
    cursor: pointer;
    font-size: 1.2em;
}

.reasoning-content {
    line-height: 1.4;
}

.feedback-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
    font-size: 0.8em;
}

.feedback-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.feedback-btn:active {
    transform: scale(0.95);
}

.feedback-active {
    background: var(--primary) !important;
}