@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    --primary-green: #00ff88;
    --primary-blue: #0088ff;
    --dark-green: #004422;
    --dark-blue: #002244;
    --cyber-glow: rgba(0, 255, 136, 0.3);
    --glass-bg: rgba(0, 0, 0, 0.4);
    --border-glow: rgba(0, 255, 136, 0.6);
    --radius: 8px;
    --shadow-cyber: 0 0 20px rgba(0, 255, 136, 0.2), inset 0 0 20px rgba(0, 136, 255, 0.1);
    --max-width: 1100px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Press Start 2P', cursive;
    background: linear-gradient(45deg, #003300, #001133, #002244);
    color: var(--primary-green);
    display: flex;
    justify-content: center;
    padding: 32px 16px;
    position: relative;
    min-height: 100vh;
}

.digital-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, transparent 98%, #00ff8810 100%),
        linear-gradient(180deg, transparent 98%, #0088ff10 100%);
    background-size: 20px 20px;
    z-index: -2;
}

.wrap {
    width: 100%;
    max-width: var(--max-width);
    position: relative;
    z-index: 1;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background: var(--glass-bg);
    border: 2px solid var(--border-glow);
    box-shadow: var(--shadow-cyber);
    padding: 20px;
    position: relative;
    border-radius: 0;
}

header:hover::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg,
            rgba(0, 255, 136, 0.8),
            rgba(0, 136, 255, 0.8),
            rgba(0, 68, 102, 0.8),
            rgba(0, 255, 136, 0.8));
    z-index: -1;
    animation: border-glow 2s ease-in-out;
}

@keyframes border-glow {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon {
    height: 56px;
    width: auto;
    object-fit: contain;
    border-radius: var(--radius);
    border: 2px solid rgba(0, 255, 136, 0.4);
    padding: 4px;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.brand h1 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--primary-blue);
    text-shadow:
        2px 2px 0px var(--dark-blue),
        0 0 5px var(--primary-green);
    line-height: 1.4;
}

.brand h1:hover {
    animation: neon-breathe 1.5s ease-in-out;
}

@keyframes neon-breathe {

    0%,
    100% {
        text-shadow:
            2px 2px 0px var(--dark-blue),
            0 0 5px var(--primary-green);
    }

    50% {
        text-shadow:
            2px 2px 0px var(--dark-blue),
            0 0 8px var(--primary-green),
            0 0 16px var(--primary-green);
    }
}

.brand p {
    margin: 8px 0 0 0;
    color: #ccffcc;
    font-size: 0.6rem;
    line-height: 1.6;
    text-shadow: 1px 1px 0px #000000;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.feature-link {
    display: flex;
    gap: 15px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--glass-bg);
    border: 2px solid var(--border-glow);
    box-shadow: var(--shadow-cyber);
    transition: all 0.3s ease;
    position: relative;
}

.feature-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.4);
}

.feature-link:hover::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg,
            rgba(0, 255, 136, 0.6),
            rgba(0, 136, 255, 0.6));
    z-index: -1;
    border-radius: calc(var(--radius) + 2px);
    animation: card-glow 1s ease-in-out;
}

@keyframes card-glow {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}

.icon {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 255, 136, 0.4);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
    position: relative;
}

.feature-link:hover .icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg,
            transparent,
            rgba(0, 255, 136, 0.1),
            transparent);
    animation: icon-shine 0.8s ease-in-out;
}

@keyframes icon-shine {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

.feature-link h3 {
    font-size: 0.7rem;
    margin: 0 0 8px 0;
    color: var(--primary-green);
    text-shadow: 1px 1px 0px var(--dark-green);
    line-height: 1.4;
}

.feature-link p {
    margin: 0;
    color: #ccffcc;
    font-size: 0.5rem;
    line-height: 1.6;
    text-shadow: 1px 1px 0px #000000;
}

.feature-link:hover .book-page {
    animation: pageFlip 0.6s ease forwards;
}

@keyframes pageFlip {
    0% {
        transform: rotateY(0deg);
        fill: rgba(0, 255, 136, 0.3);
    }

    50% {
        transform: rotateY(20deg);
        fill: rgba(0, 136, 255, 0.3);
    }

    100% {
        transform: rotateY(0deg);
        fill: rgba(0, 255, 136, 0.3);
    }
}

.digit-text,
.underscore {
    font-family: 'Press Start 2P', cursive;
    font-weight: 700;
    shape-rendering: crispEdges;
    text-anchor: middle;
    dominant-baseline: hanging;
}

.digit-1,
.digit-2,
.digit-3 {
    font-size: 12px;
    opacity: 0;
    fill: var(--primary-green);
}

.underscore-1,
.underscore-2,
.underscore-3 {
    font-size: 12px;
    opacity: 1;
    fill: #ccffcc;
}

.letter-base {
    fill: var(--primary-blue);
}

.feature-link:hover .digit-1 {
    animation: typeIn 0.2s 0.1s forwards ease-out;
}

.feature-link:hover .underscore-1 {
    animation: fadeOut 0.15s 0.1s forwards ease-out;
}

.feature-link:hover .digit-2 {
    animation: typeIn 0.2s 0.3s forwards ease-out;
}

.feature-link:hover .underscore-2 {
    animation: fadeOut 0.15s 0.3s forwards ease-out;
}

.feature-link:hover .digit-3 {
    animation: typeIn 0.2s 0.5s forwards ease-out;
}

.feature-link:hover .underscore-3 {
    animation: fadeOut 0.15s 0.5s forwards ease-out;
}

@keyframes typeIn {
    from {
        opacity: 0;
        transform: translateY(-2px);
    }

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.card {
    background: var(--glass-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-cyber);
    border: 2px solid var(--border-glow);
    padding: 20px;
    position: relative;
}

.card h3 {
    margin: 0 0 15px 0;
    font-size: 0.8rem;
    color: var(--primary-blue);
    text-shadow: 2px 2px 0px var(--dark-blue);
}

.videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    margin-top: 6px;
}

.video-card {
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--radius);
    box-shadow: var(--shadow-cyber);
    border: 2px solid rgba(0, 255, 136, 0.4);
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

.thumbnail-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.thumbnail-container img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform .3s ease;
    filter: brightness(0.8) contrast(1.2);
}

.video-card:hover .thumbnail-container img {
    transform: scale(1.03);
    filter: brightness(1) contrast(1.3);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    border: 2px solid rgba(0, 255, 136, 0.6);
}

.play-icon::after {
    content: '';
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #000000;
}

.video-content {
    padding: 12px 6px 0 6px;
}

.video-content h3 {
    font-size: 0.6rem;
    margin: 0;
    line-height: 1.4;
    color: var(--primary-green);
    text-shadow: 1px 1px 0px var(--dark-green);
}

.video-content .date {
    color: #ccffcc;
    font-size: 0.5rem;
    margin-top: 8px;
    text-shadow: 1px 1px 0px #000000;
}

.video-actions {
    margin-top: 12px;
}

.button {
    display: inline-block;
    padding: 10px 12px;
    background: linear-gradient(145deg, rgba(0, 102, 68, 0.9), rgba(0, 255, 136, 0.9));
    color: #000000;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(0, 255, 136, 0.8);
    text-shadow: none;
    position: relative;
    overflow: hidden;
}

.button:hover {
    background: linear-gradient(145deg, rgba(0, 255, 136, 0.9), rgba(68, 255, 170, 0.9));
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 255, 136, 0.5);
}

.button::before {
    content: '';
    position: absolute;
    inset: 0;
    left: -100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transition: left 0.5s;
}

.button:hover::before {
    left: 100%;
}

.placeholder {
    color: #ccffcc;
    font-size: 0.6rem;
    text-align: center;
    padding: 20px;
    text-shadow: 1px 1px 0px #000000;
}

footer {
    margin-top: 30px;
    background: var(--glass-bg);
    border: 2px solid var(--border-glow);
    box-shadow: var(--shadow-cyber);
    padding: 20px;
    position: relative;
    border-radius: var(--radius);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: left;
}

.footer-section h4 {
    color: var(--primary-blue);
    font-size: 0.6rem;
    margin-bottom: 12px;
    text-shadow: 1px 1px 0px var(--dark-blue);
}

.footer-section a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: bold;
    text-shadow: 1px 1px 0px var(--dark-green);
    font-size: 0.5rem;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-blue);
    text-shadow: 1px 1px 0px var(--dark-blue);
    transform: translateY(-1px);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 136, 0.3);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.6);
    transform: translateY(-2px);
}

.social-links svg {
    flex-shrink: 0;
}

@media (max-width:640px) {
    body {
        padding: 20px 12px;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .header-icon {
        height: 48px;
    }

    .brand h1 {
        font-size: 1rem;
        text-shadow: 1px 1px 0px var(--dark-blue), 0 0 3px var(--primary-green);
    }

    .brand p {
        font-size: 0.55rem;
    }

    .features {
        gap: 15px;
    }

    .feature-link {
        padding: 15px;
        gap: 12px;
    }

    .feature-link h3 {
        font-size: 0.65rem;
    }

    .feature-link p {
        font-size: 0.45rem;
    }

    .video-card {
        padding: 12px;
    }

    .video-content h3 {
        font-size: 0.55rem;
    }

    .video-content .date {
        font-size: 0.45rem;
    }

    .button {
        font-size: 0.45rem;
        padding: 8px 10px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }

    .social-links {
        align-items: center;
    }

    .footer-section h4 {
        font-size: 0.55rem;
    }

    .footer-section a {
        font-size: 0.45rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px 8px;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-link {
        padding: 12px;
        gap: 10px;
    }

    .icon {
        width: 48px;
        height: 48px;
        flex: 0 0 48px;
    }

    .feature-link h3 {
        font-size: 0.6rem;
    }

    .feature-link p {
        font-size: 0.4rem;
    }

    .card {
        padding: 15px;
    }

    .card h3 {
        font-size: 0.7rem;
    }

    .videos {
        gap: 12px;
    }

    .video-card {
        padding: 10px;
    }

    .video-content h3 {
        font-size: 0.5rem;
    }

    .video-content .date {
        font-size: 0.4rem;
    }

    .button {
        font-size: 0.4rem;
        padding: 6px 8px;
    }

    footer {
        padding: 15px;
    }

    .social-links a {
        padding: 5px 6px;
        gap: 6px;
    }

    .footer-section h4 {
        font-size: 0.5rem;
        margin-bottom: 10px;
    }

    .footer-section a {
        font-size: 0.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}