html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background: #2b1d16 url('bg.jpg?v=4') center center / cover no-repeat fixed;
    color: #fff8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow-x: hidden;
}

.app {
    width: 100%;
    max-width: 420px;
    padding: 28px 24px 44px;
    box-sizing: border-box;
    margin: 0 auto;
    animation: fadeIn 0.9s ease-out;
    z-index: 1;
    position: relative;
}

.app::before,
.app::after {
    content: '';
    position: fixed;
    width: 18px;
    height: 18px;
    background: rgba(160, 110, 70, 0.55);
    border-radius: 45% 55% 40% 60%;
    filter: blur(1px);
    pointer-events: none;
    z-index: 0;
}

.app::before {
    left: 10%;
    top: 12%;
    animation: beanFloat 7s ease-in-out infinite;
}

.app::after {
    right: 12%;
    top: 22%;
    width: 14px;
    height: 14px;
    animation: beanFloat 9s ease-in-out infinite reverse;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes beanFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-14px) rotate(18deg); }
}

.cup-wrap {
    width: 150px;
    height: 150px;
    margin: 0 auto 22px;
    filter: drop-shadow(0 12px 30px rgba(0,0,0,0.55));
    animation: cupFloat 3.4s ease-in-out infinite;
}

@keyframes cupFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.cup {
    width: 100%;
    height: 100%;
    overflow: visible;
    animation: cupPulse 4s ease-in-out infinite;
}

@keyframes cupPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.steam {
    animation: rise 2.4s ease-in-out infinite;
    transform-origin: center bottom;
}

.steam-1 { animation-delay: 0s; }
.steam-2 { animation-delay: 0.7s; }
.steam-3 { animation-delay: 1.4s; }

@keyframes rise {
    0% { transform: translateY(0) scale(1); opacity: 0.85; }
    100% { transform: translateY(-22px) scale(1.3); opacity: 0; }
}

.logo {
    font-size: 26px;
    font-weight: 800;
    color: #fff0dd;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 14px rgba(0,0,0,0.7);
    animation: glowText 3s ease-in-out infinite alternate;
}

@keyframes glowText {
    from { text-shadow: 0 2px 14px rgba(0,0,0,0.7); }
    to { text-shadow: 0 2px 22px rgba(232, 195, 158, 0.55); }
}

.subtitle {
    font-size: 18px;
    font-weight: 700;
    color: #e8c39e;
    margin: 0 0 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.hint {
    font-size: 14px;
    color: #d7c4b5;
    margin: 0 0 30px;
    text-shadow: 0 1px 5px rgba(0,0,0,0.6);
}

.result {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 18px;
    margin: 18px 0 22px;
    font-size: 14px;
    word-break: break-all;
    color: #fff;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 18px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.15);
}

.result.ok {
    border-color: rgba(127, 214, 127, 0.6);
    background: rgba(76, 175, 80, 0.18);
}

.result.error {
    border-color: rgba(255, 119, 119, 0.6);
    background: rgba(244, 67, 54, 0.18);
    color: #ffe3e0;
}

.hidden {
    display: none;
}

.btn {
    width: 100%;
    padding: 17px 20px;
    margin: 12px 0;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #a57b52 0%, #7a5438 100%);
    color: #fff8f0;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,0.4);
    transition: transform 0.15s, box-shadow 0.15s, filter 0.2s;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    animation: sheen 2.8s infinite;
}

@keyframes sheen {
    0% { transform: translateX(-100%); }
    50%, 100% { transform: translateX(100%); }
}

.btn:hover {
    filter: brightness(1.12);
    box-shadow: 0 12px 28px rgba(0,0,0,0.5);
}

.btn:active {
    transform: scale(0.97);
    box-shadow: 0 5px 14px rgba(0,0,0,0.35);
}

.btn-send {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

.btn-close {
    background: rgba(255, 248, 240, 0.12);
    border: 1px solid rgba(255, 248, 240, 0.28);
    color: #f0e0d5;
    box-shadow: none;
    animation: none;
}

.btn-close::after {
    display: none;
}

.btn-close:hover {
    background: rgba(255, 248, 240, 0.2);
}

.qty-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 14px 0 10px;
}

.qty-btn {
    padding: 14px 0;
    border: 2px solid rgba(232, 195, 158, 0.35);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff8f0;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    backdrop-filter: blur(4px);
}

.qty-btn:hover, .qty-btn.active {
    background: rgba(232, 195, 158, 0.35);
    border-color: #e8c39e;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.note {
    font-size: 12px;
    color: #cbb5a6;
    margin-top: 10px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
