/* The Inference - Styles */

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

body {
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#container {
    max-width: 700px;
    width: 100%;
}

#header {
    text-align: center;
    margin-bottom: 40px;
}

#header h1 {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: #888;
}

/* Introduction */
#intro {
    text-align: center;
}

#intro-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5em;
    line-height: 1.6;
    color: #aaa;
    animation: fadeIn 0.5s ease-out forwards;
}

#intro-text p:nth-child(1) { animation-delay: 0.3s; opacity: 0; }
#intro-text p:nth-child(2) { animation-delay: 0.6s; opacity: 0; }
#intro-text p:nth-child(3) { animation-delay: 0.9s; opacity: 0; }
#intro-text p:nth-child(4) { animation-delay: 1.2s; opacity: 0; }

#begin-btn {
    margin-top: 30px;
    padding: 12px 40px;
    background: transparent;
    border: 1px solid #444;
    color: #888;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 1.5s;
    opacity: 0;
}

#begin-btn:hover {
    border-color: #666;
    color: #ccc;
}

/* Game area */
#game-area {
    display: none;
    text-align: center;
}

#round-info {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

#points-display {
    font-size: 1.2rem;
    color: #4a9;
    margin-bottom: 30px;
}

#scenario {
    font-size: 1.2rem;
    color: #bbb;
    margin-bottom: 30px;
    transition: opacity 0.3s ease;
}

#options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.option {
    padding: 15px 25px;
    background: transparent;
    border: 1px solid #333;
    color: #999;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeIn 0.4s ease-out forwards;
    opacity: 0;
}

.option:hover:not(:disabled) {
    border-color: #555;
    color: #ccc;
    background: #111;
}

/* Pain level styling - subtle red hints */
.option.pain-1 { border-color: #442; }
.option.pain-2 { border-color: #543; }
.option.pain-3 { border-color: #644; }
.option.pain-4 { border-color: #744; }
.option.pain-5 { border-color: #855; }
.option.pain-6 { border-color: #966; }

.option.pain-1:hover { border-color: #663; background: #1a1512; }
.option.pain-2:hover { border-color: #764; background: #1c1513; }
.option.pain-3:hover { border-color: #865; background: #1e1514; }
.option.pain-4:hover { border-color: #966; background: #201515; }
.option.pain-5:hover { border-color: #a77; background: #221516; }
.option.pain-6:hover { border-color: #b88; background: #241517; }

.option.selected {
    border-color: #4a9;
    color: #4a9;
    background: #0a1a15;
}

.option:disabled {
    cursor: default;
    opacity: 0.5;
}

/* Analysis phase */
#analysis {
    display: none;
    text-align: center;
}

#analysis-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5em;
    color: #aaa;
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

#your-results {
    margin: 30px 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    background: #111;
    margin-bottom: 10px;
    animation: slideIn 0.4s ease-out forwards;
    opacity: 0;
}

.result-item .label {
    color: #888;
}

.result-item .value {
    color: #4a9;
    font-weight: 500;
}

.result-item.score .value {
    color: #4a9;
}

.result-item.avoidance .value {
    color: #a94;
}

.choice-breakdown {
    margin-top: 20px;
    padding: 20px;
    background: #0d0d0d;
    border: 1px solid #222;
}

.breakdown-header {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-align: center;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #1a1a1a;
    animation: fadeIn 0.3s ease-out forwards;
    opacity: 0;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-item .indicator {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border-radius: 50%;
}

.breakdown-item .indicator.painful {
    background: #321;
    color: #c75;
}

.breakdown-item .indicator.safe {
    background: #132;
    color: #5a8;
}

.breakdown-item .detail {
    color: #888;
    font-size: 0.9rem;
}

#comparison {
    margin-top: 30px;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.comparison-header {
    padding: 20px;
    background: #0d0d0d;
    border: 1px solid #222;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-out forwards;
}

.comparison-header p {
    color: #999;
    font-size: 1rem;
    line-height: 1.5;
}

.ai-results {
    padding: 20px;
    background: #0d0d0d;
    border: 1px solid #222;
    animation: fadeIn 0.5s ease-out forwards;
}

.comparison-title {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.rate-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.rate-bar .intensity {
    width: 120px;
    font-size: 0.8rem;
    color: #777;
    text-align: right;
}

.bar-container {
    flex: 1;
    height: 8px;
    background: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a9 0%, #a94 100%);
    border-radius: 4px;
    animation: growWidth 0.6s ease-out forwards;
    transform-origin: left;
    transform: scaleX(0);
}

.rate-bar .rate {
    width: 40px;
    font-size: 0.85rem;
    color: #a94;
}

.ai-note {
    margin-top: 15px;
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
}

.animal-note {
    margin-top: 20px;
    padding: 20px;
    background: #0d1510;
    border: 1px solid #234;
    animation: fadeIn 0.5s ease-out forwards;
}

.animal-note p {
    color: #8aa;
    font-size: 0.95rem;
    line-height: 1.5;
}

.animal-note .key-note {
    margin-top: 10px;
    color: #5a9;
    font-weight: 500;
}

#continue-btn {
    margin-top: 40px;
    padding: 12px 40px;
    background: transparent;
    border: 1px solid #444;
    color: #888;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#continue-btn:hover {
    border-color: #666;
    color: #ccc;
}

/* Reveal phase */
#reveal {
    display: none;
    text-align: center;
}

#reveal-text p, #reflection p {
    font-size: 1.1rem;
    margin-bottom: 1.5em;
    line-height: 1.6;
    color: #aaa;
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

#reflection {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #222;
}

#reflection p {
    color: #888;
}

#reflection p:first-child {
    color: #bbb;
    font-size: 1.2rem;
}

#reflection p:last-child {
    color: #666;
    font-style: italic;
}

#restart-btn {
    display: none;
    margin-top: 40px;
    padding: 12px 40px;
    background: transparent;
    border: 1px solid #333;
    color: #666;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out forwards;
}

#restart-btn:hover {
    border-color: #555;
    color: #999;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes growWidth {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Responsive */
@media (max-width: 600px) {
    #header h1 {
        font-size: 1.4rem;
    }

    #intro-text p,
    #analysis-text p,
    #reveal-text p,
    #reflection p {
        font-size: 1rem;
    }

    .option {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .rate-bar .intensity {
        width: 80px;
        font-size: 0.7rem;
    }
}
