* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 24px;
    max-width: 800px;
    width: 100%;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.header-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 10px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    grid-column: 2;
}

.logo-icon {
    font-size: 2em;
    animation: pulse 2s infinite;
}

.logo-text {
    font-size: 2em;
    font-weight: 700;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    color: #6b7280;
    font-size: 0.95em;
}

/* 2FA Button */
.btn-2fa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9em;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    justify-self: end;
    grid-column: 3;
}

.btn-2fa::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-2fa:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-2fa:hover::before {
    left: 100%;
}

.btn-2fa:active {
    transform: translateY(0);
}

.btn-2fa-icon {
    font-size: 1.2em;
    animation: pulse 2s ease-in-out infinite;
}

.btn-2fa-text {
    letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Input Section */
.input-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.input-section label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.label-icon {
    font-size: 1.2em;
}

.textarea-wrapper {
    position: relative;
    display: flex;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
}

.textarea-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.line-numbers {
    background: #f3f4f6;
    color: #9ca3af;
    padding: 12px 8px;
    text-align: right;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.6;
    user-select: none;
    min-width: 30px;
    overflow-y: hidden;
    white-space: pre-line;
}

textarea {
    flex: 1;
    padding: 12px;
    border: none;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
    background: transparent;
    letter-spacing: 0.3px;
}

textarea:focus {
    outline: none;
}

/* Buttons - Redesigned */
.action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    align-items: center;
}

.btn-primary, .btn-secondary, .btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-height: 44px;
}

/* Primary Buttons - Main actions */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-start {
    min-width: 120px;
}

.btn-stop {
    min-width: 120px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.btn-stop:hover {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Secondary Buttons - Icon only */
.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    width: 44px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 1.2em;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

#refreshBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Danger Button */
.btn-danger {
    background: #fef2f2;
    color: #dc2626;
    width: 44px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.1);
    font-size: 1.2em;
}

.btn-danger:hover {
    background: #fee2e2;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

/* Dark mode adjustments */
body.dark-mode .btn-secondary {
    background: rgba(71, 85, 105, 0.5);
    color: #cbd5e1;
}

body.dark-mode .btn-secondary:hover {
    background: rgba(71, 85, 105, 0.7);
}

body.dark-mode .btn-danger {
    background: rgba(220, 38, 38, 0.1);
    color: #f87171;
}

body.dark-mode .btn-danger:hover {
    background: rgba(220, 38, 38, 0.2);
}

/* Codes Display */
.codes-display {
    background: #fafafa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.codes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
}

.codes-header h3 {
    color: #1f2937;
    font-size: 1.05em;
    font-weight: 700;
}

.timer {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #6b7280;
    font-size: 0.9em;
}

.timer-icon {
    animation: rotate 30s linear infinite;
}

/* Codes List */
.codes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

/* Xóa duplicate style - sử dụng code-item style ở phía dưới */

.line-number {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #6b7280;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8em;
    min-width: 28px;
    text-align: center;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.code-secret {
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    color: #6b7280;
    min-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.code-value {
    font-family: 'Courier New', monospace;
    font-size: 1.3em;
    font-weight: 700;
    color: #667eea;
    letter-spacing: 2px;
}

/* Horizontal Layout */
body.horizontal-layout .container {
    max-width: 1400px;
}

body.horizontal-layout .main-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    align-items: start;
}

body.horizontal-layout .codes-display {
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

body.horizontal-layout .codes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
    flex: 1;
}

body.horizontal-layout .code-item {
    min-width: 0;
}

body.horizontal-layout .code-secret {
    min-width: auto;
    max-width: 180px;
}

.copy-single {
    padding: 10px 16px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    min-height: 40px;
}

.copy-single:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.copy-single.copied {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

/* Status styles */
.code-item.status-success {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 253, 244, 0.95) 100%);
}

.code-item.status-error {
    border-color: rgba(239, 68, 68, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(254, 242, 242, 0.95) 100%);
}

.code-item.status-waiting {
    opacity: 0.7;
}

.code-item.status-fetching {
    border-color: rgba(245, 158, 11, 0.3);
    animation: pulse 1s ease-in-out infinite;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    min-height: 24px;
    flex: 1;
    overflow: hidden;
}

.status-icon {
    font-size: 1.3em;
    line-height: 1;
    display: flex;
    align-items: center;
}

.code-url {
    font-size: 0.9em;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 0 1 auto;
    max-width: 150px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    letter-spacing: 0.5px;
    font-weight: 500;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

.last-checked {
    font-size: 0.75em;
    color: #9ca3af;
    line-height: 1;
    display: flex;
    align-items: center;
}

.code-message {
    font-size: 0.85em;
    color: #374151;
    background: rgba(243, 244, 246, 0.8);
    padding: 6px 10px;
    border-radius: 6px;
    line-height: 1.3;
    display: inline-flex;
    align-items: center;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.code-error {
    font-size: 0.85em;
    color: #ef4444;
    background: rgba(254, 226, 226, 0.5);
    padding: 6px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

.code-display {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
    flex-shrink: 0;
    margin-left: auto;
}

.code-value {
    display: flex;
    align-items: center;
    line-height: 1;
    min-width: 80px;
    justify-content: center;
}

.code-value.code-empty {
    color: #9ca3af;
}

.btn-stop {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-stop:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.btn-stop:active {
    transform: translateY(-1px) scale(0.98);
}

/* Empty State */
.empty-message {
    text-align: center;
    padding: 60px 40px;
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.empty-message p {
    max-width: 400px;
    line-height: 1.6;
}

.empty-icon {
    font-size: 3.5em;
    display: block;
    margin-bottom: 16px;
}

/* Empty state trong horizontal layout - căn giữa hoàn hảo */
body.horizontal-layout .empty-message {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
}

/* Settings Section */
.settings-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.toggle-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 24px;
    position: relative;
    transition: background 0.3s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
}

input[type="checkbox"]:checked + .toggle-slider {
    background: #667eea;
}

input[type="checkbox"]:checked + .toggle-slider::after {
    transform: translateX(20px);
}

input[type="checkbox"] {
    display: none;
}

.toggle-text {
    color: #6b7280;
    font-size: 0.85em;
    font-weight: 500;
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideIn {
    from { 
        transform: translateY(-20px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-20px);
        opacity: 0;
    }
}

.pulse {
    animation: pulse 0.5s ease-in-out;
}

/* Code item base styles */
.code-item {
    background: white;
    padding: 16px;
    padding-left: 52px;
    padding-right: 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
    position: relative;
    min-height: 72px;
    overflow: hidden;
    max-width: 100%;
}

.code-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.codes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.code-value {
    font-family: 'Courier New', monospace;
    font-size: 1.3em;
    font-weight: 700;
    color: #667eea;
    letter-spacing: 2px;
}

/* View message button */
.view-message-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.view-message-btn:hover {
    background: #667eea;
    border-color: #667eea;
    transform: scale(1.05);
}

/* Popup styles */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s;
}

.popup-overlay.show {
    opacity: 1;
}

.message-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s;
}

.message-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.popup-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #1f2937;
}

.popup-close {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #6b7280;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s;
}

.popup-close:hover {
    color: #ef4444;
    transform: rotate(90deg);
}

.popup-content {
    padding: 20px;
}

.message-text {
    background: #f3f4f6;
    padding: 20px;
    border-radius: 12px;
    font-size: 1.05em;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 20px;
    word-wrap: break-word;
}

.highlight-code {
    background: #fef3c7;
    color: #d97706;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
}

.popup-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-copy-message, .btn-copy-code {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95em;
}

.btn-copy-message {
    background: #10b981;
    color: white;
}

.btn-copy-message:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-copy-code {
    background: #667eea;
    color: white;
}

.btn-copy-code:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .header-top {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 12px;
    }
    
    .logo {
        grid-column: 1;
        grid-row: 1;
    }
    
    .btn-2fa {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
        font-size: 0.85em;
        padding: 8px 16px;
    }
    
    .logo-text {
        font-size: 1.5em;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
    
    .btn-primary {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .btn-secondary, .btn-danger {
        flex: 1;
    }
    
    .code-secret {
        min-width: auto;
        font-size: 0.75em;
    }
    
    body.horizontal-layout .main-content {
        grid-template-columns: 1fr;
    }
    
    body.horizontal-layout .codes-list {
        grid-template-columns: 1fr;
    }
    
    /* Ẩn message khi màn hình nhỏ để giữ layout 1 hàng */
    .code-message,
    .code-error {
        display: none;
    }
    
    .code-item {
        min-height: 60px;
        padding: 12px;
        padding-left: 48px;
    }
    
    .line-number {
        left: 10px;
        font-size: 0.75em;
        padding: 3px 6px;
    }
    
    .code-url {
        font-size: 0.8em;
        max-width: 120px;
    }
    
    .api-badge {
        font-size: 0.65em;
        padding: 2px 6px;
    }
    
    .last-checked {
        display: none;
    }
}

@media (max-width: 480px) {
    .code-info {
        gap: 8px;
    }
    
    .code-value {
        font-size: 1.2em;
        letter-spacing: 2px;
    }
    
    .copy-single {
        padding: 8px 12px;
        font-size: 1em;
        min-height: 36px;
    }
    
    .line-numbers {
        padding: 12px 4px;
        min-width: 25px;
        font-size: 12px;
    }
    
    .line-number {
        padding: 3px 6px;
        font-size: 0.7em;
    }
    
    .message-popup {
        width: 95%;
        max-width: 400px;
    }
    
    .view-message-btn {
        font-size: 0.9em;
        padding: 4px 6px;
    }
    
    .code-url {
        font-size: 0.75em;
        max-width: 100px;
    }
    
    .code-display {
        gap: 8px;
    }
    
    .status-icon {
        font-size: 1.1em;
    }
}

/* Additional improvements */
.code-value {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.4em;
    font-weight: 800;
    letter-spacing: 3px;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
    line-height: 1;
    display: flex;
    align-items: center;
}

.code-value.code-empty {
    background: #e5e7eb;
    -webkit-text-fill-color: #9ca3af;
}

/* Success animation */
.code-item.status-success {
    animation: successGlow 1s ease-out;
}

@keyframes successGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(16, 185, 129, 0.2);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Enhanced copy button */
.copy-single {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 0.95em;
}

.copy-single:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Enhanced status icon */
.status-icon {
    font-size: 1.3em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Auto refresh indicator */
.interval-indicator {
    font-size: 0.8em;
    font-weight: 600;
    padding: 4px 10px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.pause-dot {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

body.dark-mode .interval-indicator {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Dark mode */
body.dark-mode {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

body.dark-mode .container {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(71, 85, 105, 0.3);
}

body.dark-mode .input-section,
body.dark-mode .codes-display {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.8) 100%);
    border-color: rgba(71, 85, 105, 0.3);
}

body.dark-mode .code-item {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(71, 85, 105, 0.3);
}

body.dark-mode .code-item:hover {
    border-color: rgba(102, 126, 234, 0.5);
}

body.dark-mode .line-number {
    background: rgba(71, 85, 105, 0.3);
    color: #94a3b8;
}

body.dark-mode .api-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

body.dark-mode .code-url,
body.dark-mode .last-checked,
body.dark-mode .toggle-text,
body.dark-mode .tagline {
    color: #94a3b8;
}

body.dark-mode .code-message,
body.dark-mode .message-text {
    background: rgba(71, 85, 105, 0.3);
    color: #cbd5e1;
}

body.dark-mode .empty-message {
    color: #64748b;
}

body.dark-mode .message-popup {
    background: #1e293b;
    border: 1px solid rgba(71, 85, 105, 0.5);
}

body.dark-mode .popup-header {
    border-color: rgba(71, 85, 105, 0.5);
}

body.dark-mode .popup-header h3 {
    color: #e2e8f0;
}

body.dark-mode .popup-close {
    color: #94a3b8;
}

body.dark-mode textarea {
    background: rgba(30, 41, 59, 0.5);
    color: #e2e8f0;
}

body.dark-mode .line-numbers {
    background: rgba(71, 85, 105, 0.3);
    color: #64748b;
}

body.dark-mode label {
    color: #cbd5e1;
}

body.dark-mode h3 {
    color: #e2e8f0;
}

body.dark-mode .view-message-btn {
    background: rgba(71, 85, 105, 0.3);
    border-color: rgba(71, 85, 105, 0.5);
}

body.dark-mode .view-message-btn:hover {
    background: #667eea;
    border-color: #667eea;
}

body.dark-mode .copy-single {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.5) 0%, rgba(51, 65, 85, 0.5) 100%);
    border-color: rgba(71, 85, 105, 0.5);
}

body.dark-mode .btn-2fa {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

body.dark-mode .btn-2fa:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Toast Notification - Nhẹ nhàng hơn */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(16, 185, 129, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

body.dark-mode .toast-notification {
    background: rgba(16, 185, 129, 0.9);
} 