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

         :root {
             --background: #10131c;
             --calculator: #191e2a;
             --display: #141923;
             --button: #252b39;
             --button-hover: #343c4e;
             --text: #f0f1f7;
             --muted: #9299ac;
             --purple: #8c7cf0;
             --purple-hover: #9d90ff;
         }

         body {
             min-height: 100vh;
             display: flex;
             justify-content: center;
             align-items: center;
             padding: 24px;
             background: var(--background);
             color: var(--text);
             font-family: "Segoe UI", Arial, sans-serif;
         }

         .calculator {
             width: 100%;
             max-width: 365px;
             padding: 23px;
             border: 1px solid #ffffff0c;
             border-radius: 25px;
             background: var(--calculator);
             box-shadow: 0 20px 65px #00000035;
         }

         .top {
             display: flex;
             justify-content: space-between;
             align-items: center;
             margin-bottom: 24px;
         }

         .title {
             font-size: 19px;
             font-weight: 650;
             letter-spacing: -.5px;
         }

         .subtitle {
             margin-top: 5px;
             font-size: 12px;
             color: var(--muted);
         }

         .menu {
             width: 37px;
             height: 37px;
             display: grid;
             place-items: center;
             border: 1px solid #ffffff0d;
             border-radius: 12px;
             color: #b7b0ff;
             font-size: 21px;
         }

         .display {
             min-height: 145px;
             padding: 20px 16px;
             margin-bottom: 17px;
             display: flex;
             flex-direction: column;
             align-items: flex-end;
             justify-content: flex-end;
             gap: 14px;
             border: 1px solid #ffffff08;
             border-radius: 18px;
             background: var(--display);
             overflow: hidden;
         }

         .expression {
             min-height: 17px;
             max-width: 100%;
             color: var(--muted);
             font-size: 14px;
             overflow-wrap: anywhere;
             text-align: right;
         }

         .result {
             max-width: 100%;
             font-size: clamp(34px, 9vw, 43px);
             font-weight: 500;
             letter-spacing: -1.5px;
             overflow-wrap: anywhere;
             text-align: right;
         }

         .keys {
             display: grid;
             grid-template-columns: repeat(4, minmax(0, 1fr));
             gap: 10px;
         }

         button {
             height: 59px;
             border: 1px solid #ffffff06;
             border-radius: 15px;
             background: var(--button);
             color: var(--text);
             font-family: inherit;
             font-size: 19px;
             font-weight: 500;
             cursor: pointer;
             transition: background .15s, transform .12s;
         }

         button:hover {
             background: var(--button-hover);
         }

         button:active {
             transform: scale(.95);
         }

         button:focus-visible {
             outline: 2px solid var(--purple);
             outline-offset: 2px;
         }

         .function {
             color: #c0b9ff;
             background: #8c7cf016;
         }

         .function:hover {
             background: #8c7cf02c;
         }

         .clear {
             color: #ff9da8;
             background: #e85e7014;
         }

         .clear:hover {
             background: #e85e7028;
         }

         .operator {
             color: #c3baff;
             font-size: 23px;
             background: #29263c;
         }

         .operator:hover {
             background: #393451;
         }

         .equals {
             background: var(--purple);
             color: #fff;
             font-size: 24px;
             border-color: transparent;
         }

         .equals:hover {
             background: var(--purple-hover);
         }

         .zero {
             grid-column: span 2;
         }

         .bottom {
             display: flex;
             justify-content: space-between;
             align-items: center;
             margin-top: 21px;
             padding: 0 2px;
             color: #777f92;
             font-size: 11px;
         }

         .indicator {
             display: flex;
             align-items: center;
             gap: 6px;
         }

         .dot {
             width: 6px;
             height: 6px;
             border-radius: 50%;
             background: #8cdbab;
         }

         @media (max-width: 400px) {
             .calculator {
                 padding: 17px;
                 border-radius: 22px;
             }

             .keys {
                 gap: 8px;
             }

             button {
                 height: 55px;
                 border-radius: 13px;
             }
         }
