
        /* Pixel Art Bg */
        body {
            background-image: url('https://i.pinimg.com/1200x/75/b9/09/75b90938826638b0aff9c05d85b3de46.jpg');
            background-size: cover;
            background-position: center 70%;
            background-repeat: no-repeat;
            background-attachment: fixed;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 0;
            font-family: 'Press Start 2P', cursive;
            image-rendering: pixelated;
        }

        .calculator-container {
            background-color: #ffffff;
            padding: 25px;
            border-radius: 20px;
            width: 380px;
            border: 4px solid #cf5391;
            /* Blurry grey shadow - like a real app window */
            box-shadow: 0 20px 40px rgba(128, 128, 128, 0.3),
                        0 8px 16px rgba(0, 0, 0, 0.2),
                        inset 0 1px 1px rgba(255, 255, 255, 0.6);
            backdrop-filter: blur(2px);
            position: relative;
            z-index: 10;
        }

        /* Window Title Bar */
        .title-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #ffb6c1;
        }

        .app-title {
            font-family: 'Press Start 2P', cursive;
            font-size: 0.8rem;
            color: #ff1493;
            line-height: 1.5;
            text-shadow: 2px 2px 0 #ffb6c1;
        }

        /* Window Controls - RECTANGLE like MS Paint */
.window-controls {
    display: flex;
    gap: 2px;
}

.window-btn {
    width: 25px;
    height: 22px; /* fit symbols properly */
    border: 2px solid #ff69b4;
    background-color: #fff0f5;
    color: #ff69b4;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    padding: 0; 
    line-height: 1; 
}

.minimize-btn {
    font-size: 20px;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn {
    font-size: 20px; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.window-btn:hover {
    background-color: #ffb6c1;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(255, 105, 180, 0.4);
    border-color: #ff1493;
}

.window-btn:active {
    transform: scale(1.05);
    background-color: #ffb6c1;
}

        .display {
            background-color: #fff0f5;
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 20px;
            text-align: right;
            border: 3px solid #ffb6c1;
            box-shadow: inset 0 2px 5px rgba(255, 105, 180, 0.2);
        }

        /* screen */
        #screen {
            width: 100%;
            border: none;
            background: transparent;
            font-size: 2rem;
            color: #ff1493;
            text-align: right;
            outline: none;
            font-family: 'Press Start 2P', cursive;
        }

        .buttons {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
            margin-bottom: 15px;
        }

        button {
            padding: 18px 5px;
            border: none;
            border-radius: 10px;
            font-size: 1rem;
            cursor: pointer;
            background-color: #fff0f5;
            color: #ff69b4;
            transition: all 0.2s;
            font-family: 'Press Start 2P', cursive;
            border: 2px solid #ffb6c1;
            image-rendering: pixelated;
            box-shadow: 0 4px 0 #db7093;
        }

        button:hover {
            background-color: #ffc0cb;
            transform: translateY(-2px);
            box-shadow: 0 6px 0 #db7093;
        }

        button:active {
            transform: translateY(4px);
            box-shadow: 0 0 0 #db7093;
        }

        .btn-op { 
            background-color: #ffb6c1; 
            color: white;
            border-color: #ff69b4;
        }
        
        .btn-special { 
            background-color: #ff69b4; 
            color: white; 
            font-size: 0.7rem;
            border-color: #db7093;
        }
        
        /* Special styling for undo button */
        .btn-undo { 
            background-color: #ff69b4; 
            color: white; 
            font-size: 1.2rem;
            border-color: #db7093;
        }
        
        .btn-undo:hover {
            background-color: #ff1493;
            transform: translateY(-2px) scale(1.05);
        }
        
        .btn-equal { 
            background-color: #db7093; 
            color: white;
            border-color: #b04c6f;
        }

        .btn-percent {
            background-color: #ffb6c1;
            color: white;
            font-size: 1.2rem;
        }
        
        /* History Panel */
        #history-panel {
            background-color: #fff0f5;
            border-radius: 10px;
            padding: 10px;
            max-height: 150px;
            overflow-y: auto;
            margin-top: 15px;
            border: 3px solid #ffb6c1;
            box-shadow: inset 0 2px 5px rgba(255, 105, 180, 0.1);
        }
        
        .history-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            color: #ff1493;
            font-weight: bold;
            font-size: 0.6rem;
        }
        
        .clear-all-btn {
            background-color: #ffb6c1;
            color: white;
            border: none;
            border-radius: 15px;
            padding: 5px 12px;
            font-size: 0.5rem;
            cursor: pointer;
            transition: all 0.2s;
            font-family: 'Press Start 2P', cursive;
            border: 2px solid #ff69b4;
        }
        
        .clear-all-btn:hover {
            background-color: #ff69b4;
        }
        
        .history-item {
            padding: 8px 12px;
            margin: 5px 0;
            background-color: white;
            border-radius: 8px;
            cursor: pointer;
            color: #ff69b4;
            font-size: 0.55rem;
            border-left: 4px solid #ffb6c1;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.2s;
            font-family: 'Press Start 2P', cursive;
        }
        
        .history-item:hover {
            background-color: #ffe4e1;
            transform: translateX(5px);
        }
        
        .delete-item {
            color: #db7093;
            font-size: 12px;
            opacity: 0.5;
            transition: opacity 0.2s;
        }
        
        .delete-item:hover {
            opacity: 1;
        }
        
        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.3);
            backdrop-filter: blur(5px);
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }
        
        .modal-content {
            background-color: #fff0f5;
            padding: 25px;
            border-radius: 20px;
            width: 300px;
            text-align: center;
            box-shadow: 0 20px 40px rgba(128, 128, 128, 0.4);
            animation: modalPop 0.3s ease;
            border: 4px solid #ff69b4;
            font-family: 'Press Start 2P', cursive;
        }
        
        @keyframes modalPop {
            from { transform: scale(0.8); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }
        
        .modal h3 {
            color: #ff1493;
            margin-bottom: 15px;
            font-size: 1rem;
        }
        
        .modal p {
            color: #db7093;
            margin-bottom: 25px;
            font-size: 0.7rem;
            line-height: 1.5;
        }
        
        .modal-buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
        }
        
        .modal-btn {
            padding: 12px 20px;
            border: none;
            border-radius: 15px;
            font-size: 0.7rem;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: bold;
            font-family: 'Press Start 2P', cursive;
            border: 2px solid white;
        }
        
        .modal-btn.cancel {
            background-color: #ffb6c1;
            color: white;
        }
        
        .modal-btn.cancel:hover {
            background-color: #ffa0b0;
        }
        
        .modal-btn.ok {
            background-color: #db7093;
            color: white;
        }
        
        .modal-btn.ok:hover {
            background-color: #c85a7a;
        }
        
        .empty-history {
            color: #db7093;
            text-align: center;
            padding: 15px;
            font-style: italic;
            font-size: 0.55rem;
        }

        /* Non-functional button tooltip on hover */
        .window-btn[title]:hover::after {
            content: attr(title);
            position: absolute;
            bottom: -25px;
            right: 0;
            background: #ffb6c1;
            color: white;
            padding: 4px 8px;
            border-radius: 5px;
            font-size: 0.4rem;
            white-space: nowrap;
            font-family: 'Press Start 2P', cursive;
            border: 1px solid #ff69b4;
            pointer-events: none;
            z-index: 100;
        }

        .window-btn {
            position: relative;
        }
    