/* ========================================
   MARKET.SOCKETKILL.COM - Terminal Aesthetic
   ======================================== */

/* === CSS VARIABLES === */
:root {
    --neon-green: #3fb950;
    --dark-bg: #0d1117;
    --glass-bg: rgba(10, 12, 16, 0.85);
}

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

@keyframes power-flicker {
    0%, 95% { opacity: 1; filter: brightness(1); }
    96% { opacity: 0.85; filter: brightness(0.7); }
    97% { opacity: 1; filter: brightness(1.2); }
    98% { opacity: 0.9; filter: brightness(0.8); }
    100% { opacity: 1; filter: brightness(1); }
}

::selection {
    background: rgba(63, 185, 80, 0.3);
    color: #ffffff;
}

/* === SCANLINES OVERLAY === */
.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9999;
    opacity: 0.6;
}

/* === CONTAINER === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 60px);
}

/* === HEADER === */
.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(63, 185, 80, 0.3);
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-prompt {
    color: rgba(63, 185, 80, 0.7);
    font-size: 1rem;
}

.terminal-status {
    color: var(--neon-green);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(63, 185, 80, 0.5);
}

.site-title {
    color: var(--neon-green);
    font-size: 1.2rem;
    letter-spacing: 3px;
    text-shadow: 0 0 8px rgba(63, 185, 80, 0.6);
}

.clock {
    color: rgba(63, 185, 80, 0.6);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* === SEARCH BAR === */
.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(10, 12, 16, 0.9);
    border: 1px solid rgba(63, 185, 80, 0.3);
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 30px;
}

.search-container .prompt {
    color: rgba(63, 185, 80, 0.7);
    font-size: 1.2rem;
}

#item-search {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--neon-green);
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    letter-spacing: 1px;
}

#item-search::placeholder {
    color: rgba(63, 185, 80, 0.3);
}

/* === MAIN CONTENT GRID === */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* === ITEM DISPLAY === */
.item-display {
    background: rgba(10, 12, 16, 0.9);
    border: 1px solid rgba(63, 185, 80, 0.2);
    border-radius: 8px;
    padding: 30px;
}

.item-header {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(63, 185, 80, 0.2);
}

.item-icon-container {
    width: 128px;
    height: 128px;
    background: #000;
    border: 1px solid rgba(63, 185, 80, 0.3);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

#item-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item-info {
    flex: 1;
}

#item-name {
    color: #f0f6fc;
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-shadow: 0 0 5px rgba(63, 185, 80, 0.3);
}

#item-id {
    color: rgba(63, 185, 80, 0.6);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* === HUB PRICES === */
.hub-prices {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hub-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(63, 185, 80, 0.2);
    border-radius: 4px;
    transition: all 0.2s;
    animation: hub-idle-pulse 8s ease-in-out infinite;
}

.hub-row:hover {
    background: rgba(63, 185, 80, 0.05);
    border-color: rgba(63, 185, 80, 0.4);
}

.hub-name {
    color: #58a6ff;
    font-size: 0.9rem;
    letter-spacing: 2px;
    font-weight: bold;
}

.hub-price {
    color: var(--neon-green);
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(63, 185, 80, 0.4);
}

/* Highlight cheapest hub */
.hub-row.cheapest {
    border-color: rgba(63, 185, 80, 0.6);
    box-shadow: 0 0 10px rgba(63, 185, 80, 0.2);
}

.beta-badge {
    display: inline-block;
    font-size: 0.5rem;
    padding: 3px 8px;
    margin-left: 10px;
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.6);
    color: #ff6b35;
    letter-spacing: 2px;
    vertical-align: middle;
    text-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
    animation: beta-pulse 2s ease-in-out infinite;
}

@keyframes beta-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes hub-idle-pulse {
    0%, 100% { 
        border-color: rgba(63, 185, 80, 0.2);
        box-shadow: none;
    }
    50% { 
        border-color: rgba(63, 185, 80, 0.35);
        box-shadow: 0 0 8px rgba(63, 185, 80, 0.1);
    }
}

body {
    font-family: 'Share Tech Mono', monospace;
    color: #3fb950;
    min-height: 100vh;
    position: relative;
    animation: power-flicker 35s ease-in-out infinite;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* Base background - JavaScript will add image via inline style */
    background-color: #0d1117;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: background-image 2s ease-in-out;
}

.hub-row.cheapest .hub-price {
    font-size: 1.2rem;
    text-shadow: 0 0 8px rgba(63, 185, 80, 0.6);
}

/* === AD SPACE === */
.ad-space {
    background: rgba(10, 12, 16, 0.6);
    border: 1px solid rgba(63, 185, 80, 0.2);
    border-radius: 8px;
    padding: 20px;
    min-height: 600px;
}

.ad-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(63, 185, 80, 0.3);
    font-size: 0.9rem;
    letter-spacing: 2px;
    border: 1px dashed rgba(63, 185, 80, 0.2);
}

/* === LOADING STATE === */
.loading-state {
    text-align: center;
    padding: 40px;
    color: var(--neon-green);
    font-size: 1rem;
    letter-spacing: 2px;
}

.scanning-text {
    text-shadow: 0 0 8px rgba(63, 185, 80, 0.6);
}

.dot-pulse {
    display: inline-block;
    width: 3ch;
    text-align: left;
}

.dot-pulse::after {
    content: '.';
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
}

/* === FOOTER === */
.legal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
    border-top: 1px solid rgba(63, 185, 80, 0.2);
    padding: 8px 20px;
    z-index: 50;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #444;
    font-size: 0.65rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.ccp-notice {
    color: #444;
    opacity: 0.7;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-link {
    color: rgba(63, 185, 80, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--neon-green);
    text-shadow: 0 0 5px rgba(63, 185, 80, 0.5);
}

.separator {
    color: #222;
    margin: 0 8px;
}

.version {
    color: rgba(63, 185, 80, 0.4);
    font-size: 0.6rem;
}

.search-container {
    position: relative; /* Make this the positioning context */
}

.suggestion-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 12, 16, 0.98);
    border: 1px solid rgba(63, 185, 80, 0.4);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    margin-top: 1px;
}

.suggestion-dropdown.active {
    display: block;
}

.suggestion-item {
    padding: 10px 15px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: rgba(63, 185, 80, 0.7);
    cursor: pointer;
    border-bottom: 1px solid rgba(63, 185, 80, 0.1);
    letter-spacing: 1px;
    transition: background 0.1s ease, color 0.1s ease;
}

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

.suggestion-item:hover,
.suggestion-item.selected {
    background: rgba(63, 185, 80, 0.15);
    color: var(--neon-green);
    text-shadow: 0 0 5px rgba(63, 185, 80, 0.5);
}

/* Scrollbar styling */
.suggestion-dropdown::-webkit-scrollbar {
    width: 8px;
}

.suggestion-dropdown::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.suggestion-dropdown::-webkit-scrollbar-thumb {
    background: rgba(63, 185, 80, 0.3);
    border-radius: 4px;
}

.suggestion-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(63, 185, 80, 0.5);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .ad-space {
        order: -1; /* Move ad above item display on mobile */
        min-height: 250px;
    }
    
    .terminal-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .item-header {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
    /* Affiliate Block Styling - Add to style.css */

.affiliate-block {
    border: 1px solid rgba(63, 185, 80, 0.3);
    background: rgba(10, 12, 16, 0.95);
    padding: 1.5rem;
    font-family: 'Share Tech Mono', monospace;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(63, 185, 80, 0.1);
    position: relative;
    overflow: hidden;
}

.affiliate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(63, 185, 80, 0.2);
}

.affiliate-label {
    color: rgba(63, 185, 80, 0.6);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.affiliate-timer {
    color: rgba(63, 185, 80, 0.4);
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.affiliate-display {
    text-align: center;
    padding: 1rem 0;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in;
}

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

.aff-icon {
    width: auto !important;
    height: auto !important;
    max-width: 260px !important;
    max-height: 260px !important;
    object-fit: contain !important;
    margin-bottom: 1rem;
    display: block;
}
.aff-title {
    color: var(--neon-green, #3fb950);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.aff-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.aff-cta {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--neon-green, #3fb950);
    color: var(--neon-green, #3fb950);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.aff-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(63, 185, 80, 0.1);
    transition: left 0.3s ease;
}

.aff-cta:hover::before {
    left: 0;
}

.aff-cta:hover {
    background: rgba(63, 185, 80, 0.15);
    box-shadow: 0 0 15px rgba(63, 185, 80, 0.4),
                inset 0 0 10px rgba(63, 185, 80, 0.2);
    transform: translateY(-2px);
}

/* Navigation Controls */
.affiliate-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(63, 185, 80, 0.2);
}

.affiliate-nav {
    background: transparent;
    border: 1px solid rgba(63, 185, 80, 0.3);
    color: var(--neon-green, #3fb950);
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.affiliate-nav:hover {
    background: rgba(63, 185, 80, 0.1);
    border-color: var(--neon-green, #3fb950);
    box-shadow: 0 0 8px rgba(63, 185, 80, 0.3);
}

.affiliate-dots {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(63, 185, 80, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dot.active {
    background: var(--neon-green, #3fb950);
    box-shadow: 0 0 8px rgba(63, 185, 80, 0.6);
    transform: scale(1.3);
}

.dot:hover:not(.active) {
    background: rgba(63, 185, 80, 0.5);
    transform: scale(1.1);
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .affiliate-block {
        padding: 1rem;
    }
    
    .aff-title {
        font-size: 0.95rem;
    }
    
    .aff-desc {
        font-size: 0.8rem;
    }
    
    .aff-cta {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
}

