:root {
    --bg-color: #0d0f18;
    --card-bg-color: rgba(38, 42, 66, 0.4);
    --border-color: rgba(138, 143, 255, 0.2);
    --glow-color: rgba(115, 79, 255, 0.5);
    --text-primary: #f0f0f0;
    --text-secondary: #a3a8d3;
    --font-en: 'Poppins', sans-serif;
    --font-fa: 'Vazirmatn', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 1px 1px, rgba(138, 143, 255, 0.1) 1px, transparent 0);
    background-size: 20px 20px;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    opacity: 0;
    transition: opacity 0.4s ease-in;
}

body.loaded {
    opacity: 1;
}

body.lang-fa {
    font-family: var(--font-fa);
    direction: rtl;
}

body.lang-en {
    font-family: var(--font-en);
    direction: ltr;
}

#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

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

.container {
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
}

.lang-switcher {
    position: absolute;
    top: -10px;
    right: 0;
    font-size: 0.9rem;
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    z-index: 10;
}

body.lang-fa .lang-switcher {
    right: auto;
    left: 0;
}

.lang-switcher button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-en);
    font-weight: 600;
    padding: 5px;
    transition: color 0.3s ease;
}

.lang-switcher button:hover {
    color: var(--text-primary);
}

.lang-switcher button.active {
    color: #a374ff;
    cursor: default;
}

.lang-separator {
    color: var(--text-secondary);
    margin: 0 2px;
}


header {
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.main-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    box-shadow: 0 0 20px var(--glow-color);
    margin-bottom: 1.5rem;
    margin-top: 30px;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 90%;
    margin: 0 auto;
}

.wallet-card {
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    text-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.wallet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--glow-color);
}

.wallet-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

body.lang-fa .wallet-header {
    flex-direction: row-reverse;
}

.crypto-logo {
    width: 40px;
    height: 40px;
}

body.lang-en .crypto-logo {
    margin-right: 1rem;
}

body.lang-fa .crypto-logo {
    margin-left: 1rem;
}

.wallet-header h3 {
    font-size: 1.2rem;
    font-weight: 400;
}

.address-bar {
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.lang-fa .address-bar {
    flex-direction: row-reverse;
}

.address-text {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    word-break: break-all;
    text-align: left;
    direction: ltr;
}

.copy-btn {
    background: #4a4e8a;
    color: var(--text-primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

body.lang-en .copy-btn {
    margin-left: 1rem;
}

body.lang-fa .copy-btn {
    margin-right: 1rem;
}

.copy-btn:hover {
    background: #6a6edb;
}

footer {
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    animation: fadeInUp 0.8s 0.5s ease-out forwards;
    opacity: 0;
}

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

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

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px; 
    margin-bottom: 20px; 
}

.social-links a {
    display: flex; 
    justify-content: center;
    align-items: center;
    width: 44px;  
    height: 44px; 
    border-radius: 50%; 
    background-color: rgba(38, 42, 66, 0.4); 
    border: 1px solid rgba(138, 143, 255, 0.2); 
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.1); 
    background-color: rgba(58, 62, 96, 0.7); 
}

.social-links img {
    width: 24px;  
    height: 24px; 
    object-fit: contain;
    filter: grayscale(1) brightness(1.5); 
    transition: filter 0.3s ease;
}

.social-links a:hover img {
    filter: grayscale(0) brightness(1); 
}

