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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.vending-machine {
    width: 400px;
    height: 600px;
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.machine-header {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.display-section {
    background: #1a1a2e;
    height: 60px;
    margin: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #16213e;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.display-text {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    text-align: center;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 5px #00ff00; }
    to { text-shadow: 0 0 20px #00ff00, 0 0 30px #00ff00; }
}

.chocolate-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px;
    height: 240px;
}

.chocolate-slot {
    background: linear-gradient(145deg, #3498db, #2980b9);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.chocolate-slot:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: #f39c12;
}

.chocolate-slot.selected {
    border-color: #e74c3c;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
}

.chocolate-icon {
    font-size: 30px;
    margin-bottom: 5px;
}

.chocolate-name {
    color: white;
    font-size: 10px;
    text-align: center;
    font-weight: bold;
}

.chocolate-price {
    color: #f1c40f;
    font-size: 8px;
    margin-top: 2px;
}

.coin-section {
    background: #34495e;
    margin: 20px;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #2c3e50;
}

.coin-display {
    color: #ecf0f1;
    text-align: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.coins {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.coin {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f39c12, #e67e22);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-weight: bold;
    font-size: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.coin:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.coin:active {
    transform: scale(0.9);
}

.buttons {
    display: flex;
    justify-content: space-around;
    margin: 0 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-family: inherit;
}

.buy-btn {
    background: linear-gradient(145deg, #27ae60, #229954);
    color: white;
}

.buy-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.buy-btn:disabled {
    background: #7f8c8d;
    cursor: not-allowed;
}

.reset-btn {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    color: white;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.dispensed-item {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, #8e44ad, #9b59b6);
    color: white;
    padding: 10px;
    border-radius: 8px;
    opacity: 0;
    transition: all 0.5s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.dispensed-item.show {
    opacity: 1;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

.falling-chocolate {
    position: absolute;
    font-size: 20px;
    pointer-events: none;
    z-index: 10;
}

@keyframes fall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(200px) rotate(360deg);
        opacity: 0;
    }
}

.github-link {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.github-link:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.05);
}
