
.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
}


.instruction {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 1rem;
}

/*  For learn-pi */
/*               */

.score-board {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    gap: 20px;
}

.score {
    background: #f7f7f7;
    padding: 15px 25px;
    border-radius: 10px;
    text-align: center;
    flex: 1;
}

.score .label {
    display: block;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.score .value {
    display: block;
    color: #667eea;
    font-size: 1.8rem;
    font-weight: bold;
}

.game-area {
    margin-bottom: 20px;
    position: relative;
}

.pi-input {
    width: 100%;
    font-size: 2.5rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #2ecc71;
    background: #f7f7f7;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 20px 20px 20px 180px;
    outline: none;
    transition: all 0.3s;
}

.pi-input:focus {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.pi-input::placeholder {
    color: #ccc;
    font-weight: normal;
}

.pi-prefix {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    font-family: 'Courier New', monospace;
    color: #667eea;
    font-weight: bold;
    pointer-events: none;
    z-index: 1;
}

.message {
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    font-weight: 500;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.message.error {
    background: #ffe5e5;
    color: #e74c3c;
}

.message.success {
    background: #e5f7e5;
    color: #2ecc71;
}

.ok-button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 30px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 5px;
}

.ok-button:hover {
    background: #c0392b;
    transform: scale(1.05);
}


.ok-button:active {
    transform: scale(0.95);
}


/* end learn-pi */

.explanation {
    background: #f7f7f7;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.explanation p {
    color: #333;
    margin-bottom: 10px;
}

.explanation ul {
    margin-left: 20px;
    color: #555;
}

.explanation li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.formula {
 /*   display: block;
    font-size: 0.85rem;
    color: #888;
    font-weight: 400;*/
    font-style: italic;
/*    margin-top: 3px;*/
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.3s;
    outline: none;
}

.form-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-group input:read-only {
    background: #f9f9f9;
    color: #2ecc71;
    font-weight: 600;
}

.error-message {
    color: #e74c3c;
    background: #ffe5e5;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
}

.clear-button {
    width: 100%;
    padding: 12px 24px;
    font-size: 1.1em;
    background: rgba(108, 117, 125, 0.8);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.clear-button:hover {
    background: rgba(108, 117, 125, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/*
.calc-button,
.clear-button {
    width: 48%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.calc-button {
    background: #667eea;
    color: white;
    margin-right: 4%;
}

.calc-button:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.clear-button {
    background: #e0e0e0;
    color: #333;
}

.clear-button:hover {
    background: #d0d0d0;
}

.calc-button:active,
.clear-button:active {
    transform: translateY(0);
}

*/

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    .instruction {
        font-size: 0.9rem;
    }

    .calc-button,
    .clear-button {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .form-group input {
        font-size: 1rem;
    }
}
