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

:root {
    --bg-color: #0d0d0d;
    --text-main: #ffffff;
    --text-sub: #b3b3b3;
    /* NEW ACCENT COLOR: SuperMemo Blue */
    --accent-color: #2267e6;
    --accent-hover: #1a54c0;
    --border-color: #333333;
    --card-bg: #1e1e1e;
    --danger-color: #cf222e;
    --success-color: #27c93f;
    --warning-color: #ffcc00;
    /* Updated Font Stack to match SuperMemo (Modern Premium) */
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.accent-text {
    color: var(--accent-color);
}

/* ACCOUNT DROPDOWN */
.account-container {
    position: relative;
    display: flex;
    align-items: center;
}

.account-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.account-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.account-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.auth-popover {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    width: 250px;
    background: #1e1e1e;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.auth-popover.visible {
    display: flex;
}

.user-email {
    color: var(--text-sub);
    font-size: 0.9rem;
    margin-bottom: 5px;
    word-break: break-all;
}

.popover-btn {
    text-align: center;
    padding: 8px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

.btn-login {
    background: var(--accent-color);
    color: white;
}

.btn-login:hover {
    background: var(--accent-hover);
}

.btn-signup {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-signup:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-logout {
    background: #cf222e;
    color: white;
    width: 100%;
}

.btn-logout:hover {
    background: #a41b24;
}


body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-stack);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* BACKGROUND CANVAS */
#bg-canvas,
#starfield-canvas,
#click-particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.logo-img {
    width: 48px;
    height: 48px;
}

.nav-links {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 1rem 0.75rem;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    z-index: 2000;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    color: #ffffff;
    background: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
}

/* Tooltip for the links since they are icons or small bubbles */
.nav-links a::after {
    content: attr(data-label);
    position: absolute;
    right: 120%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.nav-links a:hover::after {
    opacity: 1;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

/* HERO SECTION */
.hero {
    text-align: center;
    padding-top: 6rem;
    padding-bottom: 8rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* BUTTONS */
.cta-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 0.9rem 2.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
}

.price-tag {
    color: var(--text-sub);
    font-size: 0.9rem;
}

.smartscreen-warning {
    font-size: 0.9rem;
    color: #ffd700;
    /* Gold/Yellow */
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    max-width: 450px;
    margin-top: 15px;
    line-height: 1.5;
    text-align: left;
    display: none;
    /* Hidden by default */
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 0.8;
}

/* APP WINDOW (WINDOWS 11 STYLE) */
.app-showcase {
    max-width: 1000px;
    margin: 0 auto;
    background: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

.window-chrome.windows-style {
    background: #202020;
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 15px;
    border-bottom: 1px solid #333;
}

.win-title {
    font-size: 0.8rem;
    color: #ccc;
}

.win-controls {
    display: flex;
    height: 100%;
}

.win-btn {
    width: 46px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: default;
    transition: background 0.1s;
}

.win-btn:hover {
    background: #333;
}

.win-btn.close:hover {
    background: #c42b1c;
}

.app-img {
    width: 100%;
    height: auto;
    display: block;
}

/* FEATURES SECTION */
.features-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 8rem;
}

.feature-block {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.feature-block.reverse {
    flex-direction: row-reverse;
}

.feature-text {
    flex: 1;
}

.feature-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.feature-text p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-sub);
}

.feature-visual {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.feature-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.visual-placeholder {
    color: var(--text-sub);
    font-weight: 600;
    font-size: 1.2rem;
}

/* MAIN LAYOUTS & CARDS */
.main-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    width: 100%;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.main-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.main-title span {
    color: var(--accent-color);
}

.page-subtitle {
    color: var(--text-sub);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.card h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card p {
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-sub);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: #000;
    border: 1px solid var(--border-color);
    color: white;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.char-counter {
    text-align: right;
    color: var(--text-sub);
    font-size: 0.8rem;
    margin-top: 5px;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-danger:hover {
    background-color: #a41b24;
}

/* CHANGELOG */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.entry-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.version-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.entry-date {
    color: var(--text-sub);
    font-size: 0.9rem;
    margin-left: auto;
}

.entry-body ul {
    list-style: none;
    padding: 0;
}

.entry-body li {
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.change-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
}

.change-tag.feature {
    color: #64ffda;
    background: rgba(100, 255, 218, 0.1);
}

.change-tag.fix {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.change-tag.improvement {
    color: #748ffc;
    background: rgba(116, 143, 252, 0.1);
}

@media (max-width: 768px) {

    .feature-block,
    .feature-block.reverse {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

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

    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }
}

/* FOOTER */
.site-footer {
    text-align: center;
    padding: 4rem 1rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color);
    margin-top: auto;
}

.link-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.link-list li {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.link-label {
    color: var(--accent-color);
    font-weight: 600;
}

.link-list a {
    color: var(--text-sub);
    text-decoration: none;
}

.link-list a:hover {
    color: var(--text-main);

}

/* PROMO BANNER */
.promo-banner {
    background-color: var(--danger-color);
    color: white;
    text-align: center;
    padding: 10px 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    position: relative;
    z-index: 3000;
    width: 100%;
    animation: slideDown 0.5s ease-out;
}

.promo-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .promo-banner {
        font-size: 0.85rem;
        padding: 8px 1rem;
    }
}