/* Praise Chat Game Styles */
.chat-game-section {
    padding: 2rem 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.game-stage-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap; /* Allows wrapping on small screens */
    align-items: flex-start;
    max-width: 1000px; /* Ensure wide enough container */
    margin: 0 auto;
}

/* Base Phone Screen */
.phone-screen {
    width: 300px; /* Slightly narrower to fit 2 columns better */
    height: 520px;
    border-radius: 35px;
    border: 8px solid #334155;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.phone-header {
    background: white;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
}

.status-bar-mock {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 25px;
    background: rgba(255,255,255,0.9);
    z-index: 20;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #64748b;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.avatar.hero { background: #dbeafe; color: #3b82f6; } /* You (A-kun) */
.avatar.target { background: #ffedd5; color: #f97316; } /* Target (B-kun) */

.chat-content {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    background: #f8fafc;
}

.message {
    max-width: 85%;
    padding: 0.8rem 1rem;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    opacity: 0; 
    transform: translateY(10px);
    animation: popIn 0.4s forwards;
}

@keyframes popIn {
    to { opacity: 1; transform: translateY(0); }
}

.message.received {
    align-self: flex-start;
    background: white;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    color: #334155;
}

.message.sent {
    align-self: flex-end;
    background: #3b82f6; /* Default Blue */
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.3);
}

/* --- BEFORE SCENE (Cold) --- */
.scene-before .phone-screen {
    filter: grayscale(0.8); /* Look dull */
    border-color: #94a3b8;
}
.scene-before .chat-content {
    background: #f1f5f9;
}
.scene-before .message.sent {
    background: #64748b; /* Dull Blue */
    box-shadow: none;
}
.scene-title {
    text-align: center;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #64748b;
}

.wind-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    color: rgba(148, 163, 184, 0.2);
    pointer-events: none;
    display: none; /* JS triggers display */
}

/* --- AFTER SCENE (Hot/Game) --- */
.scene-after .phone-screen {
    border-color: #f87171;
    box-shadow: 0 20px 50px rgba(248, 113, 113, 0.2);
}

.affection-meter-container {
    background: white;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #fee2e2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meter-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #f87171;
}

.meter-track {
    flex: 1;
    height: 8px;
    background: #fee2e2;
    border-radius: 4px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    width: 20%; /* Initial state */
    background: linear-gradient(to right, #f87171, #f43f5e);
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mood-icon {
    font-size: 1.2rem;
    color: #f87171;
    transition: transform 0.3s;
}

/* Special Praise Message */
.message.praise-sent {
    background: linear-gradient(135deg, #f87171, #f43f5e);
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
    transform-origin: bottom right;
}

/* Controls Area */
.game-controls {
    padding: 1rem;
    background: white;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
}

.praise-btn {
    background: linear-gradient(to bottom, #fcd34d, #f59e0b);
    border: none;
    border-bottom: 4px solid #d97706;
    color: white;
    font-weight: 800;
    font-family: 'Kaisei Opti', serif;
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
    transition: all 0.1s;
    position: relative;
    overflow: hidden;
}

.praise-btn:active {
    transform: translateY(4px);
    border-bottom-width: 0px;
    box-shadow: none;
}

.praise-btn.disabled {
    background: #cbd5e1;
    border-color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* Heartwarming Message Box */
.heartwarming-message-box {
    background: #fffafa;
    border: 3px dashed #fecaca;
    border-radius: 20px;
    padding: 2.5rem;
    margin-top: 3rem;
    position: relative;
    text-align: left;
    box-shadow: 0 10px 25px rgba(254, 202, 202, 0.15);
}

.heartwarming-message-box::before {
    content: "\f004"; /* Heart icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: -15px;
    left: 2rem;
    font-size: 2rem;
    color: #f87171;
    background: white;
    padding: 0 10px;
}

.heartwarming-message-box p {
    font-family: "Kaisei Opti", serif;
    font-size: 1.1rem;
    line-height: 2;
    color: #475569;
    margin: 0;
}

.heartwarming-message-box .highlight-marker {
    background: linear-gradient(transparent 60%, rgba(253, 224, 71, 0.4) 60%);
    font-weight: 700;
    padding: 0 2px;
    color: #b45309;
}

/* Animations */
.shock-wave {
    animation: shock 0.5s ease-out;
}

@keyframes shock {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.heart-explosion {
    position: absolute;
    pointer-events: none;
    font-size: 2rem;
    color: #f43f5e;
    animation: flyUp 1s forwards ease-out;
    z-index: 100;
}

@keyframes flyUp {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -200px) scale(1.5); opacity: 0; }
}

/* Impact Text "ZKYUUUN" */
.impact-text-fx {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-family: 'Rubik Mono One', sans-serif; /* Thick font */
    font-size: 3rem;
    color: #fff;
    -webkit-text-stroke: 2px #f43f5e;
    z-index: 50;
    pointer-events: none;
    white-space: nowrap;
}

.impact-text-fx.active {
    animation: impactZoom 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes impactZoom {
    0% { transform: translate(-50%, -50%) scale(0) rotate(-10deg); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2) rotate(0deg); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 0; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Responsive */
@media (max-width: 768px) {
    .phone-screen {
        width: 100%;
        max-width: 340px;
        height: 480px;
    }
}
