* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1100px;
    width: 100%;
    position: relative;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 32px;
}

.story-box {
    background: #e8eaf6;
    border-left: 5px solid #5c6bc0;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.story-box p {
    color: #555;
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 10px;
}

.story-box p:last-child {
    margin-bottom: 0;
}

.story-box .question {
    color: #3949ab;
    font-weight: bold;
    font-size: 17px;
    margin-top: 15px;
}

/* Phone Scene */
.phone-scene {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    flex-wrap: wrap;
    padding: 30px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-radius: 15px;
}

.phone-container {
    display: flex;
    justify-content: center;
}

.phone {
    width: 280px;
    height: 520px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 35px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
}

.phone::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 6px;
    background: #1a252f;
    border-radius: 10px;
}

.phone-screen {
    width: 100%;
    height: 460px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 25px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.credit-display {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.balance-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    font-weight: bold;
}

.balance-amount {
    font-size: 36px;
    font-weight: bold;
    color: #4caf50;
}

.messages-sent {
    background: white;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.message-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.message-count {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.transaction-info {
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.transaction-title {
    font-size: 14px;
    font-weight: bold;
    color: #ff9800;
    margin-bottom: 12px;
    text-align: center;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-item .fee {
    font-weight: bold;
    color: #f44336;
}

.phone-button {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    background: #1a252f;
    border-radius: 50%;
    border: 3px solid #34495e;
}

/* SMS Visualization */
.sms-visualization {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.sms-icon {
    font-size: 50px;
    animation: float 2s ease-in-out infinite;
}

.sms-icon:nth-child(1) { animation-delay: 0s; }
.sms-icon:nth-child(2) { animation-delay: 0.2s; }
.sms-icon:nth-child(3) { animation-delay: 0.4s; }
.sms-icon:nth-child(4) { animation-delay: 0.6s; }
.sms-icon:nth-child(5) { animation-delay: 0.8s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.cost-label {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
    text-align: center;
}

/* Number Line Section */
.number-line-section {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
}

.number-line-section h3 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 20px;
}

.credit-number-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.credit-point {
    background: white;
    border: 3px solid #2196f3;
    border-radius: 12px;
    padding: 15px 12px;
    font-size: 16px;
    font-weight: bold;
    color: #1565c0;
    text-align: center;
    min-width: 80px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    line-height: 1.3;
}

.credit-point small {
    display: block;
    font-size: 11px;
    margin-top: 3px;
    color: #666;
}

.credit-point.start {
    border-color: #4caf50;
    background: #e8f5e9;
    color: #2e7d32;
}

.credit-point.end {
    border-color: #ff9800;
    background: #fff3e0;
    color: #e65100;
    font-size: 18px;
}

.step-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.arrow-down {
    font-size: 28px;
    color: #f44336;
    font-weight: bold;
}

.step-label {
    font-size: 12px;
    font-weight: bold;
    color: #f44336;
    background: #ffebee;
    padding: 3px 8px;
    border-radius: 10px;
}

.calculation-box {
    background: #fff3e0;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 16px;
    color: #e65100;
    border: 2px solid #ff9800;
}

/* Answer Section */
.answer-section {
    margin: 30px 0;
}

.answer-section h3 {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 20px;
}

.options-pool {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.answer-option {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 3px solid #5a67d8;
    border-radius: 15px;
    padding: 20px 30px;
    font-size: 22px;
    font-weight: bold;
    color: white;
    cursor: move;
    transition: all 0.3s ease;
    user-select: none;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.answer-option:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.answer-option.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.answer-option.correct {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-color: #388e3c;
    cursor: default;
    animation: correct 0.5s ease;
}

.answer-option.incorrect {
    animation: shake 0.5s ease;
}

@keyframes correct {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.drop-target {
    background: white;
    border: 4px dashed #2196f3;
    border-radius: 20px;
    padding: 40px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.drop-target.drag-over {
    background: #e3f2fd;
    border-color: #1976d2;
    border-style: solid;
    transform: scale(1.02);
}

.drop-placeholder {
    color: #999;
    font-size: 18px;
    font-weight: bold;
    pointer-events: none;
}

.drop-target.has-answer .drop-placeholder {
    display: none;
}

/* Buttons */
.button-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0 20px 0;
}

button {
    background: #5c6bc0;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #3949ab;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(92, 107, 192, 0.4);
}

button:active {
    transform: translateY(0);
}

.feedback {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    min-height: 30px;
    margin: 20px 0;
}

.feedback.success {
    color: #4caf50;
}

.feedback.error {
    color: #f44336;
}

.feedback.warning {
    color: #ff9800;
}

.info-box {
    background: #e8f5e9;
    border-left: 5px solid #4caf50;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

.info-box h3 {
    color: #2e7d32;
    margin-bottom: 10px;
    font-size: 18px;
}

.info-box p {
    color: #555;
    line-height: 1.8;
}

/* Thumbs Up Animation */
.thumbs-up-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    display: none;
}

.thumbs-up-animation.active {
    display: block;
}

.thumb-emoji {
    position: absolute;
    font-size: 80px;
    animation: thumbsUp 1.5s ease-out forwards;
    opacity: 0;
}

.thumb-emoji:nth-child(1) {
    left: 15%;
    top: 25%;
    animation-delay: 0s;
}

.thumb-emoji:nth-child(2) {
    left: 45%;
    top: 15%;
    animation-delay: 0.2s;
}

.thumb-emoji:nth-child(3) {
    left: 75%;
    top: 30%;
    animation-delay: 0.4s;
}

.thumb-emoji:nth-child(4) {
    left: 30%;
    top: 55%;
    animation-delay: 0.6s;
}

.thumb-emoji:nth-child(5) {
    left: 65%;
    top: 60%;
    animation-delay: 0.8s;
}

@keyframes thumbsUp {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(0) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: scale(1.3) translateY(-30px) rotate(10deg);
    }
    40% {
        transform: scale(1) translateY(-50px) rotate(-5deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(-120px) rotate(15deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 26px;
    }

    .phone-scene {
        flex-direction: column;
        padding: 20px;
    }

    .phone {
        width: 240px;
        height: 450px;
    }

    .phone-screen {
        height: 390px;
    }

    .credit-number-line {
        flex-direction: column;
        gap: 5px;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .answer-option {
        padding: 15px 25px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .story-box {
        padding: 15px;
    }

    .options-pool {
        gap: 10px;
    }

    .answer-option {
        padding: 12px 20px;
        font-size: 18px;
    }

    .drop-target {
        padding: 30px;
    }
}
