:root {
    --neon-green: 120 100% 50%; /* #00ff9d */
    --neon-purple: 276 100% 50%; /* #b700ff */
    --dark-bg: 230 70% 4%; /* #030014 */
    --glass-bg: 0 0% 100% / 0.1;
    --card-bg: 0 0% 0% / 0.3;
    --border-color: 120 100% 50% / 0.2;
    --text-color: 0 0% 100%;
    --highlight-color: 120 100% 50%;
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background: hsl(var(--dark-bg));
    color: hsl(var(--text-color));
    line-height: 1.7;
    padding: 10px;
    padding-top: 80px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Navigarea pentru Wallet */
nav.wallet-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: hsl(230 70% 4% / 0.95); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid hsl(var(--border-color));
    box-shadow: 0 2px 10px hsl(0 0% 0% / 0.4);
}

.wallet-nav-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    gap: 10px;
}

.logo-link {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.nav-logo-wallet {
    height: 36px;
    width: auto;
    transition: filter 0.3s ease;
}

.nav-logo-wallet:hover {
    filter: drop-shadow(0 0 8px hsl(var(--neon-green)));
}

.nav-title-group {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-nav-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1em;
    background: linear-gradient(90deg, hsl(var(--neon-purple)), hsl(var(--neon-green)));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback for older browsers */
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
    text-align: center;
}

.nav-right-controls {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-selector-container {
    position: relative;
}
#language-selector-wallet {
    background-color: transparent;
    color: hsl(var(--text-color));
    border: 1px solid hsl(var(--border-color));
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300ff9d'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.2em;
    padding-right: 2rem;
}
#language-selector-wallet:hover {
    border-color: hsl(var(--neon-green));
    box-shadow: 0 0 5px hsl(var(--neon-green));
}
#language-selector-wallet option {
    background-color: hsl(var(--dark-bg));
    color: hsl(var(--text-color));
}

.container-wrapper {
    max-width: 900px;
    margin: 20px auto 40px auto;
    padding: 0;
}

.main-content-area {
    background: hsl(240 60% 10% / 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid hsl(var(--border-color));
    padding: 20px 15px;
    box-shadow: 0 0 25px hsl(276 100% 50% / 0.2);
}

h1, h2, h3, h4, p {
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

h1 { 
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8em; 
    text-align: center; 
    margin-top: 0; 
    margin-bottom: 1.2em; 
    line-height: 1.3;
    background: linear-gradient(90deg, hsl(var(--neon-purple)), hsl(var(--neon-green)));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

h2 { 
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5em; 
    margin-top: 2em; 
    border-bottom: 1px solid hsl(var(--border-color)); 
    padding-bottom: 0.3em;
    line-height: 1.3;
    background: linear-gradient(90deg, hsl(var(--neon-purple)), hsl(var(--neon-green)));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

h3 {
    color: hsl(var(--neon-green));
    margin-bottom: 10px;
    font-size: 1.2em;
}

p {
    margin-bottom: 1.2em;
    font-size: 1em;
}

.button-connect-wallet {
    font-family: 'Orbitron', sans-serif;
    display: inline-block;
    padding: 12px 25px;
    margin: 10px 0;
    background: linear-gradient(90deg, hsl(var(--neon-purple)), hsl(var(--neon-green)));
    color: hsl(var(--dark-bg));
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.button-connect-wallet:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px hsl(120 100% 50% / 0.4);
}

.button-connect-wallet:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.wallet-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.wallet-option {
    background: hsl(var(--card-bg));
    border: 1px solid hsl(var(--border-color));
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

#extensionWalletOption {
    display: none !important;
}

#qr-code-container > * {
    max-width: 100%;
    height: auto !important;
    margin: 0 auto;
    display: block;
}

.wallet-option:hover {
    border-color: hsl(var(--neon-green));
    box-shadow: 0 0 15px hsl(120 100% 50% / 0.2);
    transform: translateY(-2px);
}

.manual-option {
    margin-top: 30px;
    border-top: 2px solid hsl(var(--border-color));
    padding-top: 30px;
    text-align: center;
}

.manual-input {
    margin-top: 15px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.manual-input input[type="text"] {
    width: 100%;
    padding: 12px;
    background: hsl(0 0% 0% / 0.3);
    border: 1px solid hsl(var(--border-color));
    border-radius: 8px;
    color: var(--text-color);
    font-size: 14px;
    margin-bottom: 15px;
    font-family: 'Rajdhani', sans-serif;
}

.manual-input input[type="text"]:focus {
    outline: none;
    border-color: hsl(var(--neon-green));
    box-shadow: 0 0 5px hsl(120 100% 50% / 0.3);
}

#disconnectBtnNav {
    background: hsl(0 70% 45%);
    color: white;
    padding: 6px 12px;
    font-size: 0.8em;
    white-space: nowrap;
}

#disconnectBtnNav:hover {
    background: hsl(0 70% 55%);
    box-shadow: 0 4px 15px hsl(0 70% 55% / 0.4);
}

.disconnect-button {
    background: hsl(0 70% 45%) !important;
    color: white !important;
}

.disconnect-button:hover {
    background: hsl(0 70% 55%) !important;
    box-shadow: 0 4px 15px hsl(0 70% 55% / 0.4) !important;
}

.wallet-info-container {
    padding: 20px;
    background: hsl(var(--card-bg));
    border: 1px solid hsl(var(--border-color));
    border-radius: 15px;
}

.wallet-info-container h2 {
    text-align: center;
    border-bottom: none;
    margin-bottom: 20px;
}

.back-link-container {
    text-align: center;
    margin-top: 40px;
}

.back-link {
    font-family: 'Orbitron', sans-serif;
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(90deg, hsl(var(--neon-purple)), hsl(var(--neon-green)));
    color: hsl(var(--dark-bg));
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px hsl(120 100% 50% / 0.4);
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, hsl(276 100% 50% / 0.1), transparent 35%),
        radial-gradient(circle at 80% 80%, hsl(120 100% 50% / 0.1), transparent 35%);
    z-index: -1;
}

.status-container {
    min-height: 48px; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 0;
}

.status-message {
    text-align: center;
    width: 100%;
    max-width: 90%;
    margin: 0;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9em;
}

.status-loading {
    background: hsl(45 100% 50% / 0.2);
    color: hsl(45 100% 50%);
    border: 1px solid hsl(45 100% 50% / 0.3);
}

.status-error {
    background: hsl(0 70% 55% / 0.2);
    color: hsl(0 70% 55%);
    border: 1px solid hsl(0 70% 55% / 0.3);
}

.vote-power-card {
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid var(--neon-green);
    border-radius: 10px;
    padding: 15px 20px;
    margin: 20px 0 30px 0;
    text-align: center;
    font-size: 1.1em;
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.2);
}

.vote-power-card strong {
    color: var(--neon-green);
}

.assets-title {
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5em;
    margin-bottom: 20px;
    color: var(--neon-green);
}

.assets-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 20px;
}

.asset-column {
    display: flex;
    flex-direction: column;
    flex: 1; 
    min-width: 0;
}

.asset-column h4 {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-purple);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.asset-column ul {
    max-height: 310px; 
    overflow-y: auto;
    padding-right: 10px;
    list-style: none;
    padding-left: 0;
}

.token-list li, .nft-collections-list li {
    background: hsl(0 0% 0% / 0.2);
    border-left: 3px solid hsl(var(--neon-green));
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
}

.asset-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: contain;
    background-color: hsl(0 0% 100% / 0.05);
    border: 1px solid hsl(var(--border-color));
    flex-shrink: 0;
}

.asset-placeholder-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: hsl(var(--card-bg));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
    border: 1px solid hsl(var(--border-color));
}

.asset-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex-grow: 1;
}

.asset-name, .asset-balance {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-name a {
    color: inherit;
    text-decoration: none;
}

.asset-name a:hover {
    color: var(--neon-green);
}

.asset-balance {
    font-size: 0.9em;
    color: #ccc;
}

.asset-balance small {
    font-size: 0.8em;
    color: #aaa;
}

/* ======================================= */
/* MEDIA QUERIES (RESPONSIVE)     */
/* ======================================= */

@media (min-width: 768px) {
    body {
        padding: 20px;
        padding-top: 90px;
    }

    .main-content-area {
        padding: 30px 40px;
    }

    h1 {
        font-size: 2.8em;
    }

    h2 {
        font-size: 2em;
    }

    .wallet-options-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    #extensionWalletOption {
        display: block !important;
    }

    .assets-grid {
        grid-template-columns: 1fr 1fr;
    }

    .wallet-nav-title {
        font-size: 1.2em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #disconnectBtnNav {
        font-size: 0.9em;
        padding: 8px 15px;
    }
}

@media (max-width: 767px) {
    .nav-logo-wallet {
        height: 32px;
    }
    .wallet-nav-title {
        font-size: 1em;
    }
    #language-selector-wallet {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
        padding-right: 1.8rem;
    }
    #disconnectBtnNav {
        padding: 5px 10px;
        font-size: 0.75em;
    }

    h1 {
        font-size: 1.5em !important;
    }

    h2 {
        font-size: 1.3em !important;
    }

    .asset-logo {
        width: 32px;
        height: 32px;
    }
    
    .asset-placeholder-logo {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .token-list li, .nft-collections-list li {
        padding: 10px;
        gap: 12px;
    }
    
    .asset-name, .asset-balance {
        white-space: normal;
        word-break: break-word;
    }
}

