/* Modern Lyrium Wallet Styles - Branded */

:root {
    --primary: #0099FE;
    --primary-dark: #0088e6;
    --secondary: #00F6FF;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --background: #161616;
    --card-bg: #1e1e1e;
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --border: #2a2a2a;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(22, 22, 22, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

.loading-overlay p {
    color: var(--text-primary);
    margin-top: 20px;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    padding: 40px 20px;
}

.screen.active {
    display: block;
}

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

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: inline-block;
    margin-bottom: 20px;
}

.logo img {
    width: 100px;
    height: 100px;
    animation: float 3s ease-in-out infinite;
}

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

.logo-section h1 {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

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

.welcome-card h2 {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.welcome-card > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    background: #4B5563;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #4B5563;
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-large {
    width: 100%;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    font-size: 16px;
}

.btn-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.btn-title {
    font-size: 18px;
    font-weight: 600;
}

.btn-desc {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 4px;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* Info Box */
.info-box {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #1F2937;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.info-icon {
    font-size: 20px;
    flex-shrink: 0;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #6EE7B7;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FCD34D;
}

.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #93C5FD;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #0d0d0d;
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Key Display */
.key-section {
    margin-bottom: 20px;
}

.key-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.key-display {
    position: relative;
    display: flex;
    gap: 8px;
}

.key-display input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: #0d0d0d;
    color: var(--text-primary);
}

.copy-btn,
.toggle-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.copy-btn:hover,
.toggle-btn:hover {
    background: var(--primary-dark);
}

.copy-btn.copied {
    background: var(--success);
}

.toggle-btn {
    background: #4B5563;
    padding: 8px 12px;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    padding: 16px;
    background: #1F2937;
    border-radius: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    user-select: none;
    color: var(--text-primary);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin: 24px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.status-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.nav-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Wallet Container */
.wallet-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Balance Card */
.balance-card {
    background: var(--card-bg);
    color: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.balance-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 48px;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.currency {
    font-size: 24px;
    opacity: 0.9;
}

.sync-status {
    text-align: right;
}

.sync-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #FCD34D;
    margin-left: auto;
    margin-bottom: 8px;
    animation: pulse-strong 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(252, 211, 77, 0.5);
}

.sync-indicator.synced {
    background: var(--secondary);
    animation: none;
    box-shadow: 0 0 12px var(--secondary);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes pulse-strong {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 8px rgba(252, 211, 77, 0.5);
    }
    50% { 
        opacity: 0.6;
        transform: scale(1.2);
        box-shadow: 0 0 16px rgba(252, 211, 77, 0.8);
    }
}

.sync-text {
    font-size: 15px;
    font-weight: 700;
    opacity: 0.95;
}

.balance-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 24px;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.balance-item span:first-child {
    opacity: 0.8;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 24px;
}

/* Address Display */
.address-display {
    display: flex;
    gap: 8px;
}

.address-display input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: #0d0d0d;
    color: var(--text-primary);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Transactions */
#transactions-container {
    max-height: 400px;
    overflow-y: auto;
}

.transaction-item {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    background: #0d0d0d;
}

.transaction-item:hover {
    border-color: var(--primary);
    background: #1a1a1a;
}

.tx-info {
    flex: 1;
}

.tx-hash {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.tx-amount {
    font-size: 18px;
    font-weight: 600;
}

.tx-amount.incoming {
    color: var(--success);
}

.tx-amount.outgoing {
    color: var(--danger);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 24px;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #2a2a2a;
    color: var(--text-primary);
}

/* QR Code */
.qr-container {
    text-align: center;
    padding: 24px;
    background: #1F2937;
    border-radius: 12px;
    margin-bottom: 24px;
}

#qr-code {
    display: inline-block;
}

/* Back Button */
.back-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    color: var(--primary-dark);
}

/* Footer Links */
.footer-links {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: center;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    text-decoration: underline;
    color: var(--secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .balance-amount {
        font-size: 36px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .balance-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .sync-status {
        text-align: left;
    }
}

/* Inactivity Warning Banner */
.inactivity-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.warning-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-weight: 600;
}

.warning-content span {
    flex: 1;
}

.warning-content .btn {
    background: rgba(255, 255, 255, 0.9);
    color: #D97706;
    white-space: nowrap;
}

.warning-content .btn:hover {
    background: white;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .warning-content {
        flex-direction: column;
        text-align: center;
    }
}
