/* Bearing Game Specific Styles */

.bearing-section {
    position: relative;
    overflow: hidden;
}

.bearing-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, rgba(0, 0, 0, 0) 60%);
    pointer-events: none;
    z-index: 0;
}

.bearing-game-wrapper {
    position: relative;
    z-index: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.bearing-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .bearing-layout {
        grid-template-columns: 1fr;
    }
}

/* Canvas Area */
.bearing-canvas-container {
    background: #0f172a;
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    position: relative;
}

#bearing-canvas {
    max-width: 100%;
    height: auto;
    background: #1e293b;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}

/* Panel Area */
.bearing-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 450px;
}

.bearing-header {
    margin-bottom: 2rem;
}

.bearing-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #e2e8f0;
}

.bearing-progress {
    display: flex;
    gap: 0.5rem;
}

.progress-step {
    flex: 1;
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.progress-step.active {
    background: #8b5cf6;
    color: white;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.progress-step.completed {
    background: rgba(139, 92, 246, 0.3);
    color: #cbd5e1;
}

.bearing-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bearing-stage-content {
    animation: fadeIn 0.5s ease;
}

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

.bearing-stage-content h4 {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 1rem;
}

.bearing-stage-content p {
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.direction-btn-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.dir-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    font-family: inherit;
}

.dir-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    color: white;
    border-color: #8b5cf6;
}

.dir-btn.active {
    background: #8b5cf6;
    color: white;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    border-color: #8b5cf6;
}

/* Quiz Styles */
.bearing-quiz-form {
    background: rgba(0,0,0,0.2);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.quiz-row {
    margin-bottom: 1.25rem;
}

.quiz-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #e2e8f0;
    font-weight: 600;
}

.quiz-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.bearing-select, .bearing-input {
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.bearing-select:focus, .bearing-input:focus {
    border-color: #8b5cf6;
}

.bearing-input {
    width: 80px;
    text-align: center;
}

.quadrant-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-submit-quiz {
    width: 100%;
    margin-top: 1rem;
    background: #10b981;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-submit-quiz:hover {
    background: #059669;
}

.quiz-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    display: none;
}

.quiz-feedback.success {
    display: block;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #34d399;
}

.quiz-feedback.error {
    display: block;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
}

.bearing-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
