@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:wght@900&display=swap');

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

.app-container {
    width: 100vw;
    height: 100vh;
    max-width: 420px;
    max-height: 800px;
    margin: 0 auto;
    position: relative;
    background: var(--tg-theme-bg-color);
    overflow: hidden;
}

.screen {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease;
}

.hidden {
    display: none !important;
}

/* LoadingScreen */
#loadingScreen {
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(82, 82, 82, 0.4);
    opacity: 1;
    visibility: visible;
}

.load-card {
    position: absolute;
    width: clamp(300px, 85%, 371px);
    height: clamp(300px, 45%, 368px);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(51, 255, 0, 0.6);
    border-radius: 20px;
}

.load-text1 {
    position: absolute;
    width: clamp(150px, 80%, 175px);
    left: 50%;
    transform: translateX(-50%);
    top: 2%;
    text-align: center;
}

.load-text2 {
    position: absolute;
    width: clamp(200px, 85%, 241px);
    left: 50%;
    transform: translateX(-50%);
    top: 17%;
    text-align: center;
}

.load-text3 {
    position: absolute;
    width: clamp(200px, 85%, 241px);
    left: 50%;
    transform: translateX(-50%);
    top: 24%;
    text-align: center;
}

.load-text4 {
    position: absolute;
    width: clamp(180px, 80%, 241px);
    left: 50%;
    transform: translateX(-50%);
    top: 30%;
    text-align: center;
}

.load-text5 {
    position: absolute;
    width: clamp(180px, 80%, 241px);
    left: 50%;
    transform: translateX(-50%);
    top: 35%;
    text-align: center;
}

.load-text6 {
    position: absolute;
    width: clamp(180px, 80%, 241px);
    left: 50%;
    transform: translateX(-50%);
    top: 40%;
    text-align: center;
}

.load-text7 {
    position: absolute;
    width: clamp(180px, 80%, 241px);
    left: 50%;
    transform: translateX(-50%);
    top: 45%;
    text-align: center;
}

/* MainScreen */
#mainScreen {
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    background: rgba(82, 82, 82, 0.4);
}

#mainScreen.show {
    opacity: 1;
    visibility: visible;
}

.background-main {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0px;
    top: 0px;
    background: linear-gradient(180deg, #7DD07D 0%, #275536 100%);
    border-radius: 20px;
}

.up-card {
    position: absolute;
    width: calc(100% - 20px);
    height: clamp(100px, 15%, 115px);
    left: 10px;
    top: 10px;
    background: linear-gradient(180deg, rgba(126, 255, 131, 0.32) 0%, rgba(76, 153, 78, 0.26) 100%);
    border-radius: 20px;
}

.main-text-logo {
    position: absolute;
    width: clamp(150px, 35%, 146px);
    left: 50%;
    transform: translateX(-50%);
    top: 2%;
    text-align: center;
}

.main-line1 {
    position: absolute;
    width: clamp(60px, 18%, 72px);
    height: 0px;
    left: 18%;
    top: 60%;
    border: 1px solid #006613;
    transform: rotate(-90deg);
}

.main-line2 {
    position: absolute;
    width: clamp(60px, 18%, 72px);
    height: 0px;
    left: 62%;
    top: 60%;
    border: 1px solid #006613;
    transform: rotate(-90deg);
}

.main-text-balance {
    position: absolute;
    width: clamp(45px, 13%, 55px);
    left: 8%;
    top: 31%;
}

.main-text-balance-amount {
    position: absolute;
    width: clamp(55px, 15%, 65px);
    left: 6%;
    top: 51%;
}

.main-text-stats {
    position: absolute;
    width: clamp(75px, 22%, 91px);
    left: 37%;
    top: 31%;
}

.main-text-stats-username {
    position: absolute;
    width: clamp(80px, 25%, 100px);
    left: 36%;
    top: 51%;
}

.main-text-stats-id {
    position: absolute;
    width: clamp(65px, 20%, 80px);
    left: 36%;
    top: 72%;
}

.main-text-activ {
    position: absolute;
    width: clamp(50px, 15%, 63px);
    left: 75%;
    top: 32%;
}

.main-text-activ-amount {
    position: absolute;
    width: clamp(20px, 6%, 24px);
    left: 79%;
    top: 51%;
}

.main-text-activ-prise {
    position: absolute;
    width: clamp(35px, 11%, 45px);
    left: 79%;
    top: 72%;
}









/* Main Card */
.main-card {
    position: absolute;
    width: calc(100% - 20px);
    height: clamp(360px, 45%, 570px);
    left: 10px;
    top: clamp(130px, 18%, 142px);
    background: linear-gradient(180deg, rgba(126, 255, 131, 0.41) 0%, #4C994E 100%);
    border-radius: 20px;
}



















/* Navigation Card */
.navigation-card {
    position: absolute;
    width: calc(100% - 20px);
    height: clamp(50px, 8%, 58px);
    left: 10px;
    bottom: 10px;
    background: #4C994E;
    border-radius: 20px;
    border-top: 1px;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
}

.main-home-nav, .main-trading-nav, .main-profile-nav {
    width: clamp(35px, 12%, 42px);
    height: clamp(35px, 12%, 42px);
    background: #24BD24;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.main-home-nav:hover, .main-trading-nav:hover, .main-profile-nav:hover {
    background: #1DA51D;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.main-home-nav:active, .main-trading-nav:active, .main-profile-nav:active {
    transform: scale(0.95);
}










/* Error Card*/
#errorScreen {
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    background: rgba(82, 82, 82, 0.4);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#errorScreen.show {
    opacity: 1;
    visibility: visible;
}

.error-text-logo {
    position: absolute;
    width: clamp(130px, 35%, 146px);
    left: 50%;
    transform: translateX(-50%);
    top: clamp(150px, 20%, 188px);
    text-align: center;
}

.error-card-content {
    position: absolute;
    width: clamp(250px, 78%, 294px);
    height: clamp(300px, 45%, 359px);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(146.15deg, #2DE82D 0%, #115711 84.13%);
    border-radius: 15px;
    padding: 20px;
}

.error-text-logo1 {
    position: absolute;
    width: clamp(80px, 85%, 89px);
    left: 50%;
    transform: translateX(-50%);
    top: clamp(10px, 3%, 10px);
    text-align: center;
}

.error-text {
    position: absolute;
    width: calc(100% - 16px);
    left: 8px;
    top: clamp(40px, 12%, 42px);
    text-align: center;
    padding: 0 10px;
}

.error-btn-exit {
    position: absolute;
    width: clamp(80px, 33%, 98px);
    height: clamp(45px, 15%, 55px);
    left: clamp(10px, 2%, 4px);
    bottom: clamp(20px, 6%, 20px);
    background: #00BF00;
    border-radius: 9px;
    border: none;
    cursor: pointer;
}

.error-btn-reload {
    position: absolute;
    width: clamp(80px, 33%, 98px);
    height: clamp(45px, 15%, 55px);
    right: clamp(10px, 2%, 4px);
    bottom: clamp(20px, 6%, 20px);
    background: #00BF00;
    border-radius: 9px;
    border: none;
    cursor: pointer;
}







/* ICONS - вернул как было, но с адаптивными размерами */
.icon-download {
    background-image: url('icon-download.svg');
    position: absolute;
    width: 115px;
    height: 102px;
    left: 50%;
    transform: translateX(-50%);
    top: 55%;
}

.icon-balance-dollar {
    background-image: url('icon-dollar.svg');
    position: absolute;
    width: 20px;
    height: 20px;
    left: 1%;
    top: 56%;
}

.icon-stats-username {
    background-image: url('icon-username.svg');
    position: absolute;
    width: 20px;
    height: 20px;
    left: 30%;
    top: 56%;
}

.icon-stats-id {
    background-image: url('icon-id.svg');
    position: absolute;
    width: 20px;
    height: 20px;
    left: 30%;
    top: 78%;
}

.icon-activ {
    background-image: url('icon-activ.svg');
    position: absolute;
    width: 20px;
    height: 20px;
    left: 73%;
    top: 56%;
}

.icon-activ-dollar {
    background-image: url('icon-dollar.svg');
    position: absolute;
    width: 20px;
    height: 20px;
    left: 73%;
    top: 78%;
}

.icon-error {
    background-image: url('icon-error.svg');
    position: absolute;
    width: 38px;
    height: 38px;
    left: 8px;
    top: 4px;
}

.icon-error-exit {
    background-image: url('icon-exit.svg');
    position: absolute;
    width: 48px;
    height: 48px;
    left: 20px;
    top: 2px;
}

.icon-error-reload {
    background-image: url('icon-reload.svg');
    position: absolute;
    width: 48px;
    height: 48px;
    left: 25px;
    top: 4px;
}

.icon-home-nav {
    background-image: url('icon-main-page.svg');
    position: absolute;
    width: 40px;
    height: 40px;
    left: 1px;
    top: 1px;
}

.icon-trading-nav {
    background-image: url('icon-main-trading.svg');
    position: absolute;
    width: 40px;
    height: 40px;
    left: 1px;
    top: 1px;
}

.icon-profile-nav {
    background-image: url('icon-main-profile.svg');
    position: absolute;
    width: 40px;
    height: 40px;
    left: 1px;
    top: 1px;
}













/* Text Styles */
.style-text-loading {
    font-family: 'Noto Serif';
    font-style: normal;
    font-weight: 900;
    font-size: clamp(13px, 4vw, 15px);
    line-height: 32px;
    color: #797979;
    mix-blend-mode: normal;
}

.style-text-loading-logo {
    font-family: 'Noto Serif';
    font-style: normal;
    font-weight: 900;
    font-size: clamp(20px, 6vw, 24px);
    line-height: 32px;
    color: #797979;
    mix-blend-mode: normal;
}

.style-text-main-logo {
    font-family: 'Noto Serif';
    font-style: normal;
    font-weight: 900;
    font-size: clamp(16px, 5vw, 20px);
    line-height: 32px;
    background: linear-gradient(90deg, rgba(0, 78, 24, 0.62) 0%, rgba(0, 169, 6, 0.62) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.style-text-main-upcard {
    font-family: 'Noto Serif';
    font-style: normal;
    font-weight: 900;
    font-size: clamp(12px, 3.5vw, 14px);
    line-height: 32px;
    color: #007600;
}

.style-main-line {
    color: #006613;
    border: 1px solid #006613;
}

.style-text-error {
    font-family: 'Noto Serif';
    font-style: normal;
    font-weight: 900;
    font-size: clamp(12px, 3.5vw, 14px);
    line-height: 32px;
    color: #C4FFC4;
}