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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

#ton-connect-button {
    display: none !important;
}

tc-root {
    --tc-bg-color: #0f0f23;
    --tc-primary-color: #6366f1;
    --tc-text-color: #ffffff;
    --tc-border-color: rgba(255, 255, 255, 0.1);
}

.tc-modal {
    z-index: 10000 !important;
}

.tc-modal-backdrop {
    z-index: 9999 !important;
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(8px) !important;
}

.tc-modal-content {
    background: #1a1a2e !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
}

body.modal-open {
    overflow: hidden;
}

.header,
.main-content,
.bottom-nav {
    position: relative;
    z-index: 50;
}

tc-root {
    z-index: 10001 !important;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.logo {
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wallet-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.wallet-status:hover {
    background: rgba(255, 255, 255, 0.15);
}

.wallet-status.connected {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
}

.wallet-status.disconnected {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
}

.wallet-icon {
    font-size: 16px;
}

.wallet-text {
    font-weight: 500;
}

.main-content {
    margin-top: 60px;
    margin-bottom: 70px;
    min-height: calc(100vh - 130px);
    padding: 20px;
}

.page-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 50vh;
    gap: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 20px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    min-width: 60px;
}

.nav-item:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    color: #ffffff;
    background: rgba(99, 102, 241, 0.3);
    border: 1px solid rgba(99, 102, 241, 0.5);
}

.nav-icon {
    font-size: 24px;
}

.nav-text {
    font-size: 12px;
    font-weight: 500;
}

.page {
    animation: fadeIn 0.3s ease-in-out;
}

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

.page-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-content {
    max-width: 400px;
    margin: 0 auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 48px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    border: 2px solid #6366f1;
    color: #6366f1;
}

.btn-outline:hover {
    background: #6366f1;
    color: white;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.empty-state p {
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .header {
        padding: 0 15px;
    }

    .logo {
        font-size: 16px;
    }

    .wallet-status {
        padding: 6px 10px;
        font-size: 13px;
    }

    .main-content {
        padding: 15px;
    }

    .bottom-nav {
        padding: 0 10px;
    }

    .nav-item {
        padding: 6px 12px;
        min-width: 50px;
    }

    .nav-icon {
        font-size: 20px;
    }

    .nav-text {
        font-size: 11px;
    }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 350px;
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-info {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);
}

.notification-success {
    background: linear-gradient(135deg, rgba(72, 219, 251, 0.9) 0%, rgba(10, 189, 227, 0.9) 100%);
}

.notification-warning {
    background: linear-gradient(135deg, rgba(254, 202, 87, 0.9) 0%, rgba(255, 159, 243, 0.9) 100%);
    color: #333;
}

.notification-error {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.9) 0%, rgba(238, 90, 36, 0.9) 100%);
}

@media (max-width: 480px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }

    .notification.show {
        transform: translateY(0);
    }
}