/* style.css */
:root {
    --bg-dark: #0f172a;
    /* Dark grayish blue */
    --bg-darker: #020617;
    --primary-blue: #3b82f6;
    --primary-green: #10b981;
    --primary-green-glow: rgba(16, 185, 129, 0.4);
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-darker);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    background-color: var(--bg-darker);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: bgSlideshow 30s infinite;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    /* Matrix-like pure CSS overlay */
    background:
        linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
        repeating-linear-gradient(0deg, rgba(0, 255, 0, 0.05), rgba(0, 255, 0, 0.05) 1px, transparent 1px, transparent 3px);
    pointer-events: none;
}

@keyframes bgSlideshow {
    0% {
        background-image: url('../img/bg1.png');
        transform: scale(1.0);
    }

    30% {
        background-image: url('../img/bg1.png');
        transform: scale(1.05);
    }

    33% {
        background-image: url('../img/bg2.png');
        transform: scale(1.0);
    }

    63% {
        background-image: url('../img/bg2.png');
        transform: scale(1.05);
    }

    66% {
        background-image: url('../img/bg3.png');
        transform: scale(1.0);
    }

    97% {
        background-image: url('../img/bg3.png');
        transform: scale(1.05);
    }

    100% {
        background-image: url('../img/bg1.png');
        transform: scale(1.0);
    }
}

/* Hacker Terminal Styles */
.terminal-container {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid #00ff00;
    border-radius: 8px;
    padding: 1.5rem;
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2), inset 0 0 10px rgba(0, 255, 0, 0.1);
    position: relative;
    margin-top: 2rem;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #00ff00;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    color: #00ff00;
    font-weight: 800;
    text-transform: uppercase;
}

.terminal-content {
    height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    color: #00ff00;
    font-size: 0.95rem;
    text-shadow: 0 0 5px #00ff00;
}

.terminal-line {
    margin-bottom: 0.5rem;
    animation: typeLog 0.1s ease-out forwards;
    word-break: break-all;
    /* Force long hexadecimal strings to wrap and not break container bounds */
}

@keyframes typeLog {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hacking Scrollbar */
.terminal-content::-webkit-scrollbar {
    width: 8px;
}

.terminal-content::-webkit-scrollbar-track {
    background: #000;
    border-left: 1px solid #00ff00;
}

.terminal-content::-webkit-scrollbar-thumb {
    background: #00ff00;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navbar */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.eth-icon {
    color: var(--primary-blue);
    font-size: 1.8rem;
}

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

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-green);
}

/* Main Container */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    width: 100%;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px var(--primary-green-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-light);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Glass Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Google Sign In Popup (Animated) */
.google-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.google-popup {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 400px;
    width: 90%;
    color: #333;
}

.google-popup.show {
    transform: translateY(0);
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    margin-top: 1.5rem;
    transition: background 0.2s;
}

.google-btn:hover {
    background: #f8f9fa;
}

.google-icon {
    width: 18px;
    height: 18px;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Global Frontend Auth Overlay */
.blurred {
    filter: blur(12px);
    pointer-events: none;
    user-select: none;
    transition: filter 0.5s ease;
}

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(2, 6, 23, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.auth-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid var(--primary-green);
    background: rgba(0, 0, 0, 0.6);
    color: #00ff00;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-input:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
    background: rgba(0, 0, 0, 0.8);
}

/* Layout Classes */
.dashboard-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {

    /* Navbar */
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Dashboard Grid Override */
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    /* Glass Panels */
    .glass-panel {
        padding: 1.5rem;
    }

    /* Headers / Text */
    h1 {
        font-size: 2.2rem !important;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.8rem !important;
    }

    .hero p {
        font-size: 1rem !important;
    }

    /* Horizontal Overflow Preventers */
    body {
        overflow-x: hidden !important;
        width: 100vw;
    }

    main {
        padding: 2rem 1rem;
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Terminal Layout Fix */
    .terminal-container {
        padding: 1rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .terminal-content {
        height: 250px;
        word-wrap: break-word;
        /* Force long hashes to wrap */
        overflow-wrap: break-word;
    }

    .terminal-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        font-size: 0.9rem;
    }

    /* Balances Size */
    #eth-balance {
        font-size: 2rem !important;
    }

    /* Login popups */
    .google-popup {
        padding: 1.5rem;
    }
}