/**
 * TOR-BASE.COM - Tor Onion Theme CSS
 * Purple Dark Theme with Onion Network Aesthetics
 */

/* ========== CSS VARIABLES ========== */
:root {
    --tor-purple: #7d4cdb;
    --tor-deep-purple: #5021b8;
    --tor-dark: #0f0b1f;
    --tor-darker: #070512;
    --tor-light-purple: #a77edb;
    --tor-pink: #db4c9a;
    --accent-purple: #9d6bdb;
    --text-primary: #d4c5f9;
    --text-secondary: #b39ddb;
    --bg-primary: #0f0b1f;
    --bg-secondary: #1a1530;
    --onion-gradient: linear-gradient(135deg, #7d4cdb 0%, #5021b8 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ========== ANIMATED BACKGROUND ========== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.03;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 50px, var(--tor-purple) 50px, var(--tor-purple) 51px),
        repeating-linear-gradient(-45deg, transparent, transparent 50px, var(--tor-deep-purple) 50px, var(--tor-deep-purple) 51px);
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Onion layers animation */
.onion-layer {
    position: fixed;
    border-radius: 50%;
    border: 2px solid var(--tor-purple);
    opacity: 0.1;
    animation: onionPulse 4s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

.onion-layer:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.onion-layer:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 10%;
    animation-delay: 1s;
}

.onion-layer:nth-child(3) {
    width: 150px;
    height: 150px;
    bottom: 15%;
    left: 15%;
    animation-delay: 2s;
}

@keyframes onionPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.2;
    }
}

/* ========== MAIN CONTAINER ========== */
.main-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
}

/* ========== HEADER / NAVIGATION ========== */
.header {
    background: rgba(15, 11, 31, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--tor-purple);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(125, 76, 219, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--tor-light-purple);
    text-decoration: none;
    text-shadow: 0 0 20px var(--tor-purple),
                 0 0 40px var(--tor-purple);
    font-family: 'Ubuntu', sans-serif;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.logo:hover {
    color: var(--tor-pink);
    text-shadow: 0 0 30px var(--tor-pink),
                 0 0 60px var(--tor-pink);
}

.logo::before {
    content: '🧅 ';
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.5rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--tor-light-purple);
    border: 2px solid var(--tor-purple);
    background: rgba(125, 76, 219, 0.1);
    box-shadow: 0 0 15px rgba(125, 76, 219, 0.4);
}

.mobile-menu-toggle {
    display: none;
    background: var(--onion-gradient);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 5px;
}

/* ========== HERO SECTION ========== */
.hero {
    text-align: center;
    padding: 5rem 2rem;
    position: relative;
    background: radial-gradient(circle at 50% 50%,
                                rgba(125, 76, 219, 0.15) 0%,
                                transparent 70%);
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: bold;
    background: var(--onion-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Ubuntu', sans-serif;
    text-shadow: 0 0 40px rgba(125, 76, 219, 0.5);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(125, 76, 219, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 30px rgba(125, 76, 219, 0.8));
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--tor-light-purple);
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.8;
    opacity: 0.9;
}

/* ========== SECTION STYLING ========== */
.section {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--tor-light-purple);
    font-family: 'Ubuntu', sans-serif;
    text-shadow: 0 0 20px rgba(125, 76, 219, 0.5);
}

.section-title::after {
    content: '';
    display: block;
    width: 150px;
    height: 4px;
    background: var(--onion-gradient);
    margin: 1rem auto 0;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--tor-purple);
}

/* ========== MARKETS GRID ========== */
.markets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.market-card {
    background: linear-gradient(135deg, rgba(26, 21, 48, 0.8) 0%, rgba(15, 11, 31, 0.9) 100%);
    border: 2px solid var(--tor-deep-purple);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.market-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(125, 76, 219, 0.1), transparent);
    transition: all 0.6s ease;
}

.market-card:hover::before {
    left: 100%;
}

.market-card:hover {
    border-color: var(--tor-purple);
    box-shadow: 0 0 30px rgba(125, 76, 219, 0.4),
                inset 0 0 20px rgba(125, 76, 219, 0.05);
    transform: translateY(-10px);
}

.market-rank {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--onion-gradient);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    box-shadow: 0 0 20px rgba(125, 76, 219, 0.6);
}

.market-name {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--tor-light-purple);
    font-family: 'Ubuntu', sans-serif;
}

.market-status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(125, 76, 219, 0.2);
    border: 1px solid var(--tor-purple);
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.market-status.active::before {
    content: '● ';
    color: var(--tor-light-purple);
    animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.market-description {
    margin: 1.5rem 0;
    line-height: 1.8;
    opacity: 0.9;
}

.market-features {
    list-style: none;
    margin: 1.5rem 0;
}

.market-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(125, 76, 219, 0.2);
}

.market-features li::before {
    content: '🧅 ';
    margin-right: 0.5rem;
}

.market-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.8rem 2rem;
    background: var(--onion-gradient);
    border: none;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(125, 76, 219, 0.3);
}

.market-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(125, 76, 219, 0.5);
}

/* ========== INFO BOXES ========== */
.info-box {
    background: rgba(26, 21, 48, 0.6);
    border-left: 4px solid var(--tor-purple);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.info-box h3 {
    color: var(--tor-light-purple);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.info-box p {
    line-height: 1.8;
    opacity: 0.9;
}

/* ========== FOOTER ========== */
.footer {
    background: rgba(15, 11, 31, 0.95);
    border-top: 3px solid var(--tor-purple);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
    box-shadow: 0 -4px 20px rgba(125, 76, 219, 0.2);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer p {
    opacity: 0.7;
    margin: 0.5rem 0;
}

.footer a {
    color: var(--tor-light-purple);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: var(--tor-pink);
    text-shadow: 0 0 10px var(--tor-pink);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 11, 31, 0.98);
        flex-direction: column;
        gap: 0;
        border-bottom: 3px solid var(--tor-purple);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(125, 76, 219, 0.2);
        border-radius: 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .markets-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .market-card {
        padding: 1.5rem;
    }
}

/* ========== ONION LINKS SECTION ========== */
.onion-links-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(26, 21, 48, 0.5);
    border-radius: 10px;
    border: 1px solid var(--tor-deep-purple);
}

.onion-links-title {
    color: var(--tor-light-purple);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.onion-link-item {
    background: rgba(15, 11, 31, 0.8);
    border: 1px solid var(--tor-purple);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: all 0.3s ease;
}

.onion-link-item:hover {
    border-color: var(--tor-light-purple);
    background: rgba(26, 21, 48, 0.9);
    transform: translateX(5px);
}

.onion-link-text {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    word-break: break-all;
    opacity: 0.9;
}

.onion-link-button {
    background: var(--onion-gradient);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(125, 76, 219, 0.3);
}

.onion-link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(125, 76, 219, 0.5);
}

.onion-count-badge {
    background: var(--tor-purple);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.no-links-message {
    text-align: center;
    padding: 1rem;
    color: var(--text-secondary);
    opacity: 0.7;
    font-style: italic;
}

/* ========== UTILITY CLASSES ========== */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}
