* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cinzel', 'Courier New', monospace; /* خط ذو طابع أسطوري سحري */
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: radial-gradient(circle at center, #1a0b2e 0%, #05020a 100%);
    overflow: hidden;
}

/* حاوية بتصميم جوهرة سحرية عائمة */
.calculator-container {
    background: rgba(30, 15, 50, 0.4);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(168, 85, 247, 0.3);
    width: 420px;
    padding: 30px;
    border-radius: 40px;
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.2),
                inset 0 0 30px rgba(217, 70, 239, 0.1);
    animation: floatOrb 6s ease-in-out infinite;
}

@keyframes floatOrb {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(0.5deg); }
}

.display-screen {
    background: rgba(10, 5, 20, 0.8);
    border: 1px solid rgba(217, 70, 239, 0.4);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: inset 0 0 15px rgba(168, 85, 247, 0.3);
}

.terminal-tag {
    font-size: 0.65rem;
    color: #e879f9;
    letter-spacing: 4px;
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(232, 121, 249, 0.8);
}

#display {
    width: 100%;
    height: 50px;
    background: transparent;
    border: none;
    font-size: 2.5rem;
    text-align: center; /* الرقم في المنتصف تماماً مثل الكرات البلورية */
    color: #f3e8ff;
    text-shadow: 0 0 15px rgba(243, 232, 255, 0.6);
    outline: none;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* الأزرار أصبحت تشبه القطع السحرية الدائرية المضيئة */
.btn {
    height: 60px;
    background: rgba(45, 20, 75, 0.6);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 50% / 30%; /* شكل هندسي فريد بين الدائرة والمستطيل المنحني */
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    color: #e2e8f0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn:hover {
    background: rgba(139, 92, 246, 0.4);
    border-color: #f472b6;
    color: #ffffff;
    transform: scale(1.1); /* تتكبير الزر بسحر عند الماوس */
    box-shadow: 0 0 20px rgba(244, 114, 182, 0.6);
}

.num {
    color: #faf5ff;
}

.operator {
    background: rgba(14, 116, 144, 0.4);
    border-color: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

.operator:hover {
    background: rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.8);
}

.sci {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.3);
    color: #4ade80; /* لون زمردي سحري للطاقة */
}

.sci:hover {
    background: rgba(74, 222, 128, 0.3);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.8);
}

.function {
    background: rgba(225, 29, 72, 0.2);
    border-color: rgba(244, 63, 94, 0.3);
    color: #fb7185;
}

.function:hover {
    background: rgba(244, 63, 94, 0.4);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.8);
}

.equals {
    background: linear-gradient(135deg, #c084fc 0%, #db2777 100%);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(219, 39, 119, 0.6);
}

.equals:hover {
    background: linear-gradient(135deg, #d8b4fe 0%, #f43f5e 100%);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(244, 63, 94, 0.9);
}