body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #222;
}
body {
    padding-top: 72px;
}
.background {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('/static/bg.jpg') center center/cover no-repeat;
    z-index: 0;
}
header {
    position: absolute;
    top: 32px; left: 32px;
    z-index: 3;
}
.logo {
    width: 140px;
    height: 140px;
    border-radius: 36px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    background: rgba(255,255,255,0.7);
    padding: 12px;
    transition: box-shadow 0.2s;
}
.logo:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.28);
}
main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: relative;
    z-index: 1;
}
.product-block {
    max-width: 600px;
    padding: 64px 48px 48px 48px;
    border-radius: 40px;
    background: rgba(255,255,255,0.25);
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255,255,255,0.25);
}
.product-icon {
    width: 480px;
    max-width: 90vw;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 24px;
    margin-bottom: 36px;
    background: #222;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}
.product-desc h1 {
    margin: 0 0 12px 0;
    font-size: 2.8em;
    color: #181818;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-align: center;
}
.product-desc p {
    margin: 0;
    color: #222;
    font-size: 1.35em;
    text-align: center;
    opacity: 0.92;
}
.chat-fab {
    position: fixed;
    right: 4vw;
    bottom: 4vw;
    width: 128px;
    height: 128px;
    background: linear-gradient(135deg, #1a4bff 0%, #00e0ff 100%);
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.4em;
    cursor: pointer;
    z-index: 200;
    transition: box-shadow 0.2s, background 0.2s;
    border: none;
}
.chat-fab:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.28);
    background: linear-gradient(135deg, #00e0ff 0%, #1a4bff 100%);
}
.chat-block {
    position: fixed;
    right: 4vw;
    bottom: 4vw;
    background: rgba(255,255,255,0.25);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    width: min(480px, 90vw);
    height: min(520px, 70vh);
    min-width: 260px;
    min-height: 220px;
    max-width: 98vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 100;
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255,255,255,0.25);
    font-size: 1.18em;
    padding: 0;
    transition: width 0.2s, height 0.2s, right 0.2s, bottom 0.2s;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s, transform 0.3s;
}
.chat-block.chat-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(40px);
}
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.5);
    padding: 20px 32px;
    border-radius: 32px 32px 0 0;
    font-weight: bold;
    color: #222;
    font-size: 1.25em;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    position: relative;
}
.chat-title {
    font-weight: 700;
    font-size: 1.1em;
}
.chat-status {
    margin-left: 12px;
    font-size: 0.95em;
    color: #0a7c2f;
    font-weight: 600;
}
.chat-status.online { color: #0a7c2f; }
.chat-status.offline { color: #aaa; }
.chat-close {
    background: none;
    border: none;
    font-size: 1.6em;
    color: #888;
    cursor: pointer;
    margin-left: 18px;
    transition: color 0.2s;
}
.chat-close:hover { color: #e600a9; }
.chat-body {
    flex: 1;
    padding: 24px 18px 0 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: none;
    min-height: 120px;
    scrollbar-width: none; /* Firefox */
}
.chat-body::-webkit-scrollbar { display: none; }
.chat-placeholder {
    color: #888;
    text-align: center;
    margin-top: 40px;
    font-size: 1.1em;
    opacity: 0.7;
}
.msg-wrap {
    display: flex;
    align-items: flex-end;
    margin-bottom: 2px;
    gap: 8px;
    animation: msg-appear 0.3s;
    width: 100%;
}
.msg-wrap.to {
    flex-direction: row-reverse;
    justify-content: flex-end;
    text-align: right;
}
.msg-wrap.from {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
}
@keyframes msg-appear {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}
.msg {
    padding: 10px 16px 6px 16px;
    border-radius: 16px;
    max-width: 70%;
    font-size: 1.1em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    word-break: break-word;
    background: #c1e7ff;
    color: #222;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.msg.to {
    margin-left: auto;
    margin-right: 0;
    align-self: flex-end;
    background: #c1e7ff;
}
.msg.from {
    align-items: flex-start;
    background: rgba(255,255,255,0.7);
}
.msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    margin-bottom: 2px;
}
.msg-avatar.user { background: #e0f7fa; }
.msg-avatar.operator { background: #ffe0f7; }
.msg-text {
    width: 100%;
    text-align: left;
    font-size: 1.08em;
    margin-bottom: 2px;
}
.msg.to .msg-time {
    align-self: flex-end;
    text-align: right;
}
.msg.from .msg-time {
    align-self: flex-start;
    text-align: left;
}
.msg-time {
    font-size: 0.85em;
    color: #888;
    min-width: 38px;
    margin-top: 2px;
}
.chat-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 18px 18px 18px;
    border-top: 1px solid rgba(0,0,0,0.04);
    background: none;
}
.chat-footer input {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 1em;
    background: rgba(255,255,255,0.7);
}
.chat-send {
    background: linear-gradient(135deg, #1a4bff 0%, #00e0ff 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.3em;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: background 0.2s;
}
.chat-send:hover {
    background: linear-gradient(135deg, #00e0ff 0%, #1a4bff 100%);
}
footer {
    position: fixed;
    left: 32px;
    bottom: 32px;
    z-index: 2;
    display: flex;
    gap: 20px;
}
.icon img {
    width: 96px;
    height: 96px;
    border-radius: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    background: #fff;
    padding: 12px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.icon img:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.22);
    transform: scale(1.08);
}
@media (max-width: 900px) {
    body {
        padding-top: 54px;
    }
    main {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        height: auto;
        padding-top: 80px;
    }
    .product-block {
        margin-right: 0;
        margin-bottom: 32px;
        max-width: 95vw;
        padding: 24px 8px 18px 8px;
        border-radius: 18px;
    }
    .product-icon {
        width: 90vw;
        max-width: 320px;
        border-radius: 10px;
        margin-bottom: 16px;
    }
    .product-image-watermark {
        width: 90vw;
        max-width: 320px;
    }
    .mini-watermark {
        width: 32px;
        height: 32px;
        top: 6px;
        right: 6px;
        border-radius: 8px;
    }
    .chat-fab {
        right: 12px;
        bottom: 12px;
        width: 80px;
        height: 80px;
        font-size: 2.8em;
    }
    .chat-block {
        right: 0;
        left: 0;
        margin: 0 auto;
        bottom: 0;
        width: 100vw;
        max-width: 100vw;
        min-width: 0;
        height: 44vh;
        max-height: 60vh;
        border-radius: 18px 18px 0 0;
        font-size: 1.08em;
    }
    .chat-header {
        border-radius: 18px 18px 0 0;
        padding: 10px 16px;
        font-size: 1.08em;
    }
    .chat-body {
        padding: 8px 8px 0 8px;
        gap: 8px;
    }
    .msg {
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 1em;
    }
    .msg-avatar {
        width: 28px;
        height: 28px;
        font-size: 1.1em;
    }
    .msg-time {
        font-size: 0.75em;
        min-width: 28px;
    }
    .chat-footer {
        padding: 8px 8px 10px 8px;
    }
    .chat-send {
        width: 36px;
        height: 36px;
        font-size: 1em;
    }
    header {
        top: 8px;
        left: 8px;
    }
    .logo {
        width: 64px;
        height: 64px;
        border-radius: 16px;
        padding: 4px;
    }
    footer {
        left: 8px;
        bottom: 8px;
        gap: 10px;
    }
    .icon img {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        padding: 4px;
    }
}
@media (max-width: 600px) {
    .chat-block {
        width: 100vw;
        min-width: 0;
        height: 44vh;
        max-height: 60vh;
        font-size: 1em;
    }
}
h1 {
    color: #333;
    margin-top: 40px;
}
p {
    color: #666;
}
.product-image-watermark {
    position: relative;
    display: inline-block;
    width: 480px;
    max-width: 90vw;
}
.mini-watermark {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 64px;
    height: 64px;
    opacity: 0.75;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.7);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}
.product-image-watermark:hover .mini-watermark {
    opacity: 1;
    transform: scale(1.08);
}
#splash {
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(20, 24, 28, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s;
}
.splash-logo-wrap {
    position: relative;
    width: 600px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.splash-logo {
    width: 400px;
    height: 400px;
    border-radius: 48px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    background: rgba(255,255,255,0.7);
    position: relative;
    z-index: 2;
}
.splash-segment {
    position: absolute;
    width: 100px;
    height: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    z-index: 3;
}
.splash-segment-1 {
    animation: segment1-move 2.2s linear infinite;
}
.splash-segment-2 {
    animation: segment2-move 2.2s linear infinite reverse;
    background: #00e0ff;
}
@keyframes segment1-move {
    0%   { left: 0;   top: 0;   transform: rotate(0deg); }
    25%  { left: 500px; top: 0;   transform: rotate(90deg); }
    50%  { left: 500px; top: 500px; transform: rotate(180deg); }
    75%  { left: 0;   top: 500px; transform: rotate(270deg); }
    100% { left: 0;   top: 0;   transform: rotate(360deg); }
}
@keyframes segment2-move {
    0%   { left: 0;   top: 500px; transform: rotate(270deg); }
    25%  { left: 0;   top: 0;   transform: rotate(0deg); }
    50%  { left: 500px; top: 0;   transform: rotate(90deg); }
    75%  { left: 500px; top: 500px; transform: rotate(180deg); }
    100% { left: 0;   top: 500px; transform: rotate(270deg); }
}
@media (max-width: 900px) {
    #splash .splash-logo-wrap {
        width: 220px;
        height: 220px;
    }
    #splash .splash-logo {
        width: 140px;
        height: 140px;
        border-radius: 18px;
    }
    #splash .splash-segment {
        width: 44px;
        height: 8px;
        border-radius: 4px;
    }
    #splash .splash-segment-1, #splash .splash-segment-2 {
        animation-duration: 1.5s;
    }
    @keyframes segment1-move {
        0%   { left: 0;   top: 0;   transform: rotate(0deg); }
        25%  { left: 156px; top: 0;   transform: rotate(90deg); }
        50%  { left: 156px; top: 156px; transform: rotate(180deg); }
        75%  { left: 0;   top: 156px; transform: rotate(270deg); }
        100% { left: 0;   top: 0;   transform: rotate(360deg); }
    }
    @keyframes segment2-move {
        0%   { left: 0;   top: 156px; transform: rotate(270deg); }
        25%  { left: 0;   top: 0;   transform: rotate(0deg); }
        50%  { left: 156px; top: 0;   transform: rotate(90deg); }
        75%  { left: 156px; top: 156px; transform: rotate(180deg); }
        100% { left: 0;   top: 156px; transform: rotate(270deg); }
    }
}
.product-price {
    margin: 18px 0 18px 0;
    font-size: 1.5em;
    color: #fff;
    background: linear-gradient(90deg, #1a4bff 0%, #00e0ff 100%);
    font-weight: 700;
    letter-spacing: 0.01em;
    text-align: center;
    opacity: 1;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    display: inline-block;
    padding: 8px 28px;
}
.product-info-block {
    margin-top: 28px;
    background: rgba(255,255,255,0.55);
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 18px 20px 12px 20px;
    text-align: center;
    font-size: 1.15em;
    color: #222;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.product-info-block .info-date {
    font-weight: 600;
    color: #1a4bff;
    margin-bottom: 6px;
}
.product-info-block .info-bonus {
    font-weight: 600;
    color: #e600a9;
}
/* --- Top Navigation Bar --- */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 72px;
    backdrop-filter: blur(6px);
}
.nav-inner {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 32px;
    padding: 0 24px;
}
.nav-logo {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    margin-right: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #fff;
    padding: 4px;
}
.nav-buttons {
    display: flex;
    gap: 24px;
    flex: 1;
    justify-content: flex-start;
}
.nav-buttons button {
    background: #f4f4f6;
    color: #232323;
    border: 1.5px solid #e0e0e0;
    border-radius: 14px;
    padding: 12px 28px;
    font-size: 1.08em;
    font-weight: 500;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s, color 0.18s, border 0.18s;
}
.nav-buttons button:hover {
    background: #e9e9ec;
    color: #0a2a4d;
    border: 1.5px solid #bfc7d1;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
@media (max-width: 900px) {
    .top-nav {
        height: 54px;
    }
    .nav-logo {
        width: 36px;
        height: 36px;
        border-radius: 7px;
        margin-right: 10px;
        padding: 2px;
    }
    .nav-inner {
        gap: 10px;
        padding: 0 6px;
    }
    .nav-buttons {
        gap: 7px;
    }
} 