* {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: #e0e5ec;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }

        /* --- THE COFFEE MACHINE (CSS ART) --- */
        .machine-container {
            position: relative;
            width: 380px;
            height: 500px;
            display: flex;
            flex-direction: column;
            align-items: center;
            perspective: 1000px;
        }

        /* Main Body */
        .machine-body {
            width: 100%;
            height: 440px;
            background: linear-gradient(135deg, #2c3e50, #1a252f);
            border-radius: 40px 40px 10px 10px;
            box-shadow: 
                20px 20px 60px #bec3c9, 
                -20px -20px 60px #ffffff;
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            z-index: 2;
            padding-top: 30px;
        }

        /* Top Panel / Header */
        .machine-header {
            width: 85%;
            height: 60px;
            background: #111;
            border-radius: 10px;
            margin-bottom: 0px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-bottom: 2px solid #444;
        }

        /* The Digital Display */
        .display-screen {
            width: 120px;
            height: 30px;
            background-color: #000;
            color: #333; /* Dimmed state */
            font-family: 'Courier New', Courier, monospace;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            border-radius: 4px;
            letter-spacing: 1px;
            transition: all 0.3s ease;
            box-shadow: inset 0 0 5px rgba(0,0,0,0.9);
        }

        .display-screen.active {
            color: #0ff; /* Cyan LED look */
            text-shadow: 0 0 5px #0ff;
        }

        .display-screen.hot {
            color: #ff4757;
            text-shadow: 0 0 5px #ff4757;
        }

        /* The Dispenser Head */
        .dispenser-group {
            position: relative;
            width: 100%;
            display: flex;
            justify-content: center;
        }

        .dispenser-head {
            width: 140px;
            height: 60px;
            background: linear-gradient(to bottom, #333, #111);
            border-radius: 0 0 20px 20px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.5);
            z-index: 5;
            display: flex;
            justify-content: center;
            align-items: flex-end;
        }

        .nozzle {
            width: 20px;
            height: 10px;
            background: #555;
            margin-bottom: -5px;
            border-radius: 2px;
        }

        /* The Back Splash Area */
        .splash-back {
            width: 80%;
            height: 280px;
            background: #222;
            box-shadow: inset 5px 5px 20px rgba(0,0,0,0.7);
            border-radius: 5px;
            position: relative;
            display: flex;
            justify-content: center;
            align-items: flex-end;
            padding-bottom: 10px;
            margin-top: -10px; /* Tuck under dispenser */
        }

        /* Drip Tray */
        .drip-tray {
            width: 390px;
            height: 40px;
            background: #c0c0c0; /* Stainless steel look */
            background: repeating-linear-gradient(
                90deg,
                #c0c0c0,
                #c0c0c0 10px,
                #a0a0a0 10px,
                #a0a0a0 12px
            );
            border-radius: 10px;
            position: absolute;
            bottom: -20px;
            z-index: 3;
            box-shadow: 0 10px 20px rgba(0,0,0,0.3);
        }

        /* --- ANIMATION ELEMENTS --- */

        /* The Liquid Stream */
        .stream {
            position: absolute;
            top: 50px; /* Below nozzle */
            width: 6px;
            height: 0;
            background: #3e2723; /* Coffee color */
            border-radius: 4px;
            z-index: 10;
            opacity: 0;
            transition: opacity 0.2s;
        }

        .stream.pouring {
            opacity: 1;
            animation: pour 0.5s forwards;
            height: 140px; /* Distance to cup */
        }

        @keyframes pour {
            0% { height: 0; }
            100% { height: 140px; }
        }

        /* The Cup */
        .cup-container {
            position: relative;
            width: 70px;
            height: 60px;
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.5s ease;
            cursor: pointer;
        }

        .cup-container.visible {
            opacity: 1;
            transform: translateY(0);
        }

        .mug {
            width: 70px;
            height: 60px;
            background: #fff;
            border-radius: 0 0 30px 30px;
            position: relative;
            overflow: hidden; /* Hide liquid filling up */
            box-shadow: 2px 0 5px rgba(0,0,0,0.2);
            z-index: 11;
        }

        .mug-handle {
            position: absolute;
            right: -15px;
            top: 10px;
            width: 25px;
            height: 35px;
            border: 6px solid #fff;
            border-radius: 0 15px 15px 0;
            z-index: 10;
        }

        /* Coffee inside the cup */
        .coffee-fill {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 0%;
            background: #3e2723;
            transition: height 3s linear;
        }

        .coffee-fill.filling {
            height: 85%;
        }

        /* Steam */
        .steam-container {
            position: absolute;
            top: -40px;
            left: 0;
            width: 100%;
            height: 40px;
            display: flex;
            justify-content: center;
            gap: 5px;
            opacity: 0;
            transition: opacity 1s;
        }

        .steam-container.steaming {
            opacity: 1;
        }

        .steam-puff {
            width: 8px;
            height: 20px;
            background: #fff;
            border-radius: 10px;
            filter: blur(4px);
            animation: rise 2s infinite;
            opacity: 0;
        }

        .steam-puff:nth-child(2) { animation-delay: 0.5s; }
        .steam-puff:nth-child(3) { animation-delay: 1s; }

        @keyframes rise {
            0% { transform: translateY(0) scale(1); opacity: 0; }
            50% { opacity: 0.4; }
            100% { transform: translateY(-30px) scale(2); opacity: 0; }
        }