:root {
    --primary: #4E67EB;
    --primary-light: #8A9AF1;
    --primary-dark: #3246B8;
    --secondary: #FF8C42;
    --secondary-light: #FFA66E;
    --secondary-dark: #E67425;
    --neutral: #F5F7FA;
    --text-dark: #2D3748;
    --text-medium: #4A5568;
    --text-light: #718096;
    --success: #38B2AC;
    --warning: #EDC149;
    --danger: #E53E3E;
    --bg-light: #FFFFFF;
    --border-radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--neutral);
    color: var(--text-dark);
    line-height: 1.5;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.app-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 5px;
}

.app-subtitle {
    font-size: 16px;
    color: var(--text-medium);
    margin-bottom: 15px;
}

.scenario-card, .character-selection, .action-selection, .resolution-screen, .reward-screen, .dashboard {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.scenario-card {
    border-top: 5px solid var(--primary);
}

.scenario-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.scenario-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--primary);
    margin-left: 15px;
}

.scenario-description {
    font-size: 16px;
    margin-bottom: 15px;
}

.scenario-context {
    font-size: 14px;
    color: var(--text-medium);
    padding: 12px;
    background-color: var(--neutral);
    border-radius: 8px;
    margin-bottom: 10px;
}

.emotion-indicator {
    display: flex;
    align-items: center;
    margin-top: 15px;
    padding: 10px 15px;
    background-color: rgba(237, 193, 73, 0.1);
    border-radius: 8px;
}

.emotion-icon {
    margin-right: 10px;
}

.emotion-text {
    font-size: 14px;
    color: var(--warning);
    font-weight: 600;
}

.section-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.character-card {
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.character-card:hover, .character-card.selected {
    border-color: var(--primary);
    background-color: rgba(78, 103, 235, 0.05);
}

.character-card.selected {
    box-shadow: 0 2px 8px rgba(78, 103, 235, 0.2);
}

.character-card.locked {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.character-card.locked::after {
    content: "🔒";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
}

.character-name {
    font-weight: 600;
    margin: 10px 0 5px;
    text-align: center;
}

.character-trait {
    font-size: 13px;
    color: var(--text-medium);
    text-align: center;
    margin-bottom: 10px;
}

.character-power {
    font-size: 12px;
    background-color: var(--neutral);
    padding: 5px 10px;
    border-radius: 20px;
    text-align: center;
}

.button-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(78, 103, 235, 0.25);
}

.button:disabled {
    background-color: #CBD5E0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-secondary {
    background-color: transparent;
    color: var(--text-medium);
    border: 1px solid #E2E8F0;
}

.button-secondary:hover {
    background-color: var(--neutral);
    box-shadow: none;
    transform: none;
}

.tension-meter {
    display: flex;
    align-items: center;
    margin: 25px 0 15px;
}

.tension-label {
    font-size: 14px;
    color: var(--text-medium);
    margin-right: 10px;
    min-width: 100px;
}

.tension-bar {
    height: 8px;
    flex: 1;
    background-color: #E2E8F0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.tension-value {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--success) 0%, var(--warning) 50%, var(--danger) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.action-list {
    list-style: none;
}

.action-option {
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.action-option:hover, .action-option.selected {
    border-color: var(--primary);
    background-color: rgba(78, 103, 235, 0.05);
}

.action-option.selected {
    box-shadow: 0 2px 8px rgba(78, 103, 235, 0.2);
}

.action-option h4 {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.action-option p {
    font-size: 14px;
    color: var(--text-medium);
}

.action-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.action-tag {
    font-size: 12px;
    background-color: var(--neutral);
    padding: 3px 8px;
    border-radius: 4px;
    color: var(--text-medium);
}

.resolution-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.resolution-icon {
    margin-right: 15px;
}

.resolution-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--success);
}

.resolution-message {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.learning-box, .mental-model-box {
    background-color: rgba(56, 178, 172, 0.1);
    border-left: 4px solid var(--success);
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 20px;
}

.mental-model-box {
    background-color: rgba(78, 103, 235, 0.1);
    border-left-color: var(--primary);
}

.learning-title, .mental-model-title {
    font-weight: 600;
    color: var(--success);
    margin-bottom: 5px;
}

.mental-model-title {
    color: var(--primary);
}

.mental-model-name {
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.learning-text, .mental-model-description {
    font-size: 14px;
    color: var(--text-medium);
}

.reward-header {
    text-align: center;
    margin-bottom: 20px;
}

.reward-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--secondary);
    margin-bottom: 5px;
}

.reward-subtitle {
    color: var(--text-medium);
}

.rewards-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.reward-item {
    background-color: var(--neutral);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.reward-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.reward-label {
    font-size: 14px;
    color: var(--text-medium);
}

.new-skill {
    background-color: rgba(255, 140, 66, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.skill-icon {
    margin-right: 15px;
}

.skill-details {
    flex: 1;
}

.skill-name {
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 5px;
}

.skill-description {
    font-size: 14px;
    color: var(--text-medium);
}

.share-container {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.share-text {
    font-size: 14px;
    color: var(--text-medium);
    margin-bottom: 10px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.share-button {
    background-color: var(--neutral);
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.share-button:hover {
    background-color: #E2E8F0;
    transform: translateY(-2px);
}

.share-button i {
    margin-right: 5px;
}

.challenge-friend {
    text-align: center;
    margin-bottom: 20px;
}

.challenge-friend .button {
    display: inline-flex;
    align-items: center;
}

.challenge-friend .button i {
    margin-right: 8px;
}

.nav-dots {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 8px;
}

.nav-dot {
    width: 8px;
    height: 8px;
    background-color: #CBD5E0;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.nav-dot.active {
    background-color: var(--primary);
    width: 24px;
    border-radius: 4px;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ad-container {
    background-color: #EDF2F7;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    margin: 20px 0;
    font-size: 12px;
    color: var(--text-light);
}

.ad-placeholder {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #E2E8F0;
    border-radius: 4px;
}

/* Dashboard Styles */
.dashboard-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 20px;
    text-align: center;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-item {
    background-color: var(--neutral);
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-medium);
}

.conflict-style-container {
    background-color: rgba(78, 103, 235, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.conflict-style-name {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 10px;
}

.conflict-style-description {
    font-size: 14px;
    color: var(--text-medium);
}

.scenario-list {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.scenario-item {
    background-color: var(--neutral);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.scenario-item:hover {
    background-color: rgba(78, 103, 235, 0.1);
    transform: translateY(-2px);
}

.scenario-item.completed {
    border-left: 4px solid var(--success);
}

.scenario-item.daily {
    border-left: 4px solid var(--warning);
}

.scenario-item-icon {
    margin-right: 15px;
}

.scenario-item-content {
    flex: 1;
}

.scenario-item-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.scenario-item-description {
    font-size: 13px;
    color: var(--text-medium);
}

.scenario-item-badge {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 10px;
}

.badge-daily {
    background-color: rgba(237, 193, 73, 0.2);
    color: var(--warning);
}

.badge-new {
    background-color: rgba(56, 178, 172, 0.2);
    color: var(--success);
}

.badge-completed {
    background-color: rgba(203, 213, 224, 0.5);
    color: var(--text-medium);
}

/* Notification and Toast */
.notification, .toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.notification {
    top: 20px;
    max-width: 80%;
}

.toast {
    bottom: 20px;
    max-width: 80%;
}

.notification.show, .toast.show {
    opacity: 1;
    pointer-events: all;
}

.notification-content, .toast-content {
    font-size: 14px;
    color: var(--text-dark);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-medium);
}

.challenge-link-container {
    display: flex;
    margin: 20px 0;
}

.challenge-link-container input {
    flex: 1;
    padding: 10px;
    border: 1px solid #E2E8F0;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.challenge-link-container button {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 0 15px;
    cursor: pointer;
}

.challenge-share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* Responsiveness */
@media (max-width: 500px) {
    .character-grid, .rewards-list, .stats-container {
        grid-template-columns: 1fr;
    }
    
    .button-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .button {
        width: 100%;
    }
    
    .scenario-item {
        flex-direction: column;
        text-align: center;
    }
    
    .scenario-item-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
}
