/* Algebra Weapon Forge - Game Styles */

/* CSS Custom Properties */
:root {
    --primary-purple: #6B46C1;
    --primary-blue: #3B82F6;
    --success-green: #10B981;
    --warning-yellow: #F59E0B;
    --danger-red: #EF4444;
    --neutral-orange: #F97316;
    
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-white: #FFFFFF;
    --text-white-60: rgba(255, 255, 255, 0.6);
    --text-white-80: rgba(255, 255, 255, 0.8);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-white);
    line-height: 1.6;
}

/* Layout Components */
.game-container {
    min-height: 100vh;
    background: linear-gradient(to bottom right, #1e1b4b, #1e3a8a, #3730a3);
    padding: 1rem;
}

.game-wrapper {
    max-width: 64rem;
    margin: 0 auto;
}

.game-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--glass-border);
}

/* Typography */
.text-3xl { font-size: 1.875rem; font-weight: bold; }
.text-2xl { font-size: 1.5rem; font-weight: bold; }
.text-xl { font-size: 1.25rem; font-weight: bold; }
.text-lg { font-size: 1.125rem; font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

/* Color Classes */
.text-yellow-600 { color: #D97706; }
.text-blue-600 { color: #2563EB; }
.text-purple-600 { color: #7C3AED; }
.text-red-600 { color: #DC2626; }
.text-orange-600 { color: #EA580C; }
.text-gray-600 { color: #4B5563; }
.text-yellow-400 { color: #FBBF24; }
.text-blue-400 { color: #60A5FA; }
.text-purple-400 { color: #A78BFA; }
.text-green-400 { color: #34D399; }
.text-green-300 { color: #6EE7B7; }
.text-red-300 { color: #FCA5A5; }
.text-white-30 { color: rgba(255, 255, 255, 0.3); }

/* Button Styles */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: scale(1);
    font-size: 1rem;
}

.btn:hover:not(:disabled) {
    transform: scale(1.05);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: scale(1);
}

.btn-primary {
    background: linear-gradient(to right, var(--primary-purple), #EC4899);
    color: var(--text-white);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(to right, #553C9A, #BE185D);
}

.btn-success {
    background: linear-gradient(to right, var(--success-green), var(--primary-blue));
    color: var(--text-white);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(to right, #047857, #1D4ED8);
}

.btn-danger {
    background: linear-gradient(to right, var(--neutral-orange), var(--danger-red));
    color: var(--text-white);
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(to right, #C2410C, #B91C1C);
}

.btn-secondary {
    background: linear-gradient(to right, var(--primary-blue), var(--primary-purple));
    color: var(--text-white);
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(to right, #1D4ED8, #553C9A);
}

.btn-gray {
    background: #4B5563;
    color: var(--text-white);
}

.btn-gray:hover:not(:disabled) {
    background: #374151;
}

/* Input Styles */
.game-input {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    font-weight: bold;
    text-align: center;
    border-radius: 0.5rem;
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-white);
    width: 6rem;
}

.game-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.game-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 2px rgba(107, 70, 193, 0.5);
}

/* Layout Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

/* Progress Bar */
.progress-bar {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    height: 0.75rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-purple), #EC4899);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

/* Grid Layout */
.grid-cols-1 { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Responsive Design */
@media (min-width: 640px) {
    .sm\\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sm\\:flex-row { flex-direction: row; }
    .sm\\:space-y-0 > * + * { margin-top: 0; }
    .sm\\:space-x-4 > * + * { margin-left: 1rem; }
}

@media (max-width: 639px) {
    .game-container { padding: 0.5rem; }
    .game-card { padding: 1rem; }
    .text-3xl { font-size: 1.5rem; }
    .text-2xl { font-size: 1.25rem; }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 50;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 24rem;
    width: 100%;
    border: 1px solid var(--glass-border);
}

/* Feedback Styles */
.feedback-success {
    background: rgba(16, 185, 129, 0.2);
    color: #6EE7B7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.feedback-error {
    background: rgba(239, 68, 68, 0.2);
    color: #FCA5A5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.feedback-complete {
    background: linear-gradient(to right, rgba(107, 70, 193, 0.2), rgba(236, 72, 153, 0.2));
    border: 1px solid rgba(147, 51, 234, 0.3);
    color: #D8B4FE;
}

/* Animation Classes */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Game Specific Styles */
.equation-display {
    font-family: 'Courier New', monospace;
    font-size: 2.5rem;
    background: var(--glass-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: inline-block;
}

.weapon-icons {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-white-60);
}

.scoreboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.score-card {
    background: var(--glass-bg);
    border-radius: 0.5rem;
    padding: 0.75rem;
    text-align: center;
}

/* Accessibility */
.btn:focus,
.game-input:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}