/* ---------------------------
   RESET & BASE STYLES
--------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Orbitron', sans-serif;
}

html, body {
    height: 100%;
    min-height: 100%;
    background: linear-gradient(to top right, #000000 0%, #050505 35%, #0a0a0a 60%, #111111 100%);
    color: #fff;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: 45px;
}

.main-column {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 2rem auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.scale-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* ---------------------------
   NAVIGATION
--------------------------- */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(6px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    border-bottom: 1px solid #00ffff50;
    z-index: 2000;
}

nav .logo a {
    font-size: 1.7rem;
    font-weight: bold;
    color: #00ffff;
    text-decoration: none;
    letter-spacing: 1.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 1.15rem;
    position: relative;
    padding: 0.25rem 1rem;
    transition: all 0.3s ease;
}

.nav-links a.active,
.nav-links a:hover {
    color: #00ffff;
    border-bottom: 2px solid #00ffff;
    border-radius: 15px;
}

/* ---------------------------
   LOGIN / ACCOUNT
--------------------------- */
.login-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-container .link-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-container a {
    color: #ccc;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.login-container a:hover { color: #00ffff; }

.login-container .account-link {
    font-size: 0.75rem;
    color: red;
    margin-top: 2px;
    text-decoration: none;
}

.login-container img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* ---------------------------
   LOGOUT BUTTON
--------------------------- */
.logout-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    background-color: transparent;
    color: #ccc;
    border: 1px solid #00ffff50;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.logout-btn:hover {
    color: #00ffff;
    border-bottom: 2px solid #00ffff;
}

/* ---------------------------
   MOBILE MENU
--------------------------- */
#menu-icon { display: none; width: 35px; height: 35px; cursor: pointer; z-index: 2100; }

#mobile-menu {
    position: fixed;
    top: 0; right: -100%;
    width: 260px; height: 100%;
    background: rgba(15,15,15,0.97);
    box-shadow: -5px 0 15px rgba(0,255,255,0.3);
    display: flex; flex-direction: column;
    padding-top: 6rem; padding-left: 1rem;
    gap: 1.5rem;
    transition: right 0.35s ease-in-out, opacity 0.35s ease;
    visibility: hidden; opacity: 0; text-align: center;
    z-index: 3000;
}

#mobile-menu.show { right: 0; visibility: visible; opacity: 1; }

#mobile-menu .mobile-login-icon { width: 70px; height: 70px; margin: 0 auto 0.5rem; cursor: pointer; }

#mobile-menu .mobile-login-text {
    display: block;
    margin-bottom: 1.5rem;
    color: #00ffff;
    text-decoration: none;
    font-size: 1.4rem;
    text-align: center;
}

#mobile-menu .logout-btn {
    margin-top: auto; margin-bottom: 2rem;
    padding: 0.6rem 1.8rem;
    background: #00ffff;
    color: #000;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#mobile-menu .logout-btn:hover {
    background: #00cccc; color: #fff;
    box-shadow: 0 0 10px #00ffff;
}

#mobile-menu a.page-link {
    display: inline-block; position: relative;
    color: #00ffff; font-size: 1.2rem; text-decoration: none;
}

#mobile-menu a.page-link::after {
    content: ''; position: absolute; left: 0; bottom: -2px;
    height: 2px; background: #00ffff;
    width: 100%; transform: scaleX(0);
    transform-origin: left; transition: transform 0.3s ease;
}

#mobile-menu a.page-link.active::after,
#mobile-menu a.page-link:hover::after { transform: scaleX(1); }

/* ---------------------------
   HERO SECTION
--------------------------- */
.hero-section {
    width: 100%;
    background: rgba(15, 15, 15, 0.9);
    border: 1px solid #00ffff;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    padding: 2rem; text-align: center;
    opacity: 0; transform: translateY(30px);
    animation: fadeInUp 1s forwards;
    margin: 70px 0 2rem;
}

.hero-section h1 { color: #00ffff; font-size: 2rem; margin-bottom: 1rem; }
.hero-section p { color: #ccc; font-size: 0.95rem; line-height: 1.7; }

/* ---------------------------
   LEARNING & CRYPTO SECTIONS
--------------------------- */
.learning-section, .crypto-section {
    width: 100%;
    background: rgba(15, 15, 15, 0.9);
    border: 1px solid #00ffff;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    padding: 2rem; text-align: left;
    display: flex; flex-direction: column; gap: 1.5rem;
    opacity: 0; transform: translateY(30px);
    animation: fadeInUp 1s forwards;
    margin: 1.5rem 0;
}

.learning-section h2, .crypto-section h2 { color: #00ffff; font-size: 1.6rem; margin-bottom: 1rem; }
.learning-section h3 { color: #00ffff; font-size: 1.2rem; margin: 1rem 0 0.5rem; }

.learning-section p, .learning-section ul, .learning-section li,
.crypto-section p, .crypto-section li { color: #ccc; font-size: 0.95rem; line-height: 1.6; }

.learning-section ul, .crypto-section ul { padding-left: 1.5rem; margin: 0.8rem 0 1.2rem 0; }
.learning-section li, .crypto-section li { margin: 0.4rem 0; position: relative; }

.learning-section a { color: #00ffff; text-decoration: none; font-weight: 500; }
.learning-section a:hover { text-decoration: underline; opacity: 0.85; }

/* ---------------------------
   TERMINAL
--------------------------- */
.terminal {
    background: #000; color: #cfe8ff;
    padding: 1rem; border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
    font-size: 0.95rem; line-height: 1.45; overflow-x: auto;
    box-shadow: 0 2px 10px rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.03);
    margin-top: 0.75rem;
}

.terminal code { white-space: pre; display: block; }

/* ---------------------------
   ACCORDION
--------------------------- */
.accordion-btn {
    background: rgba(15, 15, 15, 0.95);
    color: #00ffff; border: 1px solid #00ffff;
    padding: 0.8rem 1rem; border-radius: 8px;
    cursor: pointer; text-align: left;
    font-size: 1rem; transition: all 0.3s ease;
    display: flex; justify-content: space-between; align-items: center;
}

.accordion-btn:hover { background: rgba(0, 255, 255, 0.05); }
.accordion-btn.active { background: rgba(0, 255, 255, 0.2); }
.accordion-btn::after { content: "▼"; font-size: 0.8rem; transition: transform 0.3s ease; }
.accordion-btn.active::after { transform: rotate(180deg); }

.accordion-content {
    background: rgba(15, 15, 15, 0.9);
    border-top: 1px solid #00ffff50;
    padding: 0.8rem 1rem;
    display: none; color: #ccc;
    font-size: 0.95rem; line-height: 1.7;
}

/* ---------------------------
   STARFIELD
--------------------------- */
#starfield {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: "-1"; background: #000;
    pointer-events: none;
}

body, .scale-wrapper { position: relative; z-index: 1; }

/* ---------------------------
   GRID & FLEX
--------------------------- */
.grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0; }
.grid-item { background: #00cccc; padding: 1rem; text-align: center; border-radius: 6px; color: #000; }

.flex-container {
    display: flex; justify-content: space-around; align-items: center;
    flex-wrap: wrap; height: auto; background: #000; padding: 1rem; gap: 1rem;
}

.box { background: #00ffff; padding: 1rem 2rem; border-radius: 8px; text-align: center; color: #000; flex: 1 1 150px; }

/* ---------------------------
   FOOTER
--------------------------- */
footer {
    background-color: rgba(0, 0, 0, 0.85);
    color: #ccc; font-family: 'Orbitron', sans-serif;
    font-size: 14px; line-height: 1.6;
    padding: 50px 20px 20px;
    border-top: 1px solid rgba(0,255,255,0.125);
}

footer a { color: #ccc; text-decoration: none; transition: color 0.2s ease; }
footer a:hover { color: #00ffff; }

.footer-columns { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; max-width: 1200px; margin: 0 auto; }
.footer-column { flex: 1 1 220px; min-width: 220px; }
.footer-column h4 { font-size: 16px; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 0.5px; color: #00ffff; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column ul li { margin-bottom: 10px; }
.footer-column ul li a { color: #ccc; transition: color 0.2s ease; }
.footer-column ul li a:hover { color: #00ffff; }
.footer-column p { margin-bottom: 10px; color: #aaa; font-size: 0.95rem; }

.subscribe-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.subscribe-form input[type="email"] {
    flex: 1 1 auto; padding: 10px; border: 1px solid #333; border-radius: 6px;
    background-color: #222; color: #fff; font-family: 'Orbitron', sans-serif;
}
.subscribe-form input[type="email"]::placeholder { color: #555; }
.subscribe-form button {
    padding: 10px 18px; border: none; background-color: #00ffff;
    color: #000; border-radius: 6px; cursor: pointer; font-weight: bold;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.subscribe-form button:hover { background-color: #00cccc; color: #fff; }

.preview-link { display: inline-block; font-size: 13px; color: #aaa; margin-top: 5px; transition: color 0.2s ease; }
.preview-link:hover { color: #00ffff; }

.footer-bottom { text-align: center; margin-top: 30px; font-size: 13px; border-top: 1px solid #222; padding-top: 15px; color: #555; }

/* ---------------------------
   KEYFRAMES
--------------------------- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes loadingBar { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); } 100% { transform: scaleX(0); } }

/* ---------------------------
   PAGE LOADER
--------------------------- */
#page-loader {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex; justify-content: center; align-items: center;
    z-index: 5000;
}

#page-loader::after {
    content: '';
    width: 60px; height: 4px; background: #0ff;
    border-radius: 2px; animation: loadingBar 1s infinite;
}

/* ---------------------------
   LOGIN MESSAGE
--------------------------- */
#login-msg {
    position: fixed; top: 1rem; left: 50%; transform: translateX(-50%);
    background-color: #ff4d4d; color: #fff;
    padding: 0.75rem 1.5rem; border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); z-index: 9999;
    font-family: 'Orbitron', sans-serif; font-size: 1rem;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}

#login-msg.show { opacity: 1; pointer-events: auto; }
@media (max-width: 768px) {
    /* Navigation */
    .nav-links { display: none; }
    #menu-icon { display: inline-block; }
    .login-container a,
    .login-container img,
    .login-container .account-link,
    .login-container .logout-btn { display: none; }

    /* Mobile menu */
    #mobile-menu { display: flex; flex-direction: column; height: 100vh; }
    #mobile-menu .mobile-login-icon { width: 70px; height: 70px; }
    #mobile-menu .mobile-login-text { font-size: 1.4rem; text-align: center; margin-bottom: 0.2rem; }
    #mobile-menu .mobile-account-link { display: block; font-size: 0.75rem; color: red; text-align: center; margin: 0.2rem 0 1rem; }
    #mobile-menu .logout-btn { display: block; margin-top: auto; }

    /* Main content */
    .main-column { padding: 1.5rem; margin-top: 1rem; gap: 1.5rem; }
    .hero-section { margin-top: 80px; padding: 1.2rem; }
    .learning-section, .crypto-section { padding: 1rem; margin: 1rem 0; }
    .grid-container { grid-template-columns: repeat(2, 1fr); gap: 1rem; }

    /* Footer 2x2 layout with newsletter full width below */
.footer-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
        "col1 col2"
        "col3 col3"
        "newsletter newsletter";
    gap: 20px;
}

.footer-column:nth-child(1) { grid-area: col1; }
.footer-column:nth-child(2) { grid-area: col2; }
.footer-column:nth-child(3) { grid-area: col3; }
.footer-column:nth-child(4) { grid-area: newsletter; }

/* Newsletter form adjustment for mobile */
.subscribe-form {
    display: flex;
    flex-direction: column; /* stack input and button */
    gap: 10px;
}

.subscribe-form input[type="email"] {
    width: 70%; /* full width of container */
    padding: 10px;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.subscribe-form button {
    width: 70%; /* full width below input */
    padding: 10px 0;
    font-size: 0.95rem;
    cursor: pointer;
}

