/* Roman Numerals Game Styles */

.roman-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 1rem;
    box-sizing: border-box;
    user-select: none;
}

/* Header */
.roman-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.roman-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.roman-stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.roman-timer {
    font-weight: bold;
    color: #ffd700;
}

.roman-timer.warning {
    color: #ff6b6b;
    animation: pulse 0.5s infinite;
}

/* Question Area */
.roman-question {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.roman-prompt {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.roman-target {
    font-size: 3rem;
    font-weight: bold;
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.roman-target.arabic {
    font-family: 'Georgia', serif;
}

.roman-target.roman {
    font-family: 'Times New Roman', serif;
    letter-spacing: 0.1em;
}

/* Answer Area */
.roman-answer-area {
     
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.roman-answer-label {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.roman-answer {
    font-size: 2.5rem;
    font-weight: bold;
    letter-spacing: 0.15em;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.roman-answer.empty {
    opacity: 0.3;
}

.roman-answer .symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.roman-answer .symbol:hover {
    background: rgba(255, 100, 100, 0.4);
    transform: scale(0.95);
}

/* Number Input for Reverse Mode */
.roman-input-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.roman-number-input {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    width: 150px;
    padding: 0.5rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    outline: none;
}

.roman-number-input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Symbol Buttons */
.roman-symbols {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.roman-symbol-btn {
    font-size: 1.8rem;
    font-weight: bold;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Times New Roman', serif;
    position: relative;
    overflow: hidden;
}

.roman-symbol-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    pointer-events: none;
}

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

.roman-symbol-btn.symbol-I { background: linear-gradient(135deg, #4a90d9, #357abd); color: #fff; }
.roman-symbol-btn.symbol-V { background: linear-gradient(135deg, #5cb85c, #449d44); color: #fff; }
.roman-symbol-btn.symbol-X { background: linear-gradient(135deg, #f0ad4e, #ec971f); color: #fff; }
.roman-symbol-btn.symbol-L { background: linear-gradient(135deg, #d9534f, #c9302c); color: #fff; }
.roman-symbol-btn.symbol-C { background: linear-gradient(135deg, #9b59b6, #8e44ad); color: #fff; }
.roman-symbol-btn.symbol-D { background: linear-gradient(135deg, #1abc9c, #16a085); color: #fff; }
.roman-symbol-btn.symbol-M { background: linear-gradient(135deg, #34495e, #2c3e50); color: #ffd700; }

.roman-symbol-btn .symbol-value {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.6rem;
    opacity: 0.7;
}

/* Controls */
.roman-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Feedback */
.roman-feedback {
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    animation: fadeIn 0.3s ease;
}

.roman-feedback.correct {
    background: linear-gradient(135deg, rgba(92, 184, 92, 0.3), rgba(68, 157, 68, 0.3));
    color: #5cb85c;
    border: 2px solid #5cb85c;
}

.roman-feedback.incorrect {
    background: linear-gradient(135deg, rgba(217, 83, 79, 0.3), rgba(201, 48, 44, 0.3));
    color: #ff6b6b;
    border: 2px solid #d9534f;
}

.roman-feedback .correct-answer {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Progress Bar */
.roman-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.roman-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5cb85c, #4cae4c);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Streak indicator */
.roman-streak {
    color: #ffd700;
}

.roman-streak.hot {
    animation: glow 0.5s infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 5px #ffd700; }
    to { text-shadow: 0 0 15px #ff6b00, 0 0 25px #ffd700; }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive */
@media (max-width: 400px) {
    .roman-symbol-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .roman-target {
        font-size: 2.5rem;
    }

    .roman-answer {
        font-size: 2rem;
    }
}
