/* =========================
   TEK — STUPID INTERNET MONEY
   ========================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 10%, #242424 0%, #0d0d0d 38%, #050505 100%);
    color: #f5f5f5;
    font-family: Arial, Helvetica, sans-serif;
}

/* =========================
   CONTRACT BAR
   ========================= */

.token-address {
    width: 100%;
    padding: 10px 20px;
    background: #050505;
    border-bottom: 1px solid #292929;
    text-align: center;
    font-size: 12px;
    overflow: hidden;
}

.token-label {
    margin-right: 10px;
    font-weight: 900;
    color: #777;
}

.token-address code {
    color: #aaa;
    word-break: break-all;
}

/* =========================
   HEADER
   ========================= */

.site-header {
    width: min(1200px, calc(100% - 30px));
    margin: auto;
    padding: 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 30px;
    font-weight: 1000;
    letter-spacing: -2px;
}

.logo img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid #fff;
    box-shadow: 5px 5px 0 #fff;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.welcome {
    font-weight: 800;
}

/* =========================
   BUTTONS
   ========================= */

.button {
    border: 2px solid #fff;
    background: #fff;
    color: #000;
    padding: 11px 18px;
    font-weight: 1000;
    cursor: pointer;
    text-decoration: none;
    transition: 0.15s ease;
    box-shadow: 4px 4px 0 #555;
}

.button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #555;
}

.button:active {
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0 #555;
}

.button.secondary {
    background: #151515;
    color: #fff;
    border-color: #555;
}

/* =========================
   MAIN
   ========================= */

.main-layout {
    width: min(1100px, calc(100% - 30px));
    margin: auto;
    padding-bottom: 70px;
}

/* =========================
   TEK HERO
   ========================= */

.tek-hero {
    text-align: center;
    padding: 35px 0 45px;
}

.hero-tag {
    display: inline-block;
    padding: 7px 12px;
    background: #fff;
    color: #000;
    font-size: 11px;
    font-weight: 1000;
    transform: rotate(-2deg);
    box-shadow: 4px 4px 0 #555;
}

.tek-hero h1 {
    margin: 20px 0 8px;
    font-size: clamp(42px, 8vw, 90px);
    line-height: 0.9;
    font-weight: 1000;
    letter-spacing: -5px;
    text-shadow: 5px 5px 0 #333;
}

.hero-subtitle {
    margin: 0 0 30px;
    color: #999;
    font-size: 18px;
}

.hero-subtitle strong {
    color: #fff;
}

/* =========================
   THE MEME MACHINE
   ========================= */

.slot-machine {
    width: min(650px, 100%);
    margin: auto;
    padding: 18px;
    background: #111;
    border: 3px solid #444;
    border-radius: 18px;
    box-shadow:
        0 0 0 5px #080808,
        0 25px 60px rgba(0, 0, 0, 0.7);
}

.slot-top {
    display: flex;
    justify-content: space-between;
    padding: 4px 8px 14px;
    font-size: 11px;
    font-weight: 1000;
    color: #777;
}

.slot-light {
    color: #aaa;
}

.slot-window {
    position: relative;
    height: 230px;
    overflow: hidden;
    border: 5px solid #050505;
    border-radius: 12px;
    background: #000;
    box-shadow: inset 0 0 35px #000;
}

/* subtle center line */

.slot-window::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-top: 2px solid rgba(255,255,255,0.12);
    border-bottom: 2px solid rgba(255,255,255,0.12);
}

.slot-track {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-left: calc(50% - 105px);
    will-change: transform;
}

.slot-item {
    flex: 0 0 210px;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    background: #181818;
    border: 3px solid #333;
}

.slot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tek-slot {
    border-color: #fff;
    box-shadow: 0 0 30px rgba(255,255,255,0.4);
}

/* =========================
   RESULT
   ========================= */

.slot-result {
    min-height: 32px;
    padding: 14px 5px 8px;
    font-size: 15px;
    font-weight: 1000;
    letter-spacing: 2px;
}

.slot-result::before {
    content: ">";
    margin-right: 8px;
    color: #666;
}

.slot-finished {
    animation: stupidVictory 0.6s ease-in-out 3;
}

@keyframes stupidVictory {

    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px) rotate(-0.5deg);
    }

    75% {
        transform: translateX(5px) rotate(0.5deg);
    }
}

/* =========================
   SPIN BUTTON
   ========================= */

.spin-button {
    width: 100%;
    margin-top: 12px;
    padding: 18px;
    border: 3px solid #fff;
    background: #fff;
    color: #000;
    font-size: 20px;
    font-weight: 1000;
    cursor: pointer;
    box-shadow: 6px 6px 0 #555;
}

.spin-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 #555;
}

.spin-button:active {
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0 #555;
}

.spin-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

/* =========================
   CARDS
   ========================= */

.card {
    background: #111;
    border: 2px solid #292929;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.35);
}

.chat-card {
    margin-top: 15px;
}

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

.section-header h2 {
    margin: 4px 0 0;
    font-size: 25px;
}

.section-label {
    font-size: 11px;
    font-weight: 1000;
    color: #777;
    letter-spacing: 1px;
}

.chat-status {
    font-size: 11px;
    font-weight: 1000;
}

.chat-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 5px;
    border-radius: 50%;
    background: #fff;
}

/* =========================
   CHAT
   ========================= */

.chat-messages {
    min-height: 250px;
    max-height: 450px;
    overflow-y: auto;
    padding: 12px;
    background: #080808;
    border: 1px solid #292929;
    border-radius: 8px;
}

.chat-empty {
    padding: 60px 20px;
    text-align: center;
    color: #555;
}

.chat-message {
    padding: 12px 0;
    border-bottom: 1px solid #1d1d1d;
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 5px;
}

.chat-message-header strong {
    color: #fff;
}

.chat-message-header span {
    color: #555;
    font-size: 11px;
}

.chat-message-text {
    color: #bbb;
    word-break: break-word;
}

.chat-form {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.chat-form input {
    flex: 1;
    min-width: 0;
    padding: 13px;
    background: #080808;
    color: #fff;
    border: 2px solid #333;
    outline: none;
}

.chat-form input:focus {
    border-color: #fff;
}

.chat-login-message {
    padding: 35px;
    text-align: center;
    background: #080808;
    border: 1px solid #292929;
    border-radius: 8px;
}

.chat-login-message p {
    color: #888;
}

/* =========================
   WALLET MODAL
   ========================= */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    padding: 20px;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    width: min(500px, 100%);
    padding: 30px;
    background: #111;
    border: 2px solid #555;
    border-radius: 14px;
    box-shadow: 10px 10px 0 #000;
}

.modal-content h2 {
    margin-top: 8px;
}

.close {
    position: absolute;
    top: 12px;
    right: 15px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

.wallet-connected {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 20px 0;
    padding: 12px;
    background: #080808;
    border: 1px solid #292929;
}

.wallet-connected span {
    font-size: 10px;
    color: #666;
    font-weight: 1000;
}

.modal-content input {
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    background: #080808;
    color: #fff;
    border: 2px solid #333;
}

.button.large {
    width: 100%;
    padding: 14px;
}

.profile-note {
    color: #555;
    font-size: 12px;
}

.hidden {
    display: none !important;
}

/* =========================
   FLASH
   ========================= */

.flash-container {
    width: min(1100px, calc(100% - 30px));
    margin: 10px auto;
}

.flash {
    padding: 12px;
    margin-bottom: 8px;
    background: #181818;
    border: 1px solid #444;
}

/* =========================
   FOOTER
   ========================= */

.site-footer {
    padding: 30px;
    text-align: center;
    color: #444;
    font-size: 12px;
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 600px) {

    .site-header {
        flex-direction: column;
        gap: 18px;
    }

    .logo {
        font-size: 25px;
    }

    .tek-hero h1 {
        font-size: 48px;
        letter-spacing: -3px;
    }

    .slot-window {
        height: 190px;
    }

    .slot-item {
        flex-basis: 170px;
        height: 160px;
    }

    .slot-track {
        padding-left: calc(50% - 85px);
    }

    .chat-form {
        flex-direction: column;
    }

    .token-address {
        text-align: left;
    }
}
