/* GD Calculator - Geometry Dash Style Styling */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #fff;
}

.calculator-container {
    width: 100%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.calculator-header {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.calculator-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

.calculator-body {
    padding: 30px;
}

.difficulty-section {
    margin-bottom: 30px;
}

.difficulty-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.difficulty-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.difficulty-btn {
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.difficulty-btn:hover {
    transform: scale(1.1);
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

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

.difficulty-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.main-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
}

.operations-sidebar {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.operations-sidebar h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.operation-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.op-btn {
    width: 100%;
    height: 60px;
    border: none;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.op-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.op-btn:active {
    transform: translateY(0);
}

.op-btn.add:hover {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

.op-btn.subtract:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
}

.op-btn.multiply:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.op-btn.divide:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.op-btn.parenthesis {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
}

.op-btn.equals {
    grid-column: span 2;
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
    font-size: 2rem;
}

.op-btn.clear {
    grid-column: span 2;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.display-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.expression-display,
.result-display {
    margin-bottom: 20px;
}

.expression-display h3,
.result-display h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.expression-content {
    min-height: 60px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.expression-content .placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.expression-content .expression-item {
    display: flex;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.expression-content .expression-face {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.expression-content .expression-operator {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    margin: 0 5px;
}

.result-content {
    min-height: 100px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.result-placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 2rem;
}

.result-face {
    width: 80px;
    height: 80px;
    object-fit: contain;
    animation: popIn 0.5s ease;
}

.result-name {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: slideUp 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .operations-sidebar {
        order: 2;
    }
    
    .display-section {
        order: 1;
    }
    
    .calculator-header h1 {
        font-size: 1.8rem;
    }
    
    .difficulty-btn {
        width: 60px;
        height: 60px;
    }
    
    .operation-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .op-btn.equals,
    .op-btn.clear {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .calculator-body {
        padding: 15px;
    }
    
    .difficulty-btn {
        width: 50px;
        height: 50px;
    }
    
    .op-btn {
        height: 50px;
        font-size: 1.2rem;
    }
    
    .expression-content .expression-face {
        width: 30px;
        height: 30px;
    }
    
    .result-face {
        width: 60px;
        height: 60px;
    }
    
    .result-name {
        font-size: 1.2rem;
    }
}