:root {
    --bg-deep: #020b1c;
    --bg-surface: rgba(10, 25, 47, 0.8);
    --accent-green: #00ff9d;
    --accent-red: #ff3b3b;
    --text-main: #ffffff;
    --font-main: 'Rajdhani', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Canvas */
#ocean {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: radial-gradient(circle at center, #0b1e3b 0%, #020b1c 100%);
}

/* Light Rays */
.light-rays {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    background: repeating-linear-gradient(90deg,
            rgba(255, 255, 255, 0.03) 0px,
            rgba(255, 255, 255, 0.03) 1px,
            transparent 1px,
            transparent 80px);
    opacity: 0.5;
    animation: sway 20s infinite ease-in-out;
}

@keyframes sway {

    0%,
    100% {
        transform: translateX(-20px) skewX(-5deg);
    }

    50% {
        transform: translateX(20px) skewX(5deg);
    }
}

/* UI Layer */
.ui-layer {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    pointer-events: none;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
    padding: 10px;
    pointer-events: auto;
}

.logo {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(45deg, #00ff9d, #00b8ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.price-ticker {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Rajdhani', sans-serif;
    transition: color 0.2s;
}

/* Left Sidebar: Whale Log */
#whale-log-container {
    position: absolute;
    top: 100px;
    left: 20px;
    width: 320px;
    pointer-events: none;
}

#whale-log-container h3 {
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 4px solid #fff;
    font-size: 0.9rem;
    margin-bottom: 15px;
    background: rgba(2, 11, 28, 0.6);
    backdrop-filter: blur(5px);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#whale-log {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 5px;
    pointer-events: auto;
}

#whale-log::-webkit-scrollbar {
    width: 4px;
}

#whale-log::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.log-item {
    background: rgba(10, 25, 47, 0.7);
    border-left: 3px solid transparent;
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 0 4px 4px 0;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideInLeft 0.3s ease-out;
    pointer-events: auto;
}

.log-item.buy {
    border-color: var(--accent-green);
    background: linear-gradient(90deg, rgba(0, 255, 157, 0.15), transparent);
}

.log-item.sell {
    border-color: var(--accent-red);
    background: linear-gradient(90deg, rgba(255, 59, 59, 0.15), transparent);
}

.log-type {
    font-weight: 700;
    font-size: 0.8rem;
    margin-right: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

.log-item.buy .log-type {
    color: #000;
    background: var(--accent-green);
}

.log-item.sell .log-type {
    color: #fff;
    background: var(--accent-red);
}

@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Right Sidebar: Market Watch */
#market-watch {
    position: absolute;
    top: 100px;
    right: 20px;
    width: 200px;
    pointer-events: auto;
}

#market-watch h3 {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-align: right;
}

.coin-card {
    background: rgba(10, 25, 47, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.coin-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-5px);
}

.coin-card.active {
    border-color: var(--accent-green);
    background: rgba(0, 255, 157, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.1);
}

.coin-info {
    display: flex;
    flex-direction: column;
}

.coin-symbol {
    font-weight: 700;
    font-size: 1.1rem;
}

.coin-name {
    font-size: 0.8rem;
    opacity: 0.6;
}

.coin-stats-mini {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 10px;
    font-size: 0.75rem;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
}

.mini-stat.low {
    color: var(--accent-red);
}

.mini-stat.high {
    color: var(--accent-green);
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: #333;
    border-radius: 50%;
    transition: all 0.3s;
    margin-left: 10px;
}

.coin-card.active .live-dot {
    background-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(0, 255, 157, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 255, 157, 0);
    }
}

/* Stats Panel */
.stats-panel {
    position: absolute;
    bottom: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: auto;
}

.stat-item .label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.7;
}

.stat-item .val {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-green);
}

#low-24h {
    color: var(--accent-red);
}

#vol-24h {
    color: orange;
}

.pressure-container {
    width: 200px;
}

.pressure-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 59, 59, 0.3);
    border-radius: 3px;
    margin-top: 5px;
    overflow: hidden;
    position: relative;
}

#buy-pressure {
    height: 100%;
    background: var(--accent-green);
    width: 50%;
    transition: width 0.5s ease-out;
    box-shadow: 0 0 10px var(--accent-green);
}

footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-bottom: 20px;
    pointer-events: auto;
}

.cta-btn {
    background: var(--accent-green);
    color: #000;
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
}

.cta-btn.secondary {
    background: transparent;
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
}

.cta-btn.secondary:hover {
    background: rgba(0, 255, 157, 0.1);
}

/* Overlay */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 11, 28, 0.95);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
}

.overlay-content {
    text-align: center;
}

.overlay-content h1 {
    font-size: 4rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #00ff9d, #00b8ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#start-btn {
    margin-top: 30px;
    padding: 15px 40px;
    font-size: 1.2rem;
    background: transparent;
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 700;
    letter-spacing: 2px;
    transition: all 0.3s;
}

#start-btn:hover {
    background: var(--accent-green);
    color: #000;
    box-shadow: 0 0 30px var(--accent-green);
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    opacity: 1;
    transition: opacity 0.3s;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: rgba(10, 25, 47, 0.95);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 157, 0.3);
    text-align: center;
    max-width: 400px;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 255, 157, 0.1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
}

.close-modal:hover {
    color: #fff;
}

.modal-content h2 {
    color: var(--accent-green);
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 20px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
}

.premium-badge {
    display: inline-block;
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: #000;
    padding: 5px 10px;
    border-radius: 5px;
}

/* Mobile */
@media (max-width: 768px) {
    body {
        height: 100dvh;
    }

    header {
        padding: 5px 10px;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo img {
        height: 25px !important;
    }

    .price-ticker {
        font-size: 1rem;
    }

    #market-watch {
        position: absolute;
        top: 60px;
        right: 0;
        left: 0;
        width: 100%;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 5px 10px;
        gap: 8px;
        background: rgba(2, 11, 28, 0.8);
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        z-index: 20;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    #market-watch::-webkit-scrollbar {
        display: none;
    }

    #market-watch h3 {
        display: none;
    }

    .coin-card {
        margin-bottom: 0;
        min-width: 100px;
        padding: 6px 10px;
        flex: 0 0 auto;
        background: rgba(255, 255, 255, 0.05);
    }

    .coin-symbol {
        font-size: 0.9rem;
    }

    .coin-name {
        display: none;
    }

    .coin-stats-mini {
        font-size: 0.65rem;
    }

    #whale-log-container {
        top: 120px;
        bottom: auto;
        left: 10px;
        width: calc(50% - 15px);
        max-height: 40vh;
        overflow-y: hidden;
        pointer-events: none;
        z-index: 5;
    }

    #whale-log-container h3 {
        font-size: 0.6rem;
        padding: 3px 6px;
        background: rgba(2, 11, 28, 0.8);
    }

    .log-item {
        font-size: 0.5rem;
        padding: 2px 4px;
        margin-bottom: 2px;
    }

    .stats-panel {
        top: 120px;
        bottom: auto;
        right: 10px;
        width: calc(50% - 15px);
        padding-right: 0;
        gap: 2px;
        align-items: flex-end;
        z-index: 5;
    }

    .stat-item .label {
        font-size: 0.5rem;
    }

    .stat-item .val {
        font-size: 0.75rem;
    }

    .pressure-container {
        width: 100%;
    }

    footer {
        position: absolute;
        bottom: 25px;
        width: 100%;
        padding: 5px 10px 10px 10px;
        background: rgba(2, 11, 28, 0.95);
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 5px;
        z-index: 30;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .cta-btn {
        padding: 6px 0;
        font-size: 0.55rem;
        flex: 1;
        text-align: center;
        white-space: nowrap;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .overlay-content h1 {
        font-size: 2.5rem;
    }

    #seo-info {
        font-size: 8px;
        opacity: 0.4;
        padding: 5px;
        height: 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-deep);
        z-index: 35;
    }
}

.address-box {
    position: relative;
    display: flex;
    align-items: center;
}

.address-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s;
}

.address-box input:focus {
    border-color: var(--accent-green);
}

.crypto-address .label {
    display: block;
    font-size: 0.9rem;
    color: var(--accent-green);
    margin-bottom: 5px;
    font-weight: 700;
}

/* SEO Section */
#seo-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    text-align: center;
    opacity: 0.2;
    font-size: 10px;
    pointer-events: none;
    z-index: 0;
}

#seo-info h2 {
    display: none;
}

#seo-info p {
    margin: 0;
    display: inline;
    margin-right: 10px;
}

#seo-info strong {
    color: inherit;
    font-weight: normal;
}