* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background: #070b14;
    color: #e0e7ff;
    overflow-x: hidden;
    overflow-y: auto;
    user-select: none;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 10px;
}
body.ping-flash {
    animation: flash-blue 0.4s ease-out;
}
@keyframes flash-blue {
    0% { box-shadow: inset 0 0 0px #3b82f6; }
    50% { box-shadow: inset 0 0 100px #3b82f6; }
    100% { box-shadow: inset 0 0 0px #3b82f6; }
}
@media (min-height: 850px) {
    body {
        justify-content: center;
        padding: 0;
    }
}
#bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
#loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #070b14;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.loader-logo {
    height: 85px;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 30px #3b82f6);
    animation: pulse 1.5s infinite ease-in-out;
}
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px #3b82f6);
    }
    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 45px #3b82f6);
    }
}
.progress-container {
    width: 220px;
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    width: 0;
    background: #3b82f6;
    box-shadow: 0 0 20px #3b82f6;
    transition: 0.3s;
}
.container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    opacity: 0;
    transform: translateY(15px);
    transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.loaded .container {
    opacity: 1;
    transform: translateY(0);
}
header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}
header img {
    height: 50px;
    filter: drop-shadow(0 0 15px #3b82f6);
}
header h2 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.help-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: 0.3s;
}
.help-btn:hover {
    background: #3b82f6;
    color: white;
    transform: scale(1.1);
}
.card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 24px;
    margin-bottom: 15px;
    backdrop-filter: blur(20px);
}
.items {
    display: flex;
    justify-content: center;
    gap: 40px;
    align-items: center;
    margin-bottom: 30px;
}
.item-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #94a3b8;
    width: 100px;
}
.item-box img {
    width: 75px;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
    transition: 0.4s;
}
.normal-box:hover img {
    transform: translateY(-8px) scale(1.05);
    filter: drop-shadow(0 0 15px #fbbf24) drop-shadow(0 0 30px rgba(251, 191, 36, 0.6));
}
.cursed-box:hover img {
    transform: translateY(-8px) scale(1.05);
    filter: drop-shadow(0 0 12px #ef4444) drop-shadow(0 0 25px rgba(239, 68, 68, 0.7));
}
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.input-group {
    position: relative;
}
.input-group svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: #3b82f6;
    opacity: 0.7;
}
input {
    width: 100%;
    padding: 15px 15px 15px 48px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(7, 11, 20, 0.5);
    color: #fff;
    outline: none;
    font-size: 15px;
    transition: 0.3s;
}
input:focus {
    border-color: #3b82f6;
    background: rgba(7, 11, 20, 0.8);
}
.result {
    position: relative;
    font-size: 14px;
    line-height: 1.8;
    padding: 25px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 24px;
}
.profit-positive {
    color: #22c55e;
    font-weight: 700;
}
.profit-negative {
    color: #ef4444;
    font-weight: 700;
}
.share-btn {
    position: absolute;
    bottom: 15px;
    left: 25px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 6px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: 0.3s;
}
.share-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #fff;
}
.share-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}
.thermometer-track {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.4);
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
}
.thermometer-fill {
    height: 100%;
    width: 0%;
    transition: width 0.6s ease;
}
#modal, #kurs-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(2, 6, 23, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(15px);
}
.modal-content {
    background: #111827;
    padding: 30px;
    border-radius: 28px;
    max-width: 500px;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 30px 70px rgba(0,0,0,0.8);
}
.modal-content h3 {
    color: #fff;
    margin-bottom: 25px;
    text-align: center;
    font-size: 22px;
}
.modal-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.modal-item:last-of-type {
    border-bottom: none;
    margin-bottom: 10px;
}
.modal-item b {
    color: #60a5fa;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 6px;
}
.modal-item p {
    font-size: 14.5px;
    line-height: 1.5;
    color: #cbd5e1;
}
.nowrap {
    color: #60a5fa;
    font-weight: 700;
    white-space: nowrap;
}
.editable-kurs {
    cursor: pointer;
    border-bottom: 1px dashed #3b82f6;
}
.editable-kurs:hover {
    color: #fff;
    border-bottom-color: #fff;
}
.close-modal, .save-kurs {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    border: none;
    background: #3b82f6;
    color: white;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    transition: 0.3s;
}
.close-modal:hover, .save-kurs:hover {
    background: #2563eb;
    transform: translateY(-2px);
}
.kurs-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 18px;
    border-radius: 16px;
    color: #fff;
    font-size: 20px;
    text-align: center;
    margin-bottom: 20px;
    outline: none;
    transition: 0.3s;
}
.kurs-input:focus {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #070b14;
}
::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}
@media (max-width: 600px) {
    .grid {
        grid-template-columns: 1fr;
    }
    .items {
        gap: 25px;
    }
}