/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark Theme Colors */
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-card: #252525;
    --bg-modal: #2a2a2a;
    --accent: #00d4ff;
    --success: #00ff88;
    --warning: #ff9500;
    --danger: #ff3b30;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #666666;
    --border: #333333;
    --border-light: #444444;
    
    /* 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: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --bg-modal: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #888888;
    --border: #e1e5e9;
    --border-light: #f1f3f4;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo i {
    font-size: 1.5rem;
    color: var(--accent);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.sidebar-menu-btn,
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-menu-btn {
    display: none;
}

.sidebar-menu-btn:hover,
.theme-toggle:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-light);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 80px;
    left: 0;
    width: 280px;
    height: calc(100vh - 80px);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    z-index: 50;
    transform: translateX(0);
    transition: transform var(--transition-normal);
    overflow-y: auto;
}

.sidebar.collapsed {
    transform: translateX(-280px);
}

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

.sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin: 0;
}

.sidebar-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

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

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

.tool-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--border);
}

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

.tool-item {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: all var(--transition-fast);
    text-align: left;
    width: 100%;
}

.tool-item:hover {
    background: var(--bg-card);
    color: var(--accent);
    transform: translateX(4px);
}

.tool-item i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.tool-item:hover i {
    opacity: 1;
}

.tool-item span {
    font-size: 0.9rem;
}

/* Main Content with Sidebar */
.main {
    margin-left: 280px;
    padding: var(--spacing-xl) 0;
    min-height: calc(100vh - 80px);
    transition: margin-left var(--transition-normal);
}

.sidebar.collapsed ~ .main {
    margin-left: 0;
}

/* Tools Modal Styles */
.tools-modal {
    width: 95%;
    max-width: 1400px;
    max-height: 95vh;
    overflow-y: auto;
    min-height: 600px;
}

/* Format Detector Modal - Extra Large */
.tools-modal.format-detector-modal {
    width: 99%;
    max-width: 1800px; /* Increased from 1600px */
    max-height: 98vh;
    min-height: 700px;
    margin: 1vh auto; /* Reduced margin */
}

/* Full Screen Modal for Remove Duplicates */
.modal-overlay.full-screen {
    padding: 0;
}

.modal-overlay.full-screen .modal {
    max-width: none;
    width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    transform: scale(1) translateY(0);
}

.modal-overlay.full-screen .modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-modal);
    border-bottom: 2px solid var(--border);
}

.modal-overlay.full-screen .modal-body {
    max-height: none;
    height: calc(100vh - 80px);
    padding: 0;
    overflow: hidden;
}

/* Professional Duplicate Remover Styles */
.duplicate-remover-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.duplicate-header {
    background: linear-gradient(135deg, var(--accent) 0%, #0099cc 100%);
    color: white;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.header-icon {
    font-size: 3rem;
    opacity: 0.9;
}

.header-text h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
}

.header-text p {
    margin: var(--spacing-xs) 0 0 0;
    opacity: 0.9;
    font-size: 1rem;
}

.duplicate-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    padding: var(--spacing-xl);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    overflow: hidden;
}

/* Input Panel */
.input-panel {
    display: flex;
    flex-direction: column;
}

.panel-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
}

.card-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: var(--spacing-xs);
    display: block;
}

.input-section {
    padding: var(--spacing-lg);
    flex: 1;
}

.input-textarea {
    width: 100%;
    height: 300px;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: all var(--transition-fast);
}

.input-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.input-stats {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.options-section {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border);
}

.options-section h4 {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.option-item:hover {
    background: var(--bg-primary);
    border-color: var(--border-light);
}

.option-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    position: relative;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    margin-top: 2px;
}

.option-item input[type="checkbox"]:checked + .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.option-item input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.option-text {
    flex: 1;
}

.option-text strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.option-text small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.3;
}

.action-buttons {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border);
    display: flex;
    gap: var(--spacing-md);
}

.btn-large {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1rem;
    font-weight: 600;
}

/* Results Panel */
.results-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.initial-state {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    text-align: center;
    max-width: 400px;
    padding: var(--spacing-xl);
}

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

.empty-state h3 {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.empty-state p {
    margin: 0 0 var(--spacing-lg) 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.feature-item i {
    color: var(--accent);
    width: 20px;
    text-align: center;
}

.results-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.section-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.result-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.btn-icon {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

/* Statistics Section */
.stats-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: var(--spacing-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    border: 1px solid var(--border);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-primary .stat-icon {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent);
}

.stat-success .stat-icon {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success);
}

.stat-danger .stat-icon {
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger);
}

.stat-warning .stat-icon {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Analysis Section */
.analysis-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: var(--spacing-lg);
    flex: 1;
    min-height: 0;
}

.analysis-content {
    height: 200px;
}

.duplicate-list {
    height: 100%;
    overflow-y: auto;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.no-duplicates {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    color: var(--success);
    font-weight: 500;
}

.duplicate-item {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 59, 48, 0.05);
    border: 1px solid rgba(255, 59, 48, 0.2);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--danger);
}

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

.duplicate-text {
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
    flex: 1;
}

.duplicate-badge {
    background: var(--danger);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.duplicate-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.duplicate-info i {
    color: var(--danger);
    opacity: 0.7;
}

/* Result Section */
.result-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: var(--spacing-lg);
    flex: 1;
    min-height: 0;
}

.result-content {
    height: 250px;
    display: flex;
    flex-direction: column;
}

.output-textarea {
    flex: 1;
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
}

.output-stats {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .duplicate-main {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .duplicate-header {
        padding: var(--spacing-md);
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .duplicate-main {
        padding: var(--spacing-md);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Tool Content Styles */
.tool-content {
    padding: var(--spacing-md) 0;
}

.tool-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.tool-input-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.tool-input-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.tool-textarea {
    width: 100%;
    min-height: 120px;
    padding: var(--spacing-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    resize: vertical;
    transition: all var(--transition-fast);
}

.tool-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.tool-result {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.tool-result h4 {
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.tool-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: var(--spacing-md) 0;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width var(--transition-normal);
}

/* QR Code Display */
.qr-display {
    text-align: center;
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) 0;
}

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

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Sidebar */
@media (max-width: 1024px) {
    .sidebar-menu-btn {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-280px);
        z-index: 50;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .tool-stats {
        grid-template-columns: 1fr;
    }
    
    .tool-actions {
        flex-direction: column;
    }
    
    .tools-modal {
        width: 98%;
        margin: var(--spacing-sm);
    }
}

/* Quick TOTP Section */
.quick-totp-section {
    margin-bottom: var(--spacing-xl);
}

.quick-totp-card {
    background: linear-gradient(135deg, var(--accent) 0%, #0099cc 100%);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.quick-totp-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.quick-totp-header {
    margin-bottom: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.quick-totp-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.quick-totp-header p {
    opacity: 0.9;
    font-size: 0.9rem;
    margin: 0;
}

.quick-totp-form {
    position: relative;
    z-index: 1;
}

.quick-input-group {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.quick-secret-input {
    flex: 1;
    padding: var(--spacing-md);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.quick-secret-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.quick-secret-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.quick-generate-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.quick-generate-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

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

.quick-totp-result {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.quick-otp-display {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.quick-otp-code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.2em;
    margin-bottom: var(--spacing-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.quick-otp-code:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.quick-otp-code.copied {
    transform: scale(1.1);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
}

.quick-otp-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.quick-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
}

.quick-copy-btn,
.quick-clear-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.quick-copy-btn:hover {
    background: rgba(0, 255, 136, 0.3);
    border-color: rgba(0, 255, 136, 0.5);
    transform: translateY(-1px);
}

.quick-clear-btn:hover {
    background: rgba(255, 59, 48, 0.3);
    border-color: rgba(255, 59, 48, 0.5);
    transform: translateY(-1px);
}

.quick-copy-btn.copied {
    background: rgba(0, 255, 136, 0.4);
    border-color: rgba(0, 255, 136, 0.6);
}

/* Responsive adjustments for Quick TOTP */
@media (max-width: 768px) {
    .quick-input-group {
        flex-direction: column;
    }
    
    .quick-generate-btn {
        justify-content: center;
    }
    
    .quick-otp-code {
        font-size: 2rem;
    }
    
    .quick-actions {
        flex-direction: column;
    }
}

.top-section {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    align-items: center;
}

.search-container {
    flex: 1;
    position: relative;
}

.search-container i {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

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

.add-account-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.add-account-btn:hover {
    background: #00b8e6;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Account Cards */
.accounts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

.account-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.account-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

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

.account-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

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

.account-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.action-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.action-btn.delete:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* OTP Display */
.otp-display {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.otp-code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.2em;
    margin-bottom: var(--spacing-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
    user-select: none;
}

.otp-code:hover {
    color: var(--accent);
}

.otp-code.copied {
    color: var(--success);
    transform: scale(1.05);
}

.otp-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.timer-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
}

.timer-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--success);
    transform-origin: center;
    transition: transform 1s linear;
}

.timer-fill.warning {
    background: var(--warning);
}

.timer-fill.danger {
    background: var(--danger);
}

/* Copy Button */
.copy-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all var(--transition-fast);
    width: 100%;
    justify-content: center;
    font-weight: 500;
}

.copy-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    grid-column: 1 / -1;
}

.empty-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

/* Buttons */
.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary:hover {
    background: #00b8e6;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--border-light);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-danger:hover {
    background: #e6342a;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    padding: var(--spacing-lg);
}

/* Reduced padding for Format Detector Modal */
.modal-overlay.format-detector-overlay {
    padding: var(--spacing-sm);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-modal);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

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

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

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

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.secret-input-container {
    position: relative;
}

.toggle-visibility {
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.toggle-visibility:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.input-help {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

.method-divider {
    text-align: center;
    margin: var(--spacing-lg) 0;
    position: relative;
}

.method-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.method-divider span {
    background: var(--bg-modal);
    color: var(--text-secondary);
    padding: 0 var(--spacing-md);
    font-size: 0.875rem;
}

.qr-methods {
    display: flex;
    gap: var(--spacing-md);
}

.qr-btn {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    transition: all var(--transition-fast);
}

.qr-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-light);
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    margin-top: var(--spacing-xl);
}

/* QR Scanner Modal */
.qr-scanner-modal {
    max-width: 600px;
}

.camera-container {
    position: relative;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

#qrVideo {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scan-frame {
    width: 200px;
    height: 200px;
    border: 2px solid var(--accent);
    border-radius: var(--radius-md);
    position: relative;
}

.scan-frame::before,
.scan-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid var(--accent);
}

.scan-frame::before {
    top: -3px;
    left: -3px;
    border-right: none;
    border-bottom: none;
}

.scan-frame::after {
    bottom: -3px;
    right: -3px;
    border-left: none;
    border-top: none;
}

.scan-instructions {
    text-align: center;
    color: var(--text-secondary);
}

/* Notifications */
.notifications-container {
    position: fixed;
    top: 140px;
    right: var(--spacing-lg);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}
.notification {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    min-width: 300px;
    transform: translateX(100%);
    transition: all var(--transition-normal);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-color: var(--success);
}

.notification.error {
    border-color: var(--danger);
}

.notification.warning {
    border-color: var(--warning);
}

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

.notification.success .notification-icon {
    color: var(--success);
}

.notification.error .notification-icon {
    color: var(--danger);
}

.notification.warning .notification-icon {
    color: var(--warning);
}

.notification-message {
    flex: 1;
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .top-section {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .search-container {
        order: 2;
    }
    
    .add-account-btn {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    
    .accounts-container {
        grid-template-columns: 1fr;
    }
    
    .otp-code {
        font-size: 2.5rem;
    }
    
    .modal {
        width: 95%;
        margin: var(--spacing-md);
    }
    
    .qr-methods {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .notifications-container {
        left: var(--spacing-sm);
        right: var(--spacing-sm);
    }
    
    .notification {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 var(--spacing-sm);
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .otp-code {
        font-size: 2rem;
        letter-spacing: 0.1em;
    }
    
    .account-card {
        padding: var(--spacing-md);
    }
    
    .modal-body {
        padding: var(--spacing-md);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-in {
    animation: slideIn 0.3s ease;
}

.pulse {
    animation: pulse 0.3s ease;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border: #666666;
        --border-light: #888888;
    }
}

/* Share Modal Styles */
.share-modal {
    max-width: 600px;
    width: 95%;
}

.share-account-info {
    margin-bottom: var(--spacing-lg);
}

.account-preview {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.account-preview .account-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent) 0%, #0099cc 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.account-details .account-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.account-details .account-issuer {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.share-option {
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.share-option h3 {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.share-option p {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.share-link-container {
    display: flex;
    gap: var(--spacing-sm);
}

.share-link {
    flex: 1;
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.copy-link-btn {
    white-space: nowrap;
    padding: var(--spacing-md) var(--spacing-lg);
}

.copy-link-btn.copied {
    background: var(--success) !important;
    color: white !important;
    border-color: var(--success) !important;
}

.qr-code-container {
    text-align: center;
}

.qr-code-placeholder {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-xl);
    background: var(--bg-primary);
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
}

.qr-placeholder {
    color: var(--text-secondary);
}

.qr-placeholder i {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.qr-placeholder p {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 1rem;
}

.qr-placeholder small {
    font-size: 0.8rem;
    word-break: break-all;
    opacity: 0.7;
}

.share-warning {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid var(--warning);
    border-radius: var(--radius-md);
    color: var(--warning);
    font-size: 0.9rem;
    line-height: 1.4;
}

.share-warning i {
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.action-btn.share {
    color: var(--accent);
}

.action-btn.share:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent);
}

/* Direct Link Highlight */
.quick-totp-highlight {
    animation: highlightPulse 2s ease-in-out;
    border: 2px solid var(--accent) !important;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3) !important;
}

@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 rgba(0, 212, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.7);
    }
    100% {
        box-shadow: 0 0 0 rgba(0, 212, 255, 0.7);
    }
}

/* Direct TOTP Modal */
.direct-totp-modal {
    z-index: 2000;
}

.direct-totp-modal-content {
    max-width: 600px;
    width: 95%;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.direct-totp-display {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.totp-key-info {
    text-align: center;
}

.totp-key-info h3 {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.key-display {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    justify-content: center;
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.key-display code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    background: none;
    padding: 0;
    letter-spacing: 2px;
}

.totp-code-display {
    text-align: center;
}

.totp-code-display h3 {
    margin: 0 0 var(--spacing-lg) 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.otp-display-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xl);
    padding: var(--spacing-2xl);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    border-radius: var(--radius-xl);
    border: 2px solid var(--border);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

.otp-code-large {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

.otp-code-large:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: scale(1.05);
}

.otp-timer-large {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-circle-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) 0deg, var(--bg-secondary) 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.timer-fill-large {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--accent) 0deg, transparent 0deg);
    transition: transform 1s linear;
    transform-origin: center;
}

.timer-fill-large.warning {
    background: conic-gradient(var(--warning) 0deg, transparent 0deg);
}

.timer-fill-large.danger {
    background: conic-gradient(var(--danger) 0deg, transparent 0deg);
}

.timer-text-large {
    position: absolute;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    z-index: 1;
}

.totp-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.totp-actions .btn-primary,
.totp-actions .btn-secondary {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all var(--transition-fast);
}

.totp-actions .btn-primary:hover,
.totp-actions .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.direct-link-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-size: 0.9rem;
    line-height: 1.4;
}

.direct-link-info i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .otp-display-large {
        flex-direction: column;
        gap: var(--spacing-lg);
        padding: var(--spacing-xl);
    }
    
    .otp-code-large {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }
    
    .timer-circle-large {
        width: 60px;
        height: 60px;
    }
    
    .timer-text-large {
        font-size: 1rem;
    }
    
    .totp-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .totp-actions .btn-primary,
    .totp-actions .btn-secondary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* Format Detector Styles */
.format-detector-container {
    padding: 0;
    width: 100%;
    max-width: none; /* Remove any width restrictions */
}

.format-detector-header {
    background: linear-gradient(135deg, var(--accent) 0%, #4facfe 100%);
    color: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin: calc(-1 * var(--spacing-xl)) calc(-1 * var(--spacing-xl)) var(--spacing-xl) calc(-1 * var(--spacing-xl));
}

.format-detector-header .header-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.format-detector-header .header-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.format-detector-header .header-text h2 {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.format-detector-header .header-text p {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
}

.format-detector-main {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Even more space to output */
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    min-height: 500px; /* Ensure minimum height */
    width: 100%; /* Full width usage */
}

.input-section,
.output-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border);
}

.input-section h3,
.output-section h3 {
    margin: 0 0 var(--spacing-lg) 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.input-group {
    margin-bottom: var(--spacing-lg);
}

.input-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    font-weight: 500;
}

.input-group textarea,
.input-group input {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color var(--transition-fast);
}

.input-group textarea:focus,
.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.separator-options {
    margin-bottom: var(--spacing-lg);
}

.separator-options label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    font-weight: 500;
}

.separator-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.separator-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.separator-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.action-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.parsed-results {
    min-height: 300px; /* Increased from 200px */
    max-height: 600px; /* Increased from 400px */
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1); /* Added inner shadow */
}

.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-secondary);
    text-align: center;
}

.no-results i {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.parsed-results-list {
    padding: var(--spacing-md);
}

.parsed-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    overflow: hidden;
}

.parsed-item:last-child {
    margin-bottom: 0;
}

.item-header {
    background: var(--bg-card);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border);
}

.item-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.item-fields {
    padding: var(--spacing-md);
}

.field-item {
    display: grid;
    grid-template-columns: 120px 1fr auto; /* Fixed label width, flexible value, auto icon */
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    transition: background-color var(--transition-fast);
}

.field-item:hover {
    background-color: rgba(0, 212, 255, 0.05);
}

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

.field-item label {
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.field-value {
    font-family: 'Courier New', monospace;
    color: var(--text-primary);
    word-break: break-all;
    background: rgba(0, 0, 0, 0.05);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    line-height: 1.4;
}

.field-2fa {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    border: 2px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.1);
    position: relative;
}

.field-2fa::before {
    content: '🔐';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.field-2fa .field-value {
    color: var(--accent);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.field-2fa i {
    color: var(--accent);
}

.result-actions {
    margin-top: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.format-detector-examples {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    border: 1px solid var(--border);
}

.format-detector-examples h3 {
    margin: 0 0 var(--spacing-lg) 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.example-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.example-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.15);
    transform: translateY(-2px);
}

.example-card h4 {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.example-input,
.example-format {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
    word-break: break-all;
}

.example-input {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.example-format {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.format-detector-tips {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border);
}

.format-detector-tips h3 {
    margin: 0 0 var(--spacing-lg) 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.format-detector-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.format-detector-tips li {
    padding: var(--spacing-sm) 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.format-detector-tips li strong {
    color: var(--text-primary);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .format-detector-main {
        grid-template-columns: 1fr;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .format-detector-header {
        padding: var(--spacing-lg);
    }
    
    .format-detector-header .header-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .format-detector-header .header-icon {
        font-size: 2rem;
    }
    
    .input-section,
    .output-section {
        padding: var(--spacing-lg);
    }
    
    .separator-buttons {
        justify-content: center;
    }
    
    .action-buttons,
    .result-actions {
        justify-content: center;
    }
}

/* Print styles */
@media print {
    .header,
    .modal-overlay,
    .notifications-container {
        display: none !important;
    }
    
    .account-card {
        break-inside: avoid;
        box-shadow: none;
        border: 2px solid #000;
    }
}
