:root {
    --ps-primary: #4F46E5;
    --ps-primary-light: #818CF8;
    --ps-accent: #EC4899;
    --ps-bg: #F8FAFC;
    --ps-card-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
}

html, body {
    height: 100%;
}

body {
    font-family: 'Nunito', system-ui, -apple-system, sans-serif;
    background: var(--ps-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.flex-grow-1 { flex: 1; }

.navbar {
    background: linear-gradient(135deg, var(--ps-primary), var(--ps-primary-light)) !important;
}

.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

.letter-spacing-wide {
    letter-spacing: 0.3em;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--ps-primary) 0%, var(--ps-primary-light) 50%, var(--ps-accent) 100%);
    min-height: 70vh;
}

/* Activity Cards on Landing */
.activity-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 1rem;
}

.activity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.activity-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pink color utilities (Bootstrap doesn't have pink by default) */
.bg-pink-subtle { background-color: #FFF0F6; }
.text-pink { color: #EC4899; }

/* Share Code */
.share-code-box {
    background: linear-gradient(135deg, #F0F4FF, #EEF2FF);
}

.share-code {
    font-family: 'Courier New', monospace;
}

/* Stat icons */
.stat-icon {
    min-width: 56px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Emotion Card Selection */
.emotion-card {
    transition: all 0.2s ease;
    cursor: pointer;
}

.emotion-card:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.selected-emotion {
    box-shadow: 0 0 0 3px var(--ps-primary), 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* Color Buttons */
.color-btn {
    transition: transform 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.color-btn:hover {
    transform: scale(1.15);
}

/* Memorama */
.memorama-card {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.memorama-card:hover:not(.matched) {
    transform: scale(1.05);
}

.memorama-card.matched {
    cursor: default;
}

/* Body Zone Buttons */
.body-zone {
    transition: background 0.2s ease;
    cursor: pointer;
}

.body-zone:hover {
    border-color: rgba(0,0,0,0.35) !important;
}

/* Emotion Tags */
.emotion-tag {
    transition: all 0.15s ease;
    cursor: pointer;
}

.emotion-tag:hover {
    transform: scale(1.05);
}

.ring-selected {
    box-shadow: 0 0 0 3px var(--ps-primary);
}

/* Scenario Drops */
.scenario-drop {
    transition: background 0.15s ease;
    cursor: pointer;
}

.scenario-drop:hover {
    background: #F7FAFC;
}

/* Canvas */
canvas {
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Voice Input Pulse Animation */
.btn-danger .bi-mic-fill {
    animation: pulse 1.2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Form Controls */
.form-control-lg {
    border-radius: 0.5rem;
}

/* Cards */
.card {
    border-radius: 0.75rem;
}

/* Responsive Touch Targets */
@media (max-width: 768px) {
    .emotion-card {
        min-height: 100px !important;
    }

    .color-btn {
        width: 42px !important;
        height: 42px !important;
    }

    .memorama-card {
        min-height: 70px !important;
    }

    .body-zone {
        min-width: 48px;
        min-height: 48px;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1.1rem;
    }

    .display-3 {
        font-size: 2rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .emotion-card {
        border-width: 3px !important;
    }

    .memorama-card {
        border-width: 3px !important;
    }

    .body-zone {
        border-width: 3px !important;
        border-style: solid !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .activity-card,
    .emotion-card,
    .memorama-card,
    .color-btn,
    .emotion-tag {
        transition: none;
    }

    .btn-danger .bi-mic-fill {
        animation: none;
    }
}

/* Focus styles for keyboard navigation */
.emotion-card:focus-visible,
.memorama-card:focus-visible,
.body-zone:focus-visible,
.color-btn:focus-visible,
.emotion-tag:focus-visible {
    outline: 3px solid var(--ps-primary);
    outline-offset: 2px;
}
