* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    touch-action: manipulation;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    padding: 0;
    padding-top: max(90px, calc(70px + env(safe-area-inset-top) + 20px));
    padding-bottom: max(0px, env(safe-area-inset-bottom));
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

/* ✅ اتجاه الصفحة ديناميكي حسب اللغة */
html[dir="rtl"] body,
html[dir="rtl"] .top-navbar,
html[dir="rtl"] .sidebar,
html[dir="rtl"] .full-page-container,
html[dir="rtl"] .modal-content,
html[dir="rtl"] .security-input {
    direction: rtl;
}

html[dir="ltr"] body,
html[dir="ltr"] .top-navbar,
html[dir="ltr"] .sidebar,
html[dir="ltr"] .full-page-container,
html[dir="ltr"] .modal-content,
html[dir="ltr"] .security-input {
    direction: ltr;
}

/* واجهة تسجيل الدخول */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    direction: ltr;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

.login-overlay.hidden {
    display: none;
}

/* إخفاء المحتوى الرئيسي عند عدم تسجيل الدخول */
.main-content-wrapper {
    display: none !important;
}

.login-container,
.register-container,
.forgot-password-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease;
    margin: auto;
    min-height: fit-content;
}

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(45deg, #0F5C56, #0a4a44);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.login-header h2 {
    color: #0F5C56;
    margin-bottom: 10px;
    font-size: 1.8rem;
    border: none;
    padding: 0;
}

.login-header p {
    color: #666;
    font-size: 0.95rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-form label {
    color: #0F5C56;
    font-weight: bold;
    font-size: 0.9rem;
}

.login-form input {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #EAF3F2;
    pointer-events: auto !important;
    user-select: auto !important;
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
}

.login-form input:focus {
    outline: none;
    border-color: #0F5C56;
    box-shadow: 0 0 0 3px rgba(15, 92, 86, 0.1);
    background: white;
}

.login-form input[readonly],
.login-form input[disabled] {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
}

/* التأكد من أن حقل استعادة كلمة المرور قابل للكتابة */
#forgotEmailOrPhone {
    pointer-events: auto !important;
    user-select: auto !important;
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    cursor: text !important;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-left: 50px;
    width: 100%;
}

.password-toggle-btn {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.3s ease;
    z-index: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.password-toggle-btn:hover {
    color: #0F5C56;
}

.password-toggle-btn:active {
    transform: scale(0.95);
}

.password-toggle-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.password-toggle-btn.active .password-toggle-icon {
    transform: scale(1.1);
}

.password-toggle-btn.active {
    color: #0F5C56;
}

.login-form input::placeholder {
    color: #999;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0F5C56;
}

.forgot-password {
    color: #0F5C56;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: #0a4a44;
    text-decoration: underline;
}

.login-btn {
    padding: 15px;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(15, 92, 86, 0.4);
}

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

.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #999;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.login-divider span {
    padding: 0 15px;
    font-size: 0.9rem;
}

.register-btn {
    padding: 15px;
    background: transparent;
    color: #0F5C56;
    border: 2px solid #0F5C56;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.register-btn:hover {
    background: #0F5C56;
    color: white;
    transform: translateY(-2px);
}

/* تحسينات للأجهزة اللمسية */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .sidebar-item:hover,
    .upgrade-btn:hover {
        transform: none;
    }
    
    .btn:active,
    .sidebar-item:active,
    .upgrade-btn:active {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

/* تحسينات للأجهزة التي تدعم اللمس */
@media (pointer: coarse) {
    input,
    textarea,
    select,
    button {
        font-size: 16px !important; /* منع التكبير التلقائي على iOS */
    }
    
    .touch-device .btn,
    .touch-device .sidebar-item {
        -webkit-tap-highlight-color: rgba(15, 92, 86, 0.2);
    }
}

/* تحسينات خاصة للأندرويد */
@supports (-webkit-appearance: none) {
    .top-navbar {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}

/* تحسينات للشاشات الكبيرة (وندوز) */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
    }
}

/* شريط علوي */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(70px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    background: rgba(234, 243, 242, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row-reverse;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    padding-bottom: 0;
    z-index: 1000;
}

.menu-toggle {
    width: 45px;
    height: 45px;
    min-width: 44px;
    min-height: 44px;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 8px;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #EAF3F2;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, #0F5C56, #0a4a44);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-balance {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    border-radius: 25px;
    color: white;
    font-weight: bold;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.nav-balance:hover:not(.balance-hidden) {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 5px 15px rgba(15, 92, 86, 0.3);
}

.nav-balance.balance-hidden {
    cursor: default;
}

.nav-balance-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav-balance-value {
    font-size: 1.2rem;
}

.nav-balance-unit {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* زر إخفاء/إظهار الرصيد */
.balance-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 5px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}

.balance-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.balance-toggle-btn:active {
    transform: scale(0.95);
}

.balance-toggle-icon {
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    width: 20px;
    height: 20px;
}

.balance-toggle-icon svg {
    width: 100%;
    height: 100%;
    color: currentColor;
    transition: transform 0.3s ease;
}

.balance-toggle-btn:hover .balance-toggle-icon svg {
    transform: scale(1.1);
}

.eye-icon-open {
    display: block;
}

.eye-icon-closed {
    display: none;
}

/* إخفاء الرصيد */
.nav-balance.balance-hidden .nav-balance-label,
.nav-balance.balance-hidden .nav-balance-value,
.nav-balance.balance-hidden .nav-balance-unit {
    opacity: 0;
    width: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.nav-balance.balance-hidden .nav-balance-value {
    font-size: 0;
}

/* القائمة الجانبية */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999; /* Higher than full-page-container but lower than sidebar */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -350px;
    width: 350px;
    height: 100vh;
    height: -webkit-fill-available;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(234, 243, 242, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 2000; /* Higher than full-page-container */
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 25px;
    border-bottom: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    color: white;
    min-height: 100px;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.sidebar-user-name {
    font-size: 1.6rem;
    font-weight: bold;
    color: white;
    margin: 0;
}

.sidebar-user-verified {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.verified-badge {
    width: 24px;
    height: 24px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5rem;
    border: none;
    padding: 0;
    color: white;
    display: none;
}

.sidebar-close {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border-right: 4px solid transparent;
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    cursor: pointer;
}

.sidebar-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
    margin: 10px 20px;
}

.language-badge {
    margin-right: auto;
    padding: 4px 12px;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    color: white;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.sidebar-item:hover {
    background: #EAF3F2;
    border-right-color: #0F5C56;
    transform: translateX(-5px);
}

.sidebar-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1), transparent);
    border-right-color: #0F5C56;
    color: #0F5C56;
    font-weight: bold;
}

.sidebar-icon {
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-icon svg {
    width: 20px;
    height: 20px;
    color: currentColor;
    transition: transform 0.3s ease;
}

.sidebar-item:hover .sidebar-icon svg {
    transform: scale(1.1);
}

.sidebar-footer {
    padding: 20px;
    border-top: 2px solid #e0e0e0;
    background: #EAF3F2;
}

.sidebar-info {
    text-align: center;
}

.sidebar-info p {
    margin: 5px 0;
    color: #666;
    font-size: 0.9rem;
}

.sidebar-info-value {
    font-size: 1.2rem !important;
    font-weight: bold !important;
    color: #0F5C56 !important;
}

.sidebar-social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(15, 92, 86, 0.2);
}

.sidebar-social-icons .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0F5C56;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(15, 92, 86, 0.3);
}

.sidebar-social-icons .social-icon:hover {
    background: #0a4a44;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(15, 92, 86, 0.5);
}

.sidebar-social-icons .social-icon svg {
    width: 20px;
    height: 20px;
}

/* Scrollbar للقائمة الجانبية */
.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: #EAF3F2;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: #0F5C56;
    border-radius: 10px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: #0a4a44;
}

/* محتوى المشاركة */
.share-content {
    text-align: center;
}

.share-link-box {
    margin-bottom: 20px;
}

.share-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    border-radius: 10px;
    color: white;
}

.share-input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    background: rgba(234, 243, 242, 0.9);
    color: #333;
}

.copy-share-btn {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-family: inherit;
}

.copy-share-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Full-page screens */
.full-page-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    z-index: 900; /* Lower than sidebar (1000) and sidebar-overlay (999) */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.full-page-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    direction: ltr; /* Force LTR for header to position menu button on left */
}

/* Menu toggle in full-page header - same style as main menu toggle */
.full-page-header .menu-toggle {
    width: 45px;
    height: 45px;
    min-width: 44px;
    min-height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 8px;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    order: 1;
    position: relative;
    z-index: 11;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.full-page-header .menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 1);
}

.full-page-header .menu-toggle:active {
    transform: scale(0.95);
}

.full-page-header .menu-toggle span {
    width: 25px;
    height: 3px;
    background: #0F5C56;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

.full-page-header .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.full-page-header .menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.full-page-header .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Hide back button (no longer used) */
.back-btn {
    display: none !important;
}

.full-page-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    flex: 1;
    order: 2; /* Title in the middle */
    width: 100%;
    pointer-events: none; /* Allow clicks to pass through to elements behind */
}

.full-page-content {
    padding: 20px;
    padding-top: 30px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 70px);
}

/* Full-page content cards - same as mining-card style */
.full-page-content .profile-content {
    background: rgba(234, 243, 242, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    max-width: 900px;
    margin: 0 auto;
}

/* Hide main container when full-page is shown */
.main-content-wrapper.hidden-by-full-page {
    display: none;
}

/* النوافذ المنبثقة */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: #EAF3F2;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    border: none;
    padding: 0;
    color: white;
}

.modal-close {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

/* محتوى الملف الشخصي */
.profile-content {
    text-align: center;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(15, 92, 86, 0.3);
    transition: transform 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.profile-info {
    text-align: right;
}

.profile-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    margin-bottom: 10px;
    background: #EAF3F2;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.profile-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(15, 92, 86, 0.2);
}

.profile-label {
    color: #666;
    font-weight: bold;
}

.profile-value {
    color: #0F5C56;
    font-weight: bold;
}

/* Full-page profile styles */
.full-page-content .profile-item {
    transition: all 0.3s ease;
}

.full-page-content .profile-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 20px rgba(15, 92, 86, 0.15);
}

.full-page-content .copy-btn {
    transition: all 0.3s ease;
}

.full-page-content .copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 92, 86, 0.4);
}

.full-page-content .copy-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(15, 92, 86, 0.3);
}

/* محتوى تفاصيل الرصيد */
.balance-details-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 4px;
}

.balance-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 0;
    border: 1px solid #e8e8e8;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.balance-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.balance-section:hover::before {
    opacity: 0.6;
}

.balance-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.balance-section-icon-wrapper {
    position: relative;
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.balance-section-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.balance-section-icon svg {
    width: 40px;
    height: 40px;
    stroke-width: 2.5;
    transition: all 0.3s ease;
}

.balance-section:hover .balance-section-icon {
    transform: scale(1.1);
}

.balance-section:hover .balance-section-icon svg {
    transform: rotate(5deg);
}

.balance-icon-pulse,
.balance-icon-glow,
.balance-icon-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.balance-icon-pulse {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid;
    animation: pulse 2s ease-in-out infinite;
}

.balance-icon-glow {
    width: 120px;
    height: 120px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    filter: blur(15px);
    animation: glow 2s ease-in-out infinite;
}

.balance-icon-ring {
    width: 90px;
    height: 90px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid;
    border-style: dashed;
    animation: rotate 10s linear infinite;
    opacity: 0.4;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.2;
    }
}

@keyframes glow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.5;
    }
}

@keyframes rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.balance-section-content {
    padding: 24px;
}

.balance-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.balance-section h3 {
    margin: 0;
    color: #1a1a1a;
    font-size: 1.15rem;
    font-weight: 700;
    flex: 1;
    line-height: 1.4;
}

.balance-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.balance-section-value {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 100%);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, currentColor 0%, currentColor 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-variant-numeric: tabular-nums;
}

.balance-currency {
    font-size: 1.1rem;
    font-weight: 700;
    opacity: 0.8;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.balance-section-description {
    color: #5a5a5a;
    font-size: 0.925rem;
    line-height: 1.7;
    margin: 0;
}

/* قسم الرصيد غير المحقق */
.unverified-balance-section {
    background: linear-gradient(180deg, #FFF9E6 0%, #ffffff 40%);
    border-left: 4px solid #FFC107;
}

.unverified-balance-section::before {
    background: linear-gradient(90deg, transparent, #FFC107, transparent);
}

.unverified-balance-section .balance-section-icon-wrapper {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 235, 59, 0.05) 100%);
}

.unverified-balance-section .balance-section-icon {
    background: linear-gradient(135deg, #FFC107 0%, #FFD54F 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.unverified-balance-section .balance-icon-pulse {
    border-color: #FFC107;
    background: rgba(255, 193, 7, 0.1);
}

.unverified-balance-section .balance-icon-glow {
    background: #FFC107;
}

.unverified-balance-section h3 {
    color: #B8860B;
}

.unverified-balance-section .balance-amount {
    color: #F57C00;
}

.unverified-balance-section .balance-currency {
    color: #F57C00;
}

.unverified-balance-section .balance-section-value {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 235, 59, 0.05) 100%);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.pending-badge {
    background: linear-gradient(135deg, #FFC107 0%, #FFD54F 100%);
    color: #856404;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

/* قسم الرصيد القابل للتحويل */
.transferable-balance-section {
    background: linear-gradient(180deg, #E8F5E9 0%, #ffffff 40%);
    border-left: 4px solid #28A745;
}

.transferable-balance-section::before {
    background: linear-gradient(90deg, transparent, #28A745, transparent);
}

.transferable-balance-section .balance-section-icon-wrapper {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15) 0%, rgba(76, 175, 80, 0.05) 100%);
}

.transferable-balance-section .balance-section-icon {
    background: linear-gradient(135deg, #28A745 0%, #4CAF50 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.transferable-balance-section .balance-icon-glow {
    background: #28A745;
}

.transferable-balance-section h3 {
    color: #1B5E20;
}

.transferable-balance-section .balance-amount {
    color: #2E7D32;
}

.transferable-balance-section .balance-currency {
    color: #2E7D32;
}

.transferable-balance-section .balance-section-value {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.verified-badge {
    background: linear-gradient(135deg, #28A745 0%, #4CAF50 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* قسم الهجرة إلى Mainnet */
.mainnet-section {
    background: linear-gradient(180deg, #E0F7FA 0%, #ffffff 40%);
    border-left: 4px solid #17A2B8;
}

.mainnet-section::before {
    background: linear-gradient(90deg, transparent, #17A2B8, transparent);
}

.mainnet-section .balance-section-icon-wrapper {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.15) 0%, rgba(0, 188, 212, 0.05) 100%);
}

.mainnet-section .balance-section-icon {
    background: linear-gradient(135deg, #17A2B8 0%, #00BCD4 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.mainnet-section .balance-icon-ring {
    border-color: #17A2B8;
}

.mainnet-section h3 {
    color: #006064;
}

.upgrade-badge {
    background: linear-gradient(135deg, #17A2B8 0%, #00BCD4 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

.mainnet-migrate-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #17A2B8 0%, #00BCD4 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.25);
}

.mainnet-migrate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.mainnet-migrate-btn:hover::before {
    left: 100%;
}

.mainnet-migrate-btn:hover {
    background: linear-gradient(135deg, #00BCD4 0%, #17A2B8 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(23, 162, 184, 0.4);
}

.mainnet-migrate-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.mainnet-migrate-btn .migrate-btn-icon {
    width: 20px;
    height: 20px;
    stroke-width: 3;
    transition: transform 0.3s ease;
}

.mainnet-migrate-btn:hover .migrate-btn-icon {
    transform: translateX(3px);
}

.migrate-btn-text {
    font-family: inherit;
    position: relative;
    z-index: 1;
}

/* محتوى اللغة */
.language-content {
    text-align: center;
}

.language-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #EAF3F2;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-family: inherit;
}

.lang-option:hover {
    background: #e9ecef;
    transform: translateX(-5px);
}

.lang-option.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-color: #0F5C56;
}

.lang-flag {
    font-size: 1.5rem;
}

.lang-name {
    flex: 1;
    text-align: right;
}

.lang-check {
    color: #0F5C56;
    font-weight: bold;
    font-size: 1.2rem;
}

/* محتوى الورقة البيضاء */
.whitepaper-content {
    line-height: 1.8;
}

.whitepaper-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #EAF3F2;
    border-radius: 10px;
}

.whitepaper-section table {
    font-size: 0.9rem;
}

.whitepaper-section table th,
.whitepaper-section table td {
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .whitepaper-section table {
        font-size: 0.8rem;
    }
    
    .whitepaper-section table th,
    .whitepaper-section table td {
        padding: 10px 8px !important;
        font-size: 0.75rem;
    }
}

.whitepaper-section h4 {
    color: #0a4a44;
    margin-bottom: 10px;
}

.whitepaper-section ul {
    margin-right: 20px;
    color: #666;
}

.whitepaper-section li {
    margin-bottom: 8px;
}

/* خارطة الطريق */
.roadmap-content {
    line-height: 1.8;
}

.roadmap-timeline {
    position: relative;
    padding-right: 30px;
}

.roadmap-phase {
    position: relative;
    padding-bottom: 20px;
}

.roadmap-phase::before {
    content: '';
    position: absolute;
    right: 25px;
    top: 70px;
    bottom: -20px;
    width: 2px;
    background: linear-gradient(to bottom, #0F5C56, rgba(15, 92, 86, 0.3));
}

.roadmap-phase:last-child::before {
    display: none;
}

.roadmap-phase-number {
    box-shadow: 0 4px 12px rgba(15, 92, 86, 0.3);
    transition: transform 0.3s ease;
}

.roadmap-phase:hover .roadmap-phase-number {
    transform: scale(1.1);
}

.roadmap-phase-content {
    transition: all 0.3s ease;
}

.roadmap-phase:hover .roadmap-phase-content {
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(15, 92, 86, 0.2);
}

@media (max-width: 768px) {
    .roadmap-timeline {
        padding-right: 20px;
    }
    
    .roadmap-phase {
        padding-right: 20px;
    }
    
    .roadmap-phase::before {
        right: 15px;
    }
    
    .roadmap-phase-number {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }
    
    .roadmap-phase-header h4 {
        font-size: 1rem !important;
    }
}

/* محتوى الإحالة */
.referral-content {
    text-align: center;
}

.referral-code-box {
    margin-bottom: 20px;
}

/* ==================== News Section Styles ==================== */
.news-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.news-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.news-list {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.news-item {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.news-item-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.news-item-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Responsive styles for news section */
@media (max-width: 768px) {
    .news-section {
        padding: 20px 16px !important;
        margin-top: 20px !important;
        border-radius: 15px !important;
    }
    
    .news-title {
        font-size: 1.3rem !important;
        margin-bottom: 20px !important;
        flex-wrap: wrap;
    }
    
    .news-title svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    .news-item {
        padding: 20px 16px !important;
        margin-bottom: 16px !important;
        border-radius: 12px !important;
    }
    
    .news-item-title {
        font-size: 1.1rem !important;
        min-width: unset !important;
    }
    
    .news-item-date {
        font-size: 0.8rem !important;
        width: 100%;
        margin-top: 8px;
        padding-top: 0 !important;
    }
    
    .news-item-content {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
        margin-top: 12px !important;
    }
    
    /* Make header stack vertically on small screens */
    .news-item > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
}

@media (max-width: 480px) {
    .news-section {
        padding: 16px 12px !important;
    }
    
    .news-title {
        font-size: 1.2rem !important;
        gap: 8px !important;
    }
    
    .news-item {
        padding: 16px 12px !important;
    }
    
    .news-item-title {
        font-size: 1rem !important;
    }
    
    .news-item-content {
        font-size: 0.9rem !important;
    }
}

@media (min-width: 769px) {
    .news-section {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}

.referral-code {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    border-radius: 10px;
    color: white;
    font-weight: bold;
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    flex-wrap: wrap;
    box-sizing: border-box;
    width: 100%;
}

.referral-code span {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-family: monospace;
    letter-spacing: 2px;
    word-break: break-all;
    overflow-wrap: break-word;
    overflow: visible;
    white-space: normal;
}

.copy-btn {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-family: inherit;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.referral-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .referral-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.referral-stat-item {
    padding: 15px;
    background: #EAF3F2;
    border-radius: 10px;
}

.referral-stat-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.referral-stat-value {
    display: block;
    color: #0F5C56;
    font-size: 1.3rem;
    font-weight: bold;
}

.referral-info {
    text-align: right;
    background: #EAF3F2;
    padding: 15px;
    border-radius: 10px;
}

.referral-info ul {
    margin-right: 20px;
    color: #666;
    line-height: 2;
}

/* محتوى الأسئلة الشائعة */
.faq-content {
    text-align: right;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: #EAF3F2;
    border-radius: 10px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    font-weight: bold;
    color: #0F5C56;
}

.faq-number {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.faq-answer {
    padding: 15px;
    color: #666;
    line-height: 1.8;
}

/* محتوى الدعم */
.support-content {
    text-align: right;
}

.support-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.support-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #EAF3F2;
    border-radius: 10px;
}

.support-icon {
    font-size: 2rem;
    width: 50px;
    text-align: center;
}

.support-option h4 {
    margin: 0 0 5px 0;
    color: #0F5C56;
}

.support-option p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.support-form {
    background: #EAF3F2;
    padding: 20px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #0F5C56;
    font-weight: bold;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #0F5C56;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* محتوى حول */
.about-content {
    text-align: center;
}

.about-section {
    text-align: right;
    margin-bottom: 20px;
    padding: 15px;
    background: #EAF3F2;
    border-radius: 10px;
}

.about-section h4 {
    color: #0a4a44;
    margin-bottom: 10px;
}

.about-section ul {
    margin-right: 20px;
    color: #666;
    line-height: 2;
}

/* Scrollbar للنوافذ المنبثقة */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #EAF3F2;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #0F5C56;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #0a4a44;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.logo {
    font-size: 4rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    visibility: visible;
    opacity: 1;
}

.card {
    background: rgba(234, 243, 242, 0.95);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.info-card, .mining-card, .activity-card {
    background: rgba(234, 243, 242, 0.95);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.mining-card {
    grid-column: span 2;
}

.activity-card {
    grid-column: span 3;
}

h2 {
    color: #0F5C56;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid #0F5C56;
    padding-bottom: 10px;
}

h3 {
    color: #0a4a44;
    margin: 20px 0 15px 0;
    font-size: 1.2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: linear-gradient(135deg, #EAF3F2 0%, #c3cfe2 100%);
    border-radius: 10px;
}

.label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #0F5C56;
}

.balance-display {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    border-radius: 15px;
    color: white;
    margin-bottom: 25px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.balance-label {
    display: none;
}

.balance-value {
    display: none;
}

.balance-unit {
    display: none;
}

/* زر التعدين الدائري الكبير */
.mining-circle-btn {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mining-circle-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mining-circle-btn:hover::before {
    opacity: 1;
}

.mining-circle-btn:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.mining-circle-btn:active {
    transform: scale(0.95);
}

.mining-circle-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.mining-circle-btn:disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.15);
}

.mining-btn-icon {
    font-size: 4rem;
    line-height: 1;
    display: block;
    animation: float 2s ease-in-out infinite;
}

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

.mining-circle-btn:disabled .mining-btn-icon {
    animation: none;
}

.mining-btn-text {
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mining-circle-btn.mining-active {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 30px 10px rgba(255, 215, 0, 0.4);
    }
}

/* عرض سرعة التعدين داخل لوحة التعدين */
.mining-rate-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
}

.mining-rate-label {
    font-size: 0.9rem;
    opacity: 0.9;
    color: white;
}

.mining-rate-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mining-rate-unit {
    font-size: 0.85rem;
    opacity: 0.85;
    color: white;
}

/* Banner الصورة */
.welcome-banner {
    margin: 25px 0;
    padding: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
}

.banner-image-container {
    width: 100%;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.banner-image:hover {
    transform: scale(1.02);
}

.banner-image-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Responsive للبanner */
@media (max-width: 768px) {
    .banner-image {
        max-height: 300px;
    }
    
    .banner-image-placeholder {
        height: 250px;
    }
}

/* قسم الأدوات */
.tools-section {
    margin: 25px 0;
}

.tools-title {
    text-align: center;
    color: #0F5C56;
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0 0 15px 0;
    padding: 0;
}

/* أيقونات الإجراءات */
.mining-action-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 15px;
    background: rgba(234, 243, 242, 0.5);
    border-radius: 15px;
    flex-wrap: wrap;
}

.action-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 70px;
    height: 70px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.action-icon-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(15, 92, 86, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, #0a4a44 0%, #0F5C56 100%);
}

.action-icon-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.action-icon {
    font-size: 1.8rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) brightness(1.1);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-icon-svg,
.security-icon-svg,
.referral-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: white;
}

.share-icon-svg svg,
.security-icon-svg svg,
.referral-icon-svg svg {
    width: 28px;
    height: 28px;
    color: white;
    stroke: currentColor;
}

.share-icon-svg svg,
.wallet-icon-svg svg,
.security-icon-svg svg,
.referral-icon-svg svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) brightness(1.1);
    transition: transform 0.3s ease;
}

.wallet-icon-svg,
.security-icon-svg,
.referral-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: white;
}

.action-icon-btn:hover .action-icon {
    transform: scale(1.1);
}

.action-icon-label {
    display: none;
}

.mining-stats {
    display: none;
}

.stat-item {
    padding: 15px;
    background: #EAF3F2;
    border-radius: 10px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #0F5C56;
}

.stat-unit {
    font-size: 0.8rem;
    color: #999;
}

/* دائرة الأمان */
.security-circle-container {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 25px;
    background: #EAF3F2;
    border-radius: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.security-circle {
    position: relative;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

.security-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.security-bg {
    stroke: #EAF3F2;
}

.security-progress {
    stroke: #0F5C56;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s ease;
    animation: securityPulse 2s ease-in-out infinite;
}

@keyframes securityPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.security-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.security-icon {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.security-percentage {
    font-size: 1.8rem;
    font-weight: bold;
    color: #0F5C56;
    margin-bottom: 5px;
}

.security-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: bold;
}

.security-info {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.security-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #333;
}

.security-check {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* إدارة دائرة الأمان */
.security-circle-manage {
    margin-top: 25px;
    padding: 20px;
    background: #EAF3F2;
    border-radius: 15px;
}

.security-members-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    min-height: 50px;
}

.security-member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.security-member-item:hover {
    box-shadow: 0 4px 12px rgba(15, 92, 86, 0.2);
    transform: translateY(-2px);
}

.security-member-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.security-member-name {
    font-weight: bold;
    color: #0F5C56;
    font-size: 1rem;
}

.security-member-phone {
    font-size: 0.85rem;
    color: #666;
}

.security-member-remove {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.security-member-remove:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.security-member-remove:active {
    transform: scale(0.95);
}

.security-add-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.security-add-input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.security-input {
    flex: 1;
    min-width: 150px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
}

.security-input:focus {
    outline: none;
    border-color: #0F5C56;
    box-shadow: 0 0 0 3px rgba(15, 92, 86, 0.1);
}

.security-input::placeholder {
    color: #999;
}

.security-add-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.security-add-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(15, 92, 86, 0.4);
}

.security-add-btn:active:not(:disabled) {
    transform: translateY(0);
}

.security-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.security-count {
    text-align: center;
    padding: 10px;
    background: rgba(15, 92, 86, 0.1);
    border-radius: 8px;
    font-weight: bold;
    color: #0F5C56;
    font-size: 0.95rem;
}

.security-empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #999;
    font-size: 0.9rem;
}

.mining-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    min-width: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #333;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(250, 112, 154, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.2rem;
}

.upgrade-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.upgrades {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upgrade-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #EAF3F2;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.upgrade-item:hover {
    background: #e9ecef;
    transform: translateX(-5px);
}

.upgrade-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.upgrade-name {
    font-weight: bold;
    color: #0F5C56;
    font-size: 1.1rem;
}

.upgrade-desc {
    font-size: 0.9rem;
    color: #666;
}

.upgrade-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-family: inherit;
}

.upgrade-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.upgrade-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.activity-log {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: #EAF3F2;
    border-radius: 10px;
}

.activity-item {
    padding: 10px;
    margin-bottom: 10px;
    background: #EAF3F2;
    border-radius: 8px;
    border-right: 4px solid #0F5C56;
    font-size: 0.9rem;
    color: #333;
    animation: slideIn 0.3s ease;
}

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

/* Scrollbar styling */
.activity-log::-webkit-scrollbar {
    width: 8px;
}

.activity-log::-webkit-scrollbar-track {
    background: #EAF3F2;
    border-radius: 10px;
}

.activity-log::-webkit-scrollbar-thumb {
    background: #0F5C56;
    border-radius: 10px;
}

.activity-log::-webkit-scrollbar-thumb:hover {
    background: #0a4a44;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .top-navbar {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
    
    .top-navbar {
        height: calc(60px + env(safe-area-inset-top));
        padding-top: env(safe-area-inset-top);
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
        padding-bottom: 0;
    }
    
    .nav-logo {
        font-size: 1.4rem;
    }
    
    .nav-balance {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .nav-balance-value {
        font-size: 1rem;
    }
    
    .sidebar {
        width: 280px;
        left: -280px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    
    .mining-card, .activity-card {
        grid-column: span 1;
        width: 100%;
        max-width: 100%;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
    
    .info-grid, .mining-stats {
        grid-template-columns: 1fr;
    }
    
    .mining-action-icons {
        flex-wrap: wrap;
        gap: 15px;
        padding: 15px;
    }
    
    .action-icon-btn {
        width: 65px;
        height: 65px;
        padding: 0;
    }
    
    .action-icon {
        font-size: 1.6rem;
    }
    
    .share-icon-svg svg,
    .wallet-icon-svg svg,
    .security-icon-svg svg,
    .referral-icon-svg svg {
        width: 20px;
        height: 20px;
    }
    
    .action-icon-label {
        font-size: 0.8rem;
    }
    
    .balance-display {
        padding: 20px;
        min-height: 250px;
    }
    
    .balance-value {
        font-size: 2.5rem;
    }
    
    .mining-circle-btn {
        width: 150px;
        height: 150px;
    }
    
    .mining-btn-icon {
        font-size: 3rem;
    }
    
    .mining-btn-text {
        font-size: 1rem;
    }
    
    .mining-rate-display {
        margin-top: 20px;
        padding-top: 15px;
    }
    
    .mining-rate-label {
        font-size: 0.85rem;
    }
    
    .mining-rate-value {
        font-size: 1.5rem;
    }
    
    .mining-rate-unit {
        font-size: 0.8rem;
    }
    
    .security-circle-container {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .security-circle {
        width: 120px;
        height: 120px;
    }
    
    .security-icon {
        font-size: 2rem;
    }
    
    .security-percentage {
        font-size: 1.5rem;
    }
    
    .security-info {
        width: 100%;
        min-width: auto;
    }
    
    .security-add-input-group {
        flex-direction: column;
    }
    
    .security-input {
        width: 100%;
        min-width: auto;
    }
    
    .security-add-btn {
        width: 100%;
        justify-content: center;
    }
    
    .security-member-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .security-member-remove {
        align-self: flex-end;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .mining-controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .upgrade-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .upgrade-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .nav-balance-label,
    .nav-balance-unit {
        display: none;
    }
    
    .nav-balance {
        padding: 8px 12px;
    }
    
    .balance-toggle-btn {
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
        margin-right: 3px;
    }
    
    .balance-toggle-icon {
        font-size: 1rem;
    }
    
    .balance-display {
        padding: 15px;
        min-height: 220px;
    }
    
    .balance-value {
        font-size: 2rem;
    }
    
    .mining-circle-btn {
        width: 130px;
        height: 130px;
    }
    
    .mining-btn-icon {
        font-size: 2.5rem;
    }
    
    .balance-section-content {
        padding: 15px;
    }
    
    .balance-section-icon-wrapper {
        height: 90px;
    }
    
    .balance-section-icon {
        width: 55px;
        height: 55px;
    }
    
    .balance-section-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .balance-amount {
        font-size: 1.75rem;
    }
    
    .balance-section-value {
        padding: 12px;
        margin: 12px 0;
    }
    
    .mining-btn-text {
        font-size: 0.9rem;
    }
    
    .mining-rate-display {
        margin-top: 15px;
        padding-top: 12px;
    }
    
    .mining-rate-label {
        font-size: 0.8rem;
    }
    
    .mining-rate-value {
        font-size: 1.3rem;
    }
    
    .mining-rate-unit {
        font-size: 0.75rem;
    }
    
    .mining-action-icons {
        gap: 10px;
        padding: 12px;
    }
    
    .action-icon-btn {
        width: 60px;
        height: 60px;
        padding: 0;
    }
    
    .action-icon {
        font-size: 1.8rem;
    }
    
    .share-icon-svg svg,
    .wallet-icon-svg svg,
    .security-icon-svg svg,
    .referral-icon-svg svg {
        width: 22px;
        height: 22px;
    }
    
    .action-icon-label {
        font-size: 0.75rem;
    }
    
    .container {
        padding: 10px;
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
    }
    
    .sidebar {
        width: 100%;
        left: -100%;
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .sidebar-header {
        padding: 25px 20px;
        min-height: 90px;
    }
    
    .sidebar-user-name {
        font-size: 1.3rem;
    }
    
    .sidebar-user-verified {
        font-size: 0.9rem;
    }
    
    .verified-badge {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }
    
    .sidebar-close {
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 10px;
        max-height: calc(100vh - 20px);
        max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px);
    }
    
    .login-container,
    .register-container,
    .forgot-password-container {
        padding: 30px 20px;
        max-width: 100%;
        margin: 10px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: calc(100vh - 40px);
    }
    
    .login-overlay {
        padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
        align-items: flex-start;
    }
    
    .security-circle {
        width: 100px;
        height: 100px;
    }
    
    .security-icon {
        font-size: 1.5rem;
    }
    
    .security-percentage {
        font-size: 1.2rem;
    }
    
    .security-label {
        font-size: 0.8rem;
    }
    
    .security-feature {
        font-size: 0.85rem;
        padding: 8px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .balance-section-content {
        padding: 18px;
    }
    
    .balance-section-icon-wrapper {
        height: 100px;
    }
    
    .balance-section-icon {
        width: 60px;
        height: 60px;
    }
    
    .balance-section-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .balance-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .balance-section h3 {
        font-size: 1rem;
        width: 100%;
    }
    
    .balance-badge {
        padding: 5px 12px;
        font-size: 0.7rem;
    }
    
    .balance-section-value {
        padding: 15px;
        margin: 15px 0;
    }
    
    .balance-amount {
        font-size: 2rem;
    }
    
    .balance-currency {
        font-size: 0.95rem;
    }
    
    .balance-section-description {
        font-size: 0.875rem;
    }
    
    .balance-icon-pulse {
        width: 80px;
        height: 80px;
    }
    
    .balance-icon-glow {
        width: 100px;
        height: 100px;
    }
    
    .balance-icon-ring {
        width: 75px;
        height: 75px;
    }
    
    .mainnet-migrate-btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    .mainnet-migrate-btn .migrate-btn-icon {
        width: 18px;
        height: 18px;
    }
    
    .referral-stats {
        grid-template-columns: 1fr;
    }
    
    .login-container,
    .register-container,
    .forgot-password-container {
        padding: 30px 20px;
        max-width: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: calc(100vh - 40px);
    }
    
    .login-logo {
        font-size: 2.5rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
}

/* المحفظة */
.wallet-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.wallet-balance-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    border-radius: 15px;
    color: white;
}

.wallet-balance-icon {
    font-size: 3rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
}

.wallet-balance-icon svg {
    width: 100%;
    height: 100%;
    color: currentColor;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.wallet-balance-info {
    flex: 1;
}

.wallet-balance-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.wallet-balance-value {
    font-size: 2rem;
    font-weight: bold;
}

.wallet-address-section {
    padding: 20px;
    background: #EAF3F2;
    border-radius: 15px;
}

.wallet-address-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.wallet-address {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #333;
    word-break: break-all;
    direction: ltr;
    text-align: left;
}

.wallet-copy-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.wallet-copy-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(15, 92, 86, 0.4);
}

.wallet-actions {
    display: flex;
    gap: 15px;
}

.wallet-action-btn {
    flex: 1;
    padding: 18px;
    background: white;
    border: 2px solid #0F5C56;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: bold;
    color: #0F5C56;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 80px;
}

.wallet-action-btn:hover {
    background: linear-gradient(135deg, #0F5C56 0%, #0a4a44 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(15, 92, 86, 0.3);
}

.wallet-action-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-action-icon svg {
    width: 24px;
    height: 24px;
    color: currentColor;
    transition: transform 0.3s ease;
}

.wallet-action-btn:hover .wallet-action-icon svg {
    transform: scale(1.1);
}

.send-icon-svg svg {
    color: #e74c3c;
}

.receive-icon-svg svg {
    color: #27ae60;
}

.lock-icon-svg svg {
    color: #f39c12;
}

.wallet-action-btn.lock-btn {
    border-color: #f39c12;
    color: #f39c12;
}

.wallet-action-btn.lock-btn:hover {
    background: rgba(243, 156, 18, 0.1);
    border-color: #e67e22;
    color: #e67e22;
}

.wallet-transactions {
    padding: 20px;
    background: #EAF3F2;
    border-radius: 15px;
}

.wallet-transactions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.wallet-transaction-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.wallet-transaction-item:hover {
    box-shadow: 0 4px 12px rgba(15, 92, 86, 0.2);
    transform: translateY(-2px);
}

.wallet-transaction-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(15, 92, 86, 0.1);
}

.wallet-transaction-icon svg {
    width: 20px;
    height: 20px;
    color: currentColor;
}

.wallet-transaction-item.send .wallet-transaction-icon {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.wallet-transaction-item.receive .wallet-transaction-icon {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.wallet-transaction-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wallet-transaction-type {
    font-weight: bold;
    color: #0F5C56;
    font-size: 1rem;
}

.wallet-transaction-address {
    font-size: 0.85rem;
    color: #666;
    font-family: 'Courier New', monospace;
    direction: ltr;
    text-align: left;
}

.wallet-transaction-date {
    font-size: 0.8rem;
    color: #999;
}

.wallet-transaction-note {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

.wallet-transaction-amount {
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.wallet-transaction-amount.positive {
    color: #28a745;
}

.wallet-transaction-amount.negative {
    color: #dc3545;
}

.wallet-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 0.9rem;
}

.wallet-send-form,
.wallet-receive-content {
    padding: 10px 0;
}

.wallet-qr-placeholder {
    border: 2px dashed #0F5C56;
}

/* Responsive للمحفظة */
@media (max-width: 768px) {
    .wallet-balance-card {
        flex-direction: column;
        text-align: center;
    }
    
    .wallet-balance-value {
        font-size: 1.5rem;
    }
    
    .wallet-actions {
        flex-direction: column;
    }
    
    .wallet-action-btn {
        width: 100%;
    }
    
    .wallet-address {
        font-size: 0.8rem;
    }
    
    .wallet-transactions-list {
        max-height: 250px;
    }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 320px) {
    .login-container,
    .register-container,
    .forgot-password-container {
        padding: 20px 15px;
        border-radius: 15px;
        margin: 5px;
    }
    
    .modal-content {
        margin: 5px;
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 12px;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 12px;
    }
    
    .nav-logo {
        font-size: 1.2rem;
    }
    
    .balance-value {
        font-size: 1.8rem;
    }
    
    .login-logo {
        font-size: 2.5rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
}

/* تحسينات للوضع الأفقي (Landscape) */
@media (max-height: 500px) and (orientation: landscape) {
    .login-overlay {
        align-items: flex-start;
        padding-top: 10px;
    }
    
    .login-container,
    .register-container,
    .forgot-password-container {
        max-height: calc(100vh - 20px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        margin-top: 10px;
        margin-bottom: 10px;
    }
    
    .modal-content {
        max-height: calc(100vh - 20px);
    }
}

