/* Onyx and Onions - Tor Section Styling */
.onions-section {
    position: relative;
    padding: 5rem 0;
    background: linear-gradient(180deg, 
        rgba(10, 10, 10, 0) 0%, 
        rgba(139, 92, 246, 0.02) 50%, 
        rgba(10, 10, 10, 0) 100%
    );
    overflow: hidden;
}

.onions-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(139, 92, 246, 0.5) 50%, 
        transparent 100%
    );
    animation: scan-horizontal 8s linear infinite;
}

@keyframes scan-horizontal {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

.onions-section__scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(139, 92, 246, 0.8) 50%,
        transparent 100%
    );
    animation: scan-line 3s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes scan-line {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.onions-section__header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 2rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-indicator__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00ff00;
    animation: pulse-dot 2s ease-in-out infinite;
}

.status-indicator__dot--active {
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.8); }
}

.status-indicator__text {
    color: #00ff00;
}

.onions-section__title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin: 1rem 0;
    color: #e5e5e5;
    letter-spacing: -0.02em;
}

.onions-section__subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: rgba(139, 92, 246, 0.8);
    margin: 0;
}

/* Terminal Interface */
.onions-access-terminal {
    background: #0a0a0a;
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 
        0 0 20px rgba(139, 92, 246, 0.1),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(90deg, 
        rgba(26, 26, 26, 0.9) 0%, 
        rgba(26, 26, 26, 0.7) 100%
    );
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.terminal-header__dots {
    display: flex;
    gap: 0.5rem;
}

.terminal-header__dots i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.terminal-header__dots i:nth-child(1) { background: #ff5f57; }
.terminal-header__dots i:nth-child(2) { background: #ffbd2e; }
.terminal-header__dots i:nth-child(3) { background: #28ca42; }

.terminal-header__title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: #8b5cf6;
    flex: 1;
    text-align: center;
}

.terminal-header__status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #00ff00;
    padding: 0.125rem 0.5rem;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 3px;
}

.terminal-body {
    padding: 1.5rem;
    min-height: 400px;
    background: rgba(10, 10, 10, 0.5);
}

.terminal-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: #e5e5e5;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-line--dim {
    opacity: 0.5;
}

.terminal-prompt {
    color: #00ff00;
    user-select: none;
}

.terminal-command {
    color: #8b5cf6;
}

/* Onion Address Display */
.onion-address-display {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 6px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

.onion-address-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.onion-prefix {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #8b5cf6;
    padding: 0.25rem 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.onion-address {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #e5e5e5;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: 4px;
    word-break: break-all;
    user-select: all;
    cursor: text;
    transition: all 0.2s ease;
}

.onion-address:hover {
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.onion-loading {
    color: rgba(139, 92, 246, 0.7);
    animation: pulse-text 1.5s ease-in-out infinite;
}

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

.onion-copy {
    padding: 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 4px;
    color: #e5e5e5;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onion-copy:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
    transform: translateY(-1px);
}

.onion-copy[data-state="copied"] {
    background: rgba(0, 255, 0, 0.1);
    border-color: rgba(0, 255, 0, 0.3);
}

.onion-metadata {
    display: flex;
    gap: 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: rgba(229, 229, 229, 0.6);
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metadata-value {
    color: #8b5cf6;
    font-weight: 600;
}

.metadata-value--active {
    color: #00ff00;
}

/* Info Grid */
.terminal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.info-block {
    background: rgba(26, 26, 26, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-radius: 6px;
    padding: 1rem;
}

.info-block__header {
    margin-bottom: 0.75rem;
}

.info-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #8b5cf6;
    letter-spacing: 0.05em;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    color: rgba(229, 229, 229, 0.8);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bullet {
    color: rgba(139, 92, 246, 0.5);
}

/* Log Stream */
.log-stream {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: rgba(229, 229, 229, 0.5);
    margin-top: 0.5rem;
}

.log-line {
    margin: 0.25rem 0;
    opacity: 0;
    animation: fade-in 0.5s ease-in-out forwards;
}

.log-line:nth-child(2) { animation-delay: 0.5s; }
.log-line:nth-child(3) { animation-delay: 1s; }

@keyframes fade-in {
    to { opacity: 1; }
}

/* Philosophy Section */
.onions-philosophy {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(139, 92, 246, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.philosophy-quote {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.125rem;
    font-style: normal;
    color: rgba(229, 229, 229, 0.9);
    margin: 0 auto;
    max-width: 600px;
    line-height: 1.6;
}

.philosophy-context {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: rgba(139, 92, 246, 0.7);
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Error state */
.onion-error {
    color: #ff5f57;
    font-style: italic;
}

.metadata-value--error {
    color: #ff5f57 !important;
}

/* Terminal cursor animation */
.terminal-cursor {
    color: #00ff00;
    animation: blink-cursor 1s step-end infinite;
    margin-left: 0.25rem;
    font-weight: normal;
}

@keyframes blink-cursor {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Address revealed animation */
.address-revealed {
    animation: glow-reveal 1s ease-out;
}

@keyframes glow-reveal {
    0% { box-shadow: none; }
    50% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.5); }
    100% { box-shadow: none; }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .onions-section__title {
        font-size: 2rem;
    }
    
    .terminal-info-grid {
        grid-template-columns: 1fr;
    }
    
    .onion-address-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .onion-copy {
        width: 100%;
    }
    
    .onion-metadata {
        flex-direction: column;
        gap: 0.5rem;
    }
}