:root {
    --primary: #8D5524; /* Beagle Brown */
    --primary-light: #F1D299; /* Beagle Beige */
    --secondary: #C68642; /* Beagle Tan */
    --accent: #E1C699;
    --bg: #FAF7F2;
    --white: #FFFFFF;
    --text: #3D2B1F;
    --shadow: 0 10px 30px rgba(141, 85, 36, 0.1);
    --radius: 22px;
    --font-main: 'Outfit', sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.4;
}

body.duo-mode {
    height: 100vh;
    overflow: hidden;
}

#app-container {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 15px;
    position: relative;
    background: linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
    padding-bottom: env(safe-area-inset-bottom);
}

#app-container.duo {
    max-width: none;
    padding: 0;
    height: 100vh;
    background: var(--bg);
}

/* Glassmorphism Card Style */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

#feedback-card h2 {
    font-size: 22px;
    margin-bottom: 5px;
}

#feedback-card p {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 10px;
}

/* Typography */
h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary);
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border-radius: 18px;
    border: none;
    font-family: var(--font-main);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    margin-bottom: 10px;
}

.btn:active {
    transform: scale(0.96);
    filter: brightness(0.9);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(141, 85, 36, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-light);
    color: var(--primary);
}

/* Player Sections for Duo Mode */
.player-section {
    flex: 1;
    height: 50vh;
    overflow-y: auto;
    position: relative;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.player-1 {
    border-top: 4px solid var(--primary);
}

.player-2 {
    transform: rotate(180deg);
    border-top: 4px solid var(--secondary);
}

/* Mascot UI */
.mascot-container {
    display: flex;
    align-items: flex-end;
    padding: 5px;
    margin-bottom: 10px;
}

.mascot-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.mascot-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 1px 6px;
    border-radius: 8px;
}

.mascot-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--primary-light);
    box-shadow: var(--shadow);
    object-fit: cover;
}

.bubble {
    background: white;
    padding: 12px 18px;
    border-radius: 18px;
    border-bottom-left-radius: 2px;
    box-shadow: var(--shadow);
    margin-left: 10px;
    position: relative;
    font-size: 20px;
    font-weight: 600;
    flex: 1;
    line-height: 1.2;
}

/* Quiz UI */
.option-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.option-btn {
    background: white;
    border: 2px solid #EFEFEF;
    padding: 10px 12px;
    border-radius: 15px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.option-btn:active {
    transform: scale(0.95);
}

.option-btn.correct {
    background: #55efc4;
    border-color: #00b894;
    color: #004d3d;
}

.option-btn.wrong {
    background: #ff7675;
    border-color: #d63031;
    color: white;
}

/* Progress Bar */
.progress-container {
    height: 6px;
    background: #EFEFEF;
    border-radius: 10px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.5s ease-out;
}

/* Duo Mode Scoring */
.duo-score {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 800;
    box-shadow: var(--shadow);
    z-index: 100;
    display: flex;
    gap: 20px;
    font-size: 24px;
    border: 3px solid var(--primary);
}

.p1-score { color: var(--primary); }
.p2-score { color: var(--secondary); }

/* Animation */
@keyframes slideUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.view {
    animation: slideUp 0.3s ease-out;
}

/* Inventory Icons */
.inventory {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding: 10px;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.item-slot {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Visual Explanations */
.visual-container {
    padding: 10px;
    background: #ffffff;
    border-radius: 15px;
    border: 2px dashed var(--primary-light);
    margin: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-container svg {
    max-width: 100%;
    height: 80px;
}
