# Calculator App A modern, responsive web calculator with dark/light theme toggle and smooth animations. ## Features - โœจ **Modern UI Design** - Clean and intuitive interface with smooth animations - ๐ŸŒ™ **Dark/Light Theme** - Toggle between dark and light modes with local storage persistence - ๐Ÿ“ฑ **Responsive Design** - Works seamlessly on desktop, tablet, and mobile devices - ๐Ÿ”ข **Full Calculator Functionality** - Support for basic arithmetic operations (+, -, ร—, รท) - โŒซ **Backspace Support** - Delete individual characters or clear the entire calculation - ๐ŸŽฏ **Smart Input Handling** - Prevents invalid inputs and handles edge cases - ๐Ÿ’พ **Local Storage** - Remembers your preferred theme setting ## Demo The calculator includes: - Number input (0-9) - Basic arithmetic operations (+, -, ร—, รท) - Decimal point support - Clear (C) and backspace (โŒซ) functionality - Equals (=) for calculations - Theme toggle (โ˜€๏ธ/๐ŸŒ‘) ## Technologies Used - **HTML5** - Semantic markup structure - **CSS3** - Modern styling with CSS Grid, Flexbox, and animations - **Vanilla JavaScript** - Interactive functionality and calculations ## File Structure ``` calculator/ โ”œโ”€โ”€ index.html # Main HTML structure โ”œโ”€โ”€ style.css # Styling and responsive design โ”œโ”€โ”€ script.js # Calculator logic and event handling โ””โ”€โ”€ readme.md # Project documentation ``` ## Getting Started ### Prerequisites - A modern web browser (Chrome, Firefox, Safari, Edge) - No additional dependencies required ### Installation 1. Clone or download this repository 2. Open `index.html` in your web browser 3. Start calculating! ## Usage 1. **Basic Calculations**: Click number buttons and operators to build your expression 2. **Decimal Numbers**: Use the decimal point (.) for floating-point calculations 3. **Clear**: Use 'C' to clear the entire calculation 4. **Backspace**: Use 'โŒซ' to delete the last entered character 5. **Calculate**: Press '=' to evaluate the expression 6. **Theme Toggle**: Click the sun/moon icon (โ˜€๏ธ/๐ŸŒ‘) to switch themes ## Key Features Explained ### Smart Input Validation - Prevents multiple decimal points in a single number - Handles leading zeros intelligently - Prevents invalid operator sequences ### Theme Persistence - Your preferred theme (dark/light) is saved in browser's local storage - Theme preference persists across browser sessions ### Responsive Design - Optimized for screens from 320px to 1536px+ width - Touch-friendly button sizing for mobile devices - Scalable layout that maintains usability across all devices ## Browser Compatibility - โœ… Chrome (latest) - โœ… Firefox (latest) - โœ… Safari (latest) - โœ… Edge (latest) - โœ… Mobile browsers ## License This project is open source and available under the [MIT License](LICENSE). ---