:root {
    /* Color Palette - Modern Dark Theme */
    --bg-primary: #0a0e27;
    --bg-secondary: #151934;
    --bg-tertiary: #1e2540;
    --bg-hover: #252b4a;

    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);

    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #64748b;

    --border-color: #2d3548;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 20px;
}

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 52px;
    height: 52px;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn svg {
    width: 18px;
    height: 18px;
}

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

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

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

.btn-icon:hover {
    background: var(--bg-hover);
    transform: rotate(180deg);
}

.btn-danger:hover {
    background: var(--error);
    border-color: var(--error);
}

/* Node Selectors */
.node-selectors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.node-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    padding: 16px 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.node-selector label {
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.node-select {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.node-select:hover {
    border-color: var(--accent-primary);
}

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

/* Control Panel */
.control-panel {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: start;
}

.panel {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 320px);
    min-height: 500px;
}

.panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.filter-group {
    display: flex;
    gap: 8px;
}

.filter-input {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

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

.format-filter {
    min-width: 140px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.format-filter:hover {
    border-color: var(--accent-primary);
}

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

.item-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.item-list::-webkit-scrollbar {
    width: 10px;
}

.item-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 5px;
}

.item-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 5px;
    border: 2px solid var(--bg-secondary);
}

.item-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00e5ff, #8b4aff);
}

.item {
    padding: 16px;
    margin-bottom: 8px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

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

.item.selected {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.item-label {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-label svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.item-id {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

.item-format {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.empty-state small {
    font-size: 12px;
    opacity: 0.7;
}

/* TAKE Button */
.take-button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 0;
}

.take-button {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: none;
    background: var(--accent-gradient);
    color: white;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.4);
    position: relative;
}

.take-button::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
    filter: blur(20px);
}

.take-button:hover::before {
    opacity: 0.6;
}

.take-button:not(:disabled):hover {
    transform: scale(1.1);
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.6);
}

.take-button:not(:disabled):active {
    transform: scale(1.05);
}

.take-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    box-shadow: none;
}

.take-icon {
    width: 40px;
    height: 40px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
}

.status-link {
    color: var(--accent-primary);
    text-decoration: underline;
    font-size: 12px;
}

.status-link.hidden {
    display: none;
}

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

.connection-status.ready .status-indicator {
    background: var(--success);
}

.connection-status.active .status-indicator {
    background: var(--accent-primary);
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-large {
    max-width: 800px;
}

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

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

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 32px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
}

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

.form-group {
    padding: 24px 32px;
}

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

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

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

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 0 32px 24px;
}

.progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 32px;
    gap: 16px;
}

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

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

/* RDS Node List */
.rds-node-list {
    padding: 24px 32px;
}

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

.rds-node-list h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-secondary);
}

.select-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    user-select: none;
}

.select-all-label:hover {
    color: var(--text-primary);
}

.select-all-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

#rdsNodes {
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

#rdsNodes::-webkit-scrollbar {
    width: 10px;
}

#rdsNodes::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 5px;
}

#rdsNodes::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 5px;
    border: 2px solid var(--bg-secondary);
}

#rdsNodes::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00e5ff, #8b4aff);
}

.rds-node-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}

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

.rds-node-item:hover {
    background: var(--bg-hover);
}

.rds-node-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.rds-node-info {
    flex: 1;
}

.rds-node-label {
    font-weight: 600;
    margin-bottom: 4px;
}

.rds-node-details {
    font-size: 12px;
    color: var(--text-muted);
}

.rds-node-url {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--accent-primary);
}

.rds-add-progress {
    padding: 24px 32px;
}

.rds-add-progress h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
    text-align: center;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

#rdsProgressText {
    text-align: center;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 500;
}

.progress-details {
    max-height: 40vh;
    overflow-y: auto;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
}

.progress-details::-webkit-scrollbar {
    width: 10px;
}

.progress-details::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 5px;
}

.progress-details::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 5px;
    border: 2px solid var(--bg-secondary);
}

.progress-details::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00e5ff, #8b4aff);
}

.progress-item {
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-item.processing {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--accent-primary);
}

.progress-item.success {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.3);
    color: var(--success);
}

.progress-item.failed {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: var(--error);
}

.progress-item.skipped {
    background: rgba(255, 204, 0, 0.1);
    border: 1px solid rgba(255, 204, 0, 0.3);
    color: #ffcc00;
}

.progress-item-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.progress-item-icon.spinner-small {
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Settings */
.settings-content {
    padding: 0;
}

.settings-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-secondary);
}

.settings-tab {
    flex: 1;
    padding: 16px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.settings-tab svg {
    width: 18px;
    height: 18px;
}

.settings-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.settings-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    background: var(--bg-tertiary);
}

.settings-tab-content {
    display: none;
    padding: 24px;
}

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

/* Reset Section */
.reset-section {
    max-width: 600px;
    margin: 0 auto;
}

.reset-warning {
    background: rgba(255, 59, 48, 0.1);
    border: 2px solid rgba(255, 59, 48, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.reset-warning svg {
    width: 48px;
    height: 48px;
    color: var(--error);
    margin-bottom: 16px;
}

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

.reset-warning p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.reset-warning ul {
    text-align: left;
    margin: 16px auto;
    max-width: 300px;
    color: var(--text-secondary);
}

.reset-warning li {
    margin-bottom: 8px;
}

.reset-warning strong {
    color: var(--error);
}

.reset-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.reset-actions .btn {
    flex: 0 0 auto;
}

/* CORS */
.cors-warning {
    background: rgba(255, 204, 0, 0.12);
    border: 2px solid rgba(255, 204, 0, 0.35);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

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

.cors-warning p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.cors-warning strong {
    color: #ffcc00;
}

.cors-warning details {
    margin: 16px 0;
    text-align: left;
}

.cors-warning summary {
    cursor: pointer;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

/* About */
.about-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

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

.about-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

.about-section p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

/* How It Works Section */
.how-it-works {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.how-it-works h4 {
    margin-top: 0;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.feature-item.feature-highlight {
    border-left: 3px solid var(--accent-primary);
}

.feature-item.feature-warning {
    border-left: 3px solid #ff9800;
}

.feature-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-highlight .feature-icon {
    color: var(--accent-primary);
}

.feature-warning .feature-icon {
    color: #ff9800;
}

.feature-item strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* Architecture Diagram */
.architecture-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.arch-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.arch-node svg {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
}

.arch-node span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.arch-arrow {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.arch-arrow svg {
    width: 32px;
    height: 16px;
    color: var(--accent-secondary);
}

@media (max-width: 768px) {
    .architecture-diagram {
        flex-direction: column;
        gap: 12px;
    }

    .arch-arrow {
        flex-direction: row;
        transform: rotate(90deg);
    }
}

.about-section ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.about-section ul li {
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.6;
    padding-left: 0;
}

.about-links li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.about-links li:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.link-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    opacity: 0.8;
}

.github-icon {
    color: var(--accent-primary);
}

.user-icon {
    color: var(--accent-secondary);
}

.globe-icon {
    color: #00e5ff;
}

.external-icon {
    width: 14px;
    height: 14px;
    margin-left: 4px;
    opacity: 0.6;
    vertical-align: middle;
    transition: opacity 0.2s ease;
}

.about-section a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.about-links li a + a {
    font-size: 12px;
    opacity: 0.7;
    margin-left: auto;
}

.about-links li a + a .external-icon {
    width: 12px;
    height: 12px;
}

.about-section a:hover {
    color: var(--accent-secondary);
}

.about-section a:hover .external-icon {
    opacity: 1;
}

/* Support Section */
.support-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.support-text {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
    font-style: italic;
}

.support-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0070ba, #1ab7ea);
    color: white !important;
    border-radius: 24px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 112, 186, 0.3);
}

.support-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 112, 186, 0.5);
    background: linear-gradient(135deg, #005ea6, #1ab7ea);
}

.paypal-icon {
    width: 20px;
    height: 20px;
    color: white;
}

.cors-command {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin: 16px 0;
    overflow: hidden;
    text-align: left;
}

.cors-command-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

.cors-command-body {
    margin: 0;
    padding: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    color: var(--accent-primary);
    background: var(--bg-primary);
}

.copy-btn {
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--bg-hover);
}

/* History */
.history-list {
    max-height: 60vh;
    overflow-y: auto;
}

.history-list::-webkit-scrollbar {
    width: 10px;
}

.history-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 5px;
}

.history-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 5px;
    border: 2px solid var(--bg-secondary);
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00e5ff, #8b4aff);
}

.history-item {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

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

.history-time {
    font-size: 12px;
    color: var(--text-muted);
}

.history-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.history-status.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.history-status.failed {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.history-details {
    font-size: 13px;
    color: var(--text-secondary);
}

.history-details-btn {
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
}

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

.history-details-btn svg {
    width: 14px;
    height: 14px;
    transition: var(--transition);
}

.history-json {
    margin-top: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.json-section {
    margin-bottom: 16px;
}

.json-section:last-child {
    margin-bottom: 0;
}

.json-section h4 {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.json-code {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 11px;
    color: var(--accent-primary);
    overflow-x: auto;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
}

.json-code::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.json-code::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 5px;
}

.json-code::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 5px;
    border: 2px solid var(--bg-secondary);
}

.json-code::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00e5ff, #8b4aff);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    animation: toastSlideIn 0.3s ease-out;
}

.toast.active {
    display: flex;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.info {
    border-left: 4px solid var(--info);
}

/* CORS Alert */
.cors-alert {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: #3a0b0b;
    border: 2px solid #ff4d4d;
    color: #ffd6d6;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    z-index: 2001;
    cursor: pointer;
}

.cors-alert.hidden {
    display: none;
}

.cors-alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.cors-alert-close {
    background: transparent;
    border: none;
    color: #ffd6d6;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 1200px) {
    .control-panel {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .take-button-container {
        order: 2;
        padding: 20px 0;
    }

    .senders-panel {
        order: 1;
    }

    .receivers-panel {
        order: 3;
    }

    .panel {
        height: 400px;
    }

    .node-selectors {
        grid-template-columns: 1fr;
    }
}

/* Accordion */
.accordion-item {
    margin-top: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
}

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

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.accordion-header:hover {
    background: var(--bg-tertiary);
}

.accordion-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.accordion-header.active .accordion-icon {
    transform: rotate(90deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-content.active {
    max-height: 1000px;
}

.accordion-content > * {
    padding: 0 16px 16px 16px;
}

/* Privacy Policy */
.privacy-content {
    padding-top: 8px;
}

.privacy-content h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 8px;
}

.privacy-content p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.privacy-content ul {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 12px;
}

.privacy-content ul li {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 6px;
}

.privacy-content a {
    color: var(--accent-primary);
    text-decoration: underline;
}

.privacy-updated {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-style: italic;
}

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--accent-primary);
    padding: 20px;
    z-index: 10000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
}

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

.cookie-consent.hidden {
    display: none;
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text p {
    color: var(--text-primary);
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-learn-more {
    color: var(--accent-primary);
    text-decoration: underline;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.cookie-learn-more:hover {
    color: var(--accent-secondary);
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.btn-cookie {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cookie-decline {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

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

.btn-cookie-accept {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 2px 8px rgba(0, 229, 255, 0.3);
}

.btn-cookie-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 229, 255, 0.5);
}

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

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }

    .btn-cookie {
        flex: 1;
    }
}
