/**
 * GhostMail Protocol - Main Stylesheet
 * User-friendly light theme with good visibility
 */

/* ===== CSS Variables ===== */
:root {
    /* Colors - Light Theme (Default) */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    
    /* Accent Colors - Emerald Green */
    --accent-primary: #059669;
    --accent-secondary: #047857;
    --accent-tertiary: #065f46;
    --accent-light: #d1fae5;
    --accent-glow: rgba(5, 150, 105, 0.2);
    
    /* Semantic Colors */
    --color-success: #059669;
    --color-warning: #d97706;
    --color-danger: #dc2626;
    --color-info: #0891b2;
    
    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --text-muted: #94a3b8;
    
    /* Border Colors */
    --border-color: #e2e8f0;
    --border-light: #cbd5e1;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px var(--accent-glow);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Prevent text selection on UI elements */
button, .btn, .tab-btn, .settings-item {
    user-select: none;
    -webkit-user-select: none;
}

/* ===== Screens ===== */
.screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    overflow-y: auto;
    z-index: 1;
}

.screen.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn var(--transition-normal);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== Loading Screen ===== */
#loading-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.loading-content {
    text-align: center;
    padding: var(--spacing-xl);
}

.ghost-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
    animation: ghostFloat 2s ease-in-out infinite;
}

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

.loading-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    font-family: var(--font-mono);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    margin: 0 auto var(--spacing-lg);
    animation: spin 1s linear infinite;
}

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

.loading-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===== Welcome Screen ===== */
#welcome-screen {
    justify-content: center;
    align-items: center;
    padding: var(--spacing-xl);
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.welcome-content {
    text-align: center;
    max-width: 420px;
    width: 100%;
}

.ghost-large {
    font-size: 5rem;
    margin-bottom: var(--spacing-lg);
    animation: ghostFloat 3s ease-in-out infinite;
}

.welcome-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.welcome-tagline {
    color: var(--accent-primary);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-xl);
    font-weight: 500;
}

.welcome-features {
    margin-bottom: var(--spacing-xl);
    text-align: left;
}

.feature {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.feature:hover {
    background: var(--accent-light);
    border-color: var(--accent-primary);
    color: var(--accent-tertiary);
}

.feature-icon {
    font-size: 1.5rem;
}

.welcome-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    font-family: var(--font-sans);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-secondary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

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

.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
}

.btn-icon {
    padding: var(--spacing-sm);
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
    border-color: var(--border-color);
}

.btn-icon span {
    font-size: 1.25rem;
}

.btn-large {
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: 1.05rem;
}

.btn-small {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

.btn-icon .btn-icon {
    font-size: 1.1rem;
}

/* ===== Seed Screen ===== */
#seed-screen {
    padding: var(--spacing-xl);
    overflow-y: auto;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.seed-content {
    max-width: 500px;
    margin: 0 auto;
}

.screen-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    text-align: center;
    color: var(--text-primary);
}

.screen-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-size: 0.9rem;
}

.seed-warning {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    color: #92400e;
    font-size: 0.9rem;
    font-weight: 500;
}

.warning-icon {
    font-size: 1.5rem;
}

.seed-words {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.seed-word {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.seed-word .number {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
}

.seed-word .word {
    color: var(--accent-primary);
    font-weight: 600;
}

.seed-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.seed-verify {
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-color);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

.verify-text {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.input-verify {
    text-align: center;
    font-size: 1.25rem;
    font-family: var(--font-mono);
    margin-bottom: var(--spacing-md);
}

/* ===== Restore Screen ===== */
#restore-screen {
    padding: var(--spacing-xl);
    overflow-y: auto;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.restore-content {
    max-width: 500px;
    margin: 0 auto;
}

.textarea-seed {
    min-height: 120px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.restore-actions {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.input, .textarea, .select {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.input:focus, .textarea:focus, .select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input::placeholder, .textarea::placeholder {
    color: var(--text-muted);
}

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

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===== App Header ===== */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: var(--accent-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-primary);
    font-size: 1.5rem;
}

.avatar-ghost {
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-id {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.9); }
}

.header-right {
    display: flex;
    gap: var(--spacing-sm);
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* ===== Tab Navigation ===== */
.tab-nav {
    display: flex;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 var(--spacing-md);
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.tab-btn:hover {
    color: var(--text-secondary);
    background: var(--bg-hover);
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    background: var(--accent-light);
}

.tab-icon {
    font-size: 1.2rem;
}

.tab-badge {
    background: var(--accent-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

/* ===== Main Content ===== */
.app-main {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px;
    background: var(--bg-primary);
}

.tab-content {
    display: none;
    padding: var(--spacing-lg);
    animation: fadeIn var(--transition-normal);
}

.tab-content.active {
    display: block;
}

/* ===== Inbox ===== */
.inbox-empty {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-tertiary);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.6;
}

.inbox-empty h3 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

.inbox-empty p {
    font-size: 0.9rem;
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.message-item {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.message-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.message-item.ephemeral {
    border-left: 4px solid var(--color-warning);
    background: #fffbeb;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
}

.message-from {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.message-preview {
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-meta-icons {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.meta-icon {
    font-size: 0.75rem;
    padding: 3px 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ===== Compose ===== */
.compose-form {
    max-width: 600px;
    margin: 0 auto;
}

.textarea-compose {
    min-height: 200px;
    font-family: var(--font-sans);
    line-height: 1.6;
}

.security-options {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.options-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

.option-group {
    margin-bottom: var(--spacing-md);
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.timer-options {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-sm);
}

.timer-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.timer-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.timer-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.selected-timer {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.compose-actions {
    margin-top: var(--spacing-lg);
}

/* ===== Message View ===== */
#message-screen {
    background: var(--bg-primary);
}

.burn-timer {
    display: flex;
    justify-content: center;
    padding: var(--spacing-lg);
    background: linear-gradient(180deg, #fef2f2 0%, transparent 100%);
}

.timer-ring {
    position: relative;
    width: 80px;
    height: 80px;
}

.timer-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.timer-bg {
    fill: none;
    stroke: #fecaca;
    stroke-width: 3;
}

.timer-progress {
    fill: none;
    stroke: var(--color-danger);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 1s linear;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-danger);
}

.message-content {
    padding: var(--spacing-lg);
}

.message-meta {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.meta-row {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.meta-row:last-child {
    margin-bottom: 0;
}

.meta-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    min-width: 80px;
    font-weight: 500;
}

.meta-value {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.message-body {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    min-height: 200px;
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
}

/* ===== GhostID ===== */
.ghostid-content {
    padding: var(--spacing-lg);
    max-width: 500px;
    margin: 0 auto;
}

.ghostid-intro {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.ghostid-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.ghostid-intro h2 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.ghostid-intro p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.ghostid-tabs {
    display: flex;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
    border: 2px solid var(--border-color);
}

.ghostid-tab {
    flex: 1;
    padding: var(--spacing-md);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.ghostid-tab:hover {
    color: var(--text-primary);
}

.ghostid-tab.active {
    background: var(--accent-primary);
    color: white;
}

.ghostid-tab-content {
    display: none;
}

.ghostid-tab-content.active {
    display: block;
}

.qr-scanner-placeholder {
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-color);
}

.scanner-frame {
    width: 200px;
    height: 200px;
    margin: 0 auto var(--spacing-lg);
    position: relative;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}

.scanner-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: var(--accent-primary);
    border-style: solid;
    border-width: 0;
}

.scanner-corner.tl {
    top: 10px;
    left: 10px;
    border-top-width: 3px;
    border-left-width: 3px;
    border-top-left-radius: 5px;
}

.scanner-corner.tr {
    top: 10px;
    right: 10px;
    border-top-width: 3px;
    border-right-width: 3px;
    border-top-right-radius: 5px;
}

.scanner-corner.bl {
    bottom: 10px;
    left: 10px;
    border-bottom-width: 3px;
    border-left-width: 3px;
    border-bottom-left-radius: 5px;
}

.scanner-corner.br {
    bottom: 10px;
    right: 10px;
    border-bottom-width: 3px;
    border-right-width: 3px;
    border-bottom-right-radius: 5px;
}

.scanner-line {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--accent-primary);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% { top: 20%; }
    50% { top: 80%; }
    100% { top: 20%; }
}

.qr-video {
    width: 100%;
    max-width: 300px;
    border-radius: var(--radius-lg);
}

.connected-apps {
    margin-top: var(--spacing-xl);
}

.connected-apps h4 {
    font-size: 0.95rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    font-weight: 600;
}

.connected-list {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-md);
    border: 2px solid var(--border-color);
}

.connected-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.connected-item:last-child {
    border-bottom: none;
}

.empty-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: var(--spacing-lg);
}

/* ===== Settings ===== */
.settings-content {
    padding: var(--spacing-lg);
    max-width: 600px;
    margin: 0 auto;
}

.settings-section {
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
}

.settings-item.danger {
    border-color: #fecaca;
    background: #fef2f2;
}

.settings-item:hover {
    border-color: var(--accent-primary);
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.item-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.item-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.item-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--bg-tertiary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.item-value.truncated {
    white-space: nowrap;
}

.danger-zone {
    border-top: 2px solid #fecaca;
    padding-top: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.danger-zone .section-title {
    color: var(--color-danger);
}

/* ===== Floating Action Button ===== */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--accent-primary);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transition: var(--transition-fast);
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg), 0 0 30px var(--accent-glow);
}

/* ===== Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn var(--transition-fast);
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp var(--transition-normal);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-color);
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.toast {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    animation: toastIn var(--transition-normal);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 500;
}

.toast.success {
    border-color: var(--color-success);
    background: #d1fae5;
    color: #065f46;
}

.toast.error {
    border-color: var(--color-danger);
    background: #fef2f2;
    color: #991b1b;
}

.toast.warning {
    border-color: var(--color-warning);
    background: #fef3c7;
    color: #92400e;
}

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

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

/* ===== Responsive ===== */
@media (max-width: 480px) {
    :root {
        --spacing-lg: 1rem;
        --spacing-xl: 1.5rem;
    }
    
    .welcome-title {
        font-size: 1.5rem;
    }
    
    .seed-words {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tab-label {
        display: none;
    }
    
    .message-header {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .timer-options {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== Utility Classes ===== */
.hidden {
    display: none !important;
}

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

.text-muted {
    color: var(--text-muted);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
