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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
    color: #e0e0e0;
    background-color: #1a1a2e;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button {
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

/* App Layout */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 100vw;
}

/* Header */
.app-header {
    background-color: #16213e;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #0f3460;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
}

.info-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    color: #8892b0;
    transition: color 0.2s ease;
}

.info-btn:hover {
    color: #ffffff;
}

.info-btn svg {
    width: 100%;
    height: 100%;
}

/* Main Content */
.app-main {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 4rem; /* Space for bottom nav */
}

/* Views */
.view {
    display: none;
    padding: 1rem;
}

.view.active {
    display: block;
}

.view-content {
    max-width: 600px;
    margin: 0 auto;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #16213e;
    border-top: 1px solid #0f3460;
    padding: 0.5rem 0;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 4rem;
    padding: 0.5rem;
    color: #8892b0;
    transition: color 0.2s ease;
}

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

.nav-btn.active {
    color: #64ffda;
}

.nav-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.nav-btn span {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Utility Classes */
.monospace {
    font-family: 'Roboto Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Courier New', monospace;
    letter-spacing: -0.02em;
}

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

.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    min-height: 44px;
    min-width: 44px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: #64ffda;
    color: #1a1a2e;
}

.btn-primary:hover {
    background-color: #52e0c4;
}

.btn-secondary {
    background-color: #3d3d5c;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background-color: #4d4d6d;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Scanner Styles */
.scanner-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 1.5rem;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: #0f0f1a;
}

.qr-reader {
    width: 100%;
    min-height: 300px;
}

.qr-reader video {
    border-radius: 0.75rem;
}

.scanner-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 1.5rem;
    color: #8892b0;
    text-align: center;
}

.scanner-placeholder.compact {
    min-height: 80px;
    padding: 1rem;
}

.scanner-placeholder.compact .placeholder-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.5rem;
}

.scanner-placeholder.compact p {
    font-size: 0.875rem;
}

.placeholder-icon {
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.scanner-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: auto;
    padding: 1.5rem;
    text-align: center;
    color: #ff6b6b;
}

/* Camera permission help styles */
.camera-help {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #16213e;
    border-radius: 0.5rem;
    text-align: left;
    width: 100%;
}

.camera-help-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0 0 0.75rem 0;
}

.camera-help-browser {
    margin-bottom: 0.75rem;
}

.camera-help-browser:last-child {
    margin-bottom: 0;
}

.camera-help-browser-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64ffda;
    margin: 0 0 0.25rem 0;
}

.camera-help-steps {
    font-size: 0.75rem;
    color: #8892b0;
    margin: 0;
    padding-left: 1rem;
    line-height: 1.6;
}

.camera-help-steps li {
    margin-bottom: 0.125rem;
}

.error-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
}

#scanner-error-message {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.scanner-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.upload-divider {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 200px;
    margin: 0.5rem 0;
}

.upload-divider::before,
.upload-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #3d3d5c;
}

.upload-divider span {
    padding: 0 1rem;
    color: #8892b0;
    font-size: 0.875rem;
}

/* Result Card Styles */
.result-card {
    background-color: #16213e;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #0f3460;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.crypto-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Crypto-specific badge colors */
.crypto-badge.btc, .crypto-badge.bitcoin {
    background-color: #F7931A;
    color: #1a1a2e;
}

.crypto-badge.eth, .crypto-badge.ethereum {
    background-color: #627EEA;
    color: #ffffff;
}

.crypto-badge.ltc, .crypto-badge.litecoin {
    background-color: #345D9D;
    color: #ffffff;
}

.crypto-badge.doge, .crypto-badge.dogecoin {
    background-color: #C3A634;
    color: #1a1a2e;
}

.crypto-badge.sol, .crypto-badge.solana {
    background-color: #9945FF;
    color: #ffffff;
}

.crypto-badge.xrp {
    background-color: #23292F;
    color: #ffffff;
    border: 1px solid #8892b0;
}

.crypto-badge.unknown {
    background-color: #3d3d5c;
    color: #e0e0e0;
}

.crypto-badge.tx {
    background-color: #8b5cf6;
    color: #ffffff;
}

.result-format {
    font-size: 0.75rem;
    color: #8892b0;
    text-transform: capitalize;
}

.result-address-container {
    background-color: #0f0f1a;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.result-address {
    font-size: 1rem;
    line-height: 1.6;
    word-break: break-all;
    color: #e0e0e0;
    margin: 0;
}

.result-params {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #0f0f1a;
    border-radius: 0.5rem;
}

.result-param {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid #3d3d5c;
}

.result-param:last-child {
    border-bottom: none;
}

.result-param-label {
    font-size: 0.875rem;
    color: #8892b0;
    text-transform: capitalize;
}

.result-param-value {
    font-size: 0.875rem;
    color: #e0e0e0;
    font-weight: 500;
    text-align: right;
    word-break: break-all;
    max-width: 60%;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.result-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* Copy button success state */
.btn.copy-success {
    background-color: #10b981;
    color: #ffffff;
}

.btn.copy-success:hover {
    background-color: #059669;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #10b981;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
}

/* Invalid/Warning Banner Styles */
.invalid-warning {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #f59e0b;
    border-radius: 0.5rem;
    color: #1a1a2e;
    font-weight: 500;
}

.invalid-warning.unrecognized {
    background-color: #ef4444;
    color: #ffffff;
}

.warning-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

#warning-message {
    flex: 1;
}

/* Invalid result card styling */
.result-card.invalid {
    border-color: #f59e0b;
}

.result-card.invalid .result-address-container {
    background-color: rgba(245, 158, 11, 0.1);
}

/* Duplicate Banner Styles (for already saved addresses/transactions) */
.duplicate-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #3b82f6;
    border-radius: 0.5rem;
    color: #ffffff;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.duplicate-banner:hover {
    background-color: #2563eb;
}

.duplicate-banner:active {
    transform: scale(0.99);
}

.duplicate-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

#duplicate-message {
    flex: 1;
}

.duplicate-arrow {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    opacity: 0.8;
}

/* Raw content display (for non-crypto QR codes) */
.result-raw-label {
    display: block;
    font-size: 0.75rem;
    color: #8892b0;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Multi-Address Styles */
.multi-address-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #16213e;
    border-radius: 0.5rem;
    border: 1px solid #0f3460;
}

#multi-address-count {
    font-size: 1.125rem;
    font-weight: 600;
    color: #64ffda;
}

.multi-address-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.multi-address-item {
    background-color: #16213e;
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid #0f3460;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.multi-address-item:hover {
    border-color: #64ffda;
    background-color: #1a2540;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.multi-address-item:active {
    transform: scale(0.99);
}

.multi-address-item.expanded {
    border-color: #64ffda;
}

.multi-address-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.multi-address-item-address {
    font-size: 0.9375rem;
    color: #e0e0e0;
    word-break: break-all;
    line-height: 1.5;
}

.multi-address-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #0f3460;
}

.multi-address-item-actions .btn {
    flex: 1;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

/* Invalid multi-address item */
.multi-address-item.invalid {
    border-color: #f59e0b;
    opacity: 0.8;
}

.multi-address-item.invalid .multi-address-item-address {
    color: #f59e0b;
}

/* Recent Scans Styles */
.recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.recent-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.btn-small {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    min-height: 44px;
    min-width: 44px;
}

.recent-scans-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recent-scan-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #16213e;
    border-radius: 0.75rem;
    border: 1px solid #0f3460;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recent-scan-item:hover {
    border-color: #64ffda;
    background-color: #1a2540;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.recent-scan-item:active {
    transform: scale(0.99);
}

.recent-scan-badge {
    flex-shrink: 0;
}

.recent-scan-content {
    flex: 1;
    min-width: 0;
}

.recent-scan-address {
    font-size: 0.9375rem;
    color: #e0e0e0;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-scan-time {
    font-size: 0.75rem;
    color: #8892b0;
    margin: 0;
}

.recent-scan-arrow {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    color: #8892b0;
}

/* Empty State Styles */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.empty-state-icon {
    width: 4rem;
    height: 4rem;
    color: #8892b0;
    opacity: 0.5;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0 0 0.5rem 0;
}

.empty-state-subtitle {
    font-size: 0.875rem;
    color: #8892b0;
    margin: 0;
}

/* Dialog Styles */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.dialog {
    background-color: #16213e;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 320px;
    width: 100%;
    border: 1px solid #0f3460;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.dialog-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.75rem 0;
}

.dialog-message {
    font-size: 0.875rem;
    color: #8892b0;
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

.dialog-actions {
    display: flex;
    gap: 0.75rem;
}

.dialog-actions .btn {
    flex: 1;
}

.btn-danger {
    background-color: #ef4444;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Info Dialog Styles */
.info-dialog {
    max-width: 360px;
}

.info-content {
    margin-bottom: 1.5rem;
}

.info-attribution {
    font-size: 1rem;
    color: #e0e0e0;
    margin: 0 0 1rem 0;
    text-align: center;
}

.info-disclaimer {
    background-color: rgba(15, 52, 96, 0.5);
    border-radius: 0.5rem;
    padding: 1rem;
    border-left: 3px solid #f59e0b;
}

.info-disclaimer p {
    font-size: 0.8125rem;
    color: #a0aec0;
    margin: 0;
    line-height: 1.6;
}

.info-disclaimer p + p {
    margin-top: 0.75rem;
}

.info-disclaimer strong {
    color: #e0e0e0;
}

.info-privacy {
    border-top: 1px solid rgba(136, 146, 176, 0.2);
    padding-top: 0.75rem;
}

/* Saved Addresses Styles */
.saved-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.saved-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

/* Search Input Styles */
.search-container {
    position: relative;
    margin-bottom: 1rem;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: #8892b0;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.75rem 2.5rem;
    padding-left: 2.5rem;
    font-size: 1rem;
    font-family: inherit;
    color: #e0e0e0;
    background-color: #16213e;
    border: 1px solid #0f3460;
    border-radius: 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #64ffda;
    box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.2);
}

.search-input::placeholder {
    color: #8892b0;
}

.clear-search-btn {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8892b0;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.clear-search-btn:hover {
    color: #e0e0e0;
    background-color: rgba(255, 255, 255, 0.1);
}

.clear-search-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.clear-search-btn svg {
    width: 1rem;
    height: 1rem;
}

/* Filter Chips Styles */
.filter-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: #3d3d5c;
    color: #e0e0e0;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    min-height: 44px;
}

.filter-chip:hover {
    background-color: #4d4d6d;
}

.filter-chip:active {
    transform: scale(0.97);
}

.filter-chip.active {
    background-color: #64ffda;
    color: #1a1a2e;
    border-color: #64ffda;
}

/* Crypto-specific filter chip colors when active */
.filter-chip.active[data-filter="Bitcoin"] {
    background-color: #F7931A;
    border-color: #F7931A;
    color: #1a1a2e;
}

.filter-chip.active[data-filter="Ethereum"] {
    background-color: #627EEA;
    border-color: #627EEA;
    color: #ffffff;
}

.filter-chip.active[data-filter="Litecoin"] {
    background-color: #345D9D;
    border-color: #345D9D;
    color: #ffffff;
}

.filter-chip.active[data-filter="Dogecoin"] {
    background-color: #C3A634;
    border-color: #C3A634;
    color: #1a1a2e;
}

.filter-chip.active[data-filter="Solana"] {
    background-color: #9945FF;
    border-color: #9945FF;
    color: #ffffff;
}

.filter-chip.active[data-filter="XRP"] {
    background-color: #23292F;
    border-color: #8892b0;
    color: #ffffff;
}

.saved-addresses-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.saved-address-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #16213e;
    border-radius: 0.75rem;
    border: 1px solid #0f3460;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.saved-address-item:hover {
    border-color: #64ffda;
    background-color: #1a2540;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.saved-address-item:active {
    transform: scale(0.99);
}

.saved-address-badge {
    flex-shrink: 0;
}

.saved-address-content {
    flex: 1;
    min-width: 0;
}

.saved-address-label {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-address-address {
    font-size: 0.875rem;
    color: #8892b0;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-address-date {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
}

.saved-address-arrow {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    color: #8892b0;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e0e0e0;
    margin-bottom: 0.375rem;
}

.form-label .required {
    color: #ef4444;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    color: #e0e0e0;
    background-color: #0f0f1a;
    border: 1px solid #3d3d5c;
    border-radius: 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #64ffda;
    box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.2);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #8892b0;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-static {
    padding: 0.5rem 0;
}

.save-address-dialog {
    max-width: 360px;
}

/* Detail View Styles */
.detail-header {
    margin-bottom: 1rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0;
    color: #64ffda;
    font-size: 1rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-back:hover {
    opacity: 0.8;
}

.btn-back:active {
    opacity: 0.6;
}

.btn-back .btn-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.detail-card {
    background-color: #16213e;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #0f3460;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.detail-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.detail-date {
    font-size: 0.875rem;
    color: #8892b0;
}

.detail-label {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 1rem 0;
    word-break: break-word;
}

.detail-address-container {
    background-color: #0f0f1a;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.detail-address {
    font-size: 1rem;
    line-height: 1.6;
    word-break: break-all;
    color: #e0e0e0;
    margin: 0;
}

.detail-notes-container {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #0f0f1a;
    border-radius: 0.5rem;
}

.detail-notes-label {
    font-size: 0.75rem;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem 0;
}

.detail-notes {
    font-size: 0.9375rem;
    color: #e0e0e0;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.detail-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.detail-actions .btn {
    flex: 1;
    min-width: 120px;
}

.detail-actions-secondary {
    margin-top: 0.75rem;
}

/* Generate QR View Styles */
.generate-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.generate-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.generate-input-container {
    margin-bottom: 1.5rem;
}

.generate-input-container .form-textarea {
    margin-bottom: 0.75rem;
}

.generate-validation-feedback {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: rgba(100, 255, 218, 0.1);
    border: 1px solid #64ffda;
    border-radius: 0.5rem;
}

.generate-validation-message {
    font-size: 0.875rem;
    color: #64ffda;
}

.generate-error-message {
    padding: 0.75rem;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #ef4444;
}

#generate-qr-btn {
    width: 100%;
}

#generate-qr-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Transaction Format Selector Styles */
.tx-format-selector {
    margin-bottom: 1.5rem;
}

.format-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.format-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background-color: #16213e;
    border: 1px solid #0f3460;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.format-option:hover {
    border-color: #3d3d5c;
    background-color: #1a2540;
}

.format-option input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    accent-color: #64ffda;
    cursor: pointer;
}

.format-option input[type="radio"]:checked + .format-option-content .format-option-title {
    color: #64ffda;
}

.format-option:has(input[type="radio"]:checked) {
    border-color: #64ffda;
    background-color: rgba(100, 255, 218, 0.05);
}

.format-option-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.format-option-title {
    font-size: 1rem;
    font-weight: 500;
    color: #e0e0e0;
    transition: color 0.2s ease;
}

.format-option-desc {
    font-size: 0.8125rem;
    color: #8892b0;
}

/* QR Display Section Styles */
.qr-display-card {
    background-color: #16213e;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #0f3460;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.qr-display-badge {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.qr-format-indicator {
    font-size: 0.75rem;
    color: #a0a0b0;
    padding: 0.25rem 0.5rem;
    background-color: #0f0f1a;
    border-radius: 0.25rem;
}

.qr-display-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.qr-display-container canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.qr-display-address-container {
    background-color: #0f0f1a;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}

.qr-display-address {
    font-size: 0.875rem;
    line-height: 1.6;
    word-break: break-all;
    color: #e0e0e0;
    margin: 0;
    text-align: center;
}

/* QR Action Buttons */
.qr-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.qr-actions .btn {
    flex: 1;
}

#generate-another-btn {
    width: 100%;
}

/* Manual Entry Section Styles */
.manual-entry-section {
    width: 100%;
    max-width: 400px;
    background-color: #16213e;
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid #0f3460;
    margin-top: 0.5rem;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}

.manual-entry-section.hidden {
    max-height: 0;
    opacity: 0;
    padding: 0 1rem;
    margin-top: 0;
    border-color: transparent;
}

.manual-entry-section.expanded {
    max-height: 300px;
    opacity: 1;
    padding: 1rem;
    margin-top: 0.5rem;
}

.manual-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.manual-entry-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #e0e0e0;
}

.manual-entry-close {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #8892b0;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.manual-entry-close:hover {
    color: #e0e0e0;
    background-color: rgba(255, 255, 255, 0.1);
}

.manual-entry-close:active {
    transform: scale(0.95);
}

.manual-entry-close svg {
    width: 1rem;
    height: 1rem;
}

.manual-entry-input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: 'Roboto Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Courier New', monospace;
    color: #e0e0e0;
    background-color: #0f0f1a;
    border: 1px solid #3d3d5c;
    border-radius: 0.5rem;
    resize: vertical;
    min-height: 70px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.manual-entry-input:focus {
    outline: none;
    border-color: #64ffda;
    box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.2);
}

.manual-entry-input::placeholder {
    color: #8892b0;
    font-family: inherit;
}

.manual-entry-error {
    padding: 0.5rem 0.75rem;
    margin-top: 0.5rem;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #ef4444;
}

.manual-entry-submit {
    width: 100%;
    margin-top: 0.75rem;
}

.manual-entry-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .app-header h1 {
        font-size: 1.5rem;
    }

    .view {
        padding: 1.5rem;
    }

    .scanner-container {
        max-width: 500px;
    }

    .qr-reader {
        min-height: 400px;
    }

    .scanner-placeholder {
        min-height: 200px;
    }
}
