/* Glass Main Container */
.glass-container {
    width: 100%;
    max-width: 400px;
    /* Mobile width */
    height: 100vh;
    max-height: 850px;
    position: relative;
    background: var(--gradient-container);
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 32px;
    overflow: hidden;
    /* Native scrolling disabled for Shell */
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--glass-bg-light);
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 4px 8px 4px 4px;
    border-radius: var(--radius-lg);
    padding: 4px 8px 4px 4px;
    border-radius: var(--radius-lg);
}

.user-profile:hover {
    background: var(--glass-border-medium);
}

.avatar-ring {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--gradient-avatar-ring);
    padding: 2px;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.greeting-box h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.greeting-box p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Identity Carousel */
.identity-section {
    width: 100%;
    height: 80px;
    position: relative;
    overflow: hidden;
    /* For swipe effect */
}

.identity-carousel {
    display: flex;
    transition: transform var(--transition-slow) var(--easing-smooth);
}

.identity-card {
    min-width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.chain-logo-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    /* Fallback background - only visible when img fails */
    background: rgba(200, 200, 200, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 2;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    padding: 2px;
    position: relative;
}

.chain-logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    /* Ensure img is always visible and above fallback */
    display: block;
}

/* Fallback placeholder - only shows when img fails */
.chain-logo-wrapper::after {
    content: '?';
    position: absolute;
    font-size: 18px;
    color: rgba(0, 0, 0, 0.3);
    font-weight: 600;
    z-index: 0;
    /* Hidden by default - only visible when img fails */
    opacity: 0;
    pointer-events: none;
}

/* Show placeholder when img fails */
.chain-logo-wrapper[data-icon-failed="true"]::after {
    opacity: 1;
}

.identity-pill {
    flex: 1;
    max-width: 280px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    color: white;
    font-size: 14px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.04);
    transition: background 0.5s ease;
    cursor: default;
    /* Background color is intentional for pill styling - not masking icons */
    /* Icons are in separate .chain-logo-wrapper, not inside pill */
    background: var(--chain-bg, #627eea);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

/* Mechanical shimmer effect for pill */
.identity-pill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
    background-size: 200% 200%;
    animation: shimmer 5s infinite;
    border-radius: 12px;
    pointer-events: none;
}

.id-text-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ens-name {
    font-size: 11px;
    opacity: 0.75;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.wallet-address {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* Action Grid */
.action-grid {
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

/* Dock & Balance - The Big Purple Block */
.dock-container {
    flex: 1;
    background: var(--gradient-dock);
    border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
    margin: 0 -24px -24px -24px;
    padding: 8px 24px 16px 24px;
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.02);
    position: relative;
}

.balance-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
    margin-bottom: 12px;
    background: var(--gradient-balance-strip);
    padding: 12px 18px;
    backdrop-filter: blur(var(--blur-lg));
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.balance-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--balance-label-color);
    margin-right: auto;
}

.balance-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Shutter Mechanism */
.shutter-container {
    position: relative;
    background: var(--shutter-bg);
    /* Darker inset track */
    border-radius: var(--radius-xs);
    padding: 0 2px;
    min-width: 120px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Key for shutter */
    cursor: pointer;
    border: 1px solid var(--shutter-border);
}

.balance-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--balance-value-color);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.01s 0.4s;
}

.shutter-container.revealed .balance-value {
    opacity: 1;
    transition: opacity 0.01s 0s;
}

/* The Shutter Cover */
.shutter-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #9f7aea 0%, #7c3aed 100%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.3);
}

.shutter-grip {
    color: rgba(255, 255, 255, 0.5);
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 3px;
    transform: rotate(90deg);
}

.shutter-container.revealed .shutter-overlay {
    transform: translateX(100%);
}

.balance-extras {
    display: none;
}

/* Dock Main (Scan & Utils) */
.dock-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-bottom: 12px;
    padding-top: 4px;
}

.utility-left {
    margin-right: 20px;
}

.utility-right {
    margin-left: 20px;
}

/* Manual Dark Mode Override - Handled by variables.css */