/**
 * Token System Styling
 * Ticker + Vending Modal for Multi-Token Ecosystem
 * Matching pcc.quest aesthetic with Meteor Clone Farm branding
 */

/* ========================================
   TOKEN TICKER
   ======================================== */

#tokenTicker {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-bottom: 2px solid var(--green);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.ticker-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 2rem;
}

.ticker-label {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--green);
    text-transform: uppercase;
    white-space: nowrap;
    padding-right: 2rem;
    border-right: 2px solid var(--gray-light);
}

.ticker-scroll {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--green) var(--black);
}

.ticker-scroll::-webkit-scrollbar {
    height: 4px;
}

.ticker-scroll::-webkit-scrollbar-track {
    background: var(--black);
}

.ticker-scroll::-webkit-scrollbar-thumb {
    background: var(--green);
    border-radius: 2px;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.ticker-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 158, 120, 0.2);
}

.ticker-item.featured {
    background: linear-gradient(135deg, rgba(107, 158, 120, 0.1), rgba(127, 184, 146, 0.05));
    border-color: var(--green);
}

.ticker-item.featured:hover {
    background: linear-gradient(135deg, rgba(107, 158, 120, 0.15), rgba(127, 184, 146, 0.1));
    box-shadow: 0 6px 20px rgba(107, 158, 120, 0.3);
}

.ticker-symbol {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.verified-badge {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: var(--green);
    color: var(--black);
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 11px;
    font-weight: bold;
}

.featured-badge {
    color: #FFD700;
    font-size: 1.1rem;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    animation: pulse-star 2s ease-in-out infinite;
}

@keyframes pulse-star {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

.ticker-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Monaco', 'Courier New', monospace;
}

.price-update {
    animation: price-flash 0.5s ease-out;
}

@keyframes price-flash {
    0% {
        background: rgba(107, 158, 120, 0.3);
    }
    100% {
        background: transparent;
    }
}

/* ========================================
   VENDING MODAL
   ======================================== */

.vending-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.vending-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.vending-modal-content {
    position: relative;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border: 2px solid var(--green);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 100px rgba(107, 158, 120, 0.2);
    animation: modal-slide-up 0.3s ease-out;
}

@keyframes modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vending-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.vending-modal-close:hover {
    background: var(--green);
    color: var(--black);
    transform: rotate(90deg);
}

.vending-header {
    padding: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.vending-header h2 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.featured-star {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: var(--black);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 1px;
    margin-left: 1rem;
}

.vending-description {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

.vending-price-info {
    padding: 2rem 2.5rem;
    background: rgba(107, 158, 120, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.price-display {
    text-align: center;
    margin-bottom: 1.5rem;
}

.price-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.price-value {
    font-size: 3rem;
    font-weight: 900;
    font-family: 'Monaco', 'Courier New', monospace;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.price-sub {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.price-note {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #FFC107;
    border-radius: 6px;
}

.note-icon {
    font-size: 1.5rem;
}

.price-note strong {
    color: #FFC107;
}

.price-note p {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.vending-form {
    padding: 2.5rem;
}

.wallet-connection {
    text-align: center;
}

.connect-wallet-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    background: var(--green);
    color: var(--black);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.connect-wallet-btn:hover {
    background: var(--green-bright);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(107, 158, 120, 0.4);
}

.wallet-note {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.purchase-section {
    animation: fade-in 0.3s ease-out;
}

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

.balance-display {
    background: rgba(107, 158, 120, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid rgba(107, 158, 120, 0.2);
}

.balance-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.balance-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--green);
    font-family: 'Monaco', 'Courier New', monospace;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input {
    width: 100%;
    padding: 1rem 5rem 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Monaco', 'Courier New', monospace;
}

.input-group input:focus {
    outline: none;
    border-color: var(--green);
    background: rgba(255, 255, 255, 0.08);
}

.input-suffix {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 700;
    pointer-events: none;
}

.estimate {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

.estimate strong {
    color: var(--green);
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 1.2rem;
}

.buy-btn {
    width: 100%;
    padding: 1.5rem 2rem;
    background: var(--green);
    color: var(--black);
    border: none;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(107, 158, 120, 0.5);
}

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

.transaction-status {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.6;
}

.transaction-status.info {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.3);
    color: #64B5F6;
}

.transaction-status.success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #81C784;
}

.transaction-status.error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #E57373;
}

.transaction-status a {
    color: var(--green);
    text-decoration: underline;
}

.vending-footer {
    padding: 2rem 2.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contract-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.contract-info a {
    color: var(--green);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contract-info a:hover {
    color: var(--green-bright);
    text-decoration: underline;
}

.trade-link {
    display: inline-block;
    color: var(--green);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.trade-link:hover {
    color: var(--green-bright);
    transform: translateX(4px);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .ticker-wrapper {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .ticker-label {
        border-right: none;
        border-bottom: 2px solid var(--gray-light);
        padding-right: 0;
        padding-bottom: 0.5rem;
        width: 100%;
        text-align: center;
    }

    .ticker-scroll {
        width: 100%;
    }

    .ticker-item {
        padding: 0.5rem 1rem;
        gap: 0.75rem;
    }

    .ticker-symbol {
        font-size: 0.9rem;
    }

    .ticker-price {
        font-size: 1rem;
    }

    .vending-modal {
        padding: 1rem;
    }

    .vending-modal-content {
        max-height: 95vh;
    }

    .vending-header,
    .vending-price-info,
    .vending-form,
    .vending-footer {
        padding: 1.5rem;
    }

    .vending-header h2 {
        font-size: 1.5rem;
    }

    .price-value {
        font-size: 2rem;
    }
}

/* ========================================
   FOOTER TRINITY NETWORK LINKS
   ======================================== */

.footer-tokens {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-light);
    text-align: center;
}

.footer-tokens p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--green);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    color: var(--green-bright);
    transform: translateY(-2px);
}
