/* ----------------------------- Global Container ----------------------------- */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
   padding-top: calc(5% + 60px); /* 60px = navbar height */
}

/* ----------------------------- Section ----------------------------- */
.cheat-section, .demo-section {
    margin-bottom: 3rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: #111;
    box-shadow: 0 0 15px rgba(0,255,255,0.2);
}
.cheat-section h2, .demo-section h2 {
    color: #0ff;
    font-size: 2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #0ff;
    padding-bottom: 0.5rem;
}
.cheat-section p, .demo-section p { color: #ccc; margin-bottom: 1rem; }

/* ----------------------------- Separator ----------------------------- */
.blue-separator {
    border: none;
    height: 3px;
    background-color: #0ff;
    margin: 1.5rem 0;
    border-radius: 2px;
}

/* ----------------------------- Hero Section ----------------------------- */
.hero-section {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #0ff 0%, #f0f 100%);
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: 0 0 20px rgba(0,255,255,0.4);
        margin-top: 60px;
}
.hero-section h1 { font-size: 3rem; color: #fff; margin-bottom: 1rem; }
.hero-section p { font-size: 1.2rem; color: #e0e0e0; }

/* ----------------------------- Terminal / Code Blocks ----------------------------- */
.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;
    background: transparent;
    padding: 0;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
}

/* ----------------------------- Animations ----------------------------- */
@keyframes portraitReveal {
    0% { transform: translateY(8%) scale(.98); opacity: 0; filter: saturate(.8); }
    20% { transform: translateY(0%) scale(1); opacity:1; filter: saturate(1.1); }
    80% { transform: translateY(0%) scale(1); opacity:1; }
    100% { transform: translateY(-6%) scale(.98); opacity:0; }
}
@keyframes portraitGlow { 0% {filter: brightness(0.8);} 100% {filter: brightness(1.3);} }
@keyframes cardSlide {
    0%{transform:rotateY(-30deg) translateX(-150px) scale(0.8);opacity:0;}
    20%{transform:rotateY(0deg) translateX(0) scale(1);opacity:1;}
    60%{transform:rotateY(0deg) translateX(0) scale(1);opacity:1;}
    100%{transform:rotateY(30deg) translateX(150px) scale(0.8);opacity:0;}
}
@keyframes slideAcross {
    0%{transform:translateX(-100%) skewX(-6deg) scaleX(1.05); opacity:0.2;}
    25%{opacity:1;}
    50%{transform:translateX(0%) skewX(0deg) scaleX(1);opacity:1;}
    75%{opacity:1;}
    100%{transform:translateX(100%) skewX(6deg) scaleX(1.05); opacity:0.2;}
}
@keyframes bounce {0%,100%{transform:translateY(0);}50%{transform:translateY(-16px);}}
@keyframes fadeInOut {0%{opacity:0;transform:scale(0.98);}20%{opacity:1;transform:scale(1);}80%{opacity:1;transform:scale(1);}100%{opacity:0;transform:scale(0.98);}}
@keyframes pulse {0%{box-shadow:0 0 5px #0ff;transform:scale(1);}50%{box-shadow:0 0 20px #0ff;transform:scale(1.04);}100%{box-shadow:0 0 5px #0ff;transform:scale(1);}}

/* ----------------------------- Portrait Demo ----------------------------- */
.portrait-demo {
    width: 280px; height: 380px;
    border-radius: 12px;
    margin: 1rem auto;
    display: flex; align-items: center; justify-content: center;
    color: #001f2f; font-weight: 700; font-family: system-ui, sans-serif;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    animation: portraitReveal 4s ease-in-out infinite;
    background: linear-gradient(180deg,#a0f,#0ff);
}

/* ----------------------------- 3-Card Portrait ----------------------------- */
.portrait-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 3rem auto;
    display: flex;
    justify-content: center;
    gap: 2rem;
    perspective: 1200px;
}
.portrait-card {
    width: 200px; height: 350px;
    background: linear-gradient(135deg,#111,#333);
    border: 2px solid #0ff;
    border-radius: 1rem;
    position: relative; overflow: hidden;
    transform-style: preserve-3d;
    animation: cardSlide 6s ease-in-out infinite;
    animation-fill-mode: both;
}
.portrait-card:nth-child(2){animation-delay: 1s;}
.portrait-card:nth-child(3){animation-delay: 2s;}
.portrait-inner {
    width: 100%; height: 100%;
    background: linear-gradient(180deg,#0ff,#004d4d);
    animation: portraitGlow 4s infinite alternate;
}
.portrait-title {
    position: absolute; bottom: 0; width: 100%;
    padding: 0.6rem; text-align: center;
    background: rgba(0,255,255,0.15); backdrop-filter: blur(4px);
    font-size: 1rem; border-top: 1px solid #0ff;
}

/* ----------------------------- Full-width Sliding Layer ----------------------------- */
.full-transition {
    width: 100%; height: 180px;
    border-radius: 10px;
    margin: 0.5rem 0;
    overflow: hidden; position: relative;
    box-shadow: inset 0 0 60px rgba(255,255,255,0.03);
}
.full-transition .layer {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(0,255,255,0.95), rgba(255,0,255,0.85));
    transform-origin: center;
    animation: slideAcross 4s linear infinite;
}

/* ----------------------------- Hover Bounce ----------------------------- */
.bounce-card {
    width: 300px; height: 150px;
    background: linear-gradient(180deg,#0b0b0b,#111);
    border: 2px solid rgba(0,255,255,0.15);
    border-radius: 12px;
    margin: 1rem auto;
    display: flex; align-items: center; justify-content: center;
    transition: transform .25s ease, box-shadow .25s ease;
}
.bounce-card:hover, .bounce-card:focus {
    animation: bounce 0.9s ease 1;
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,255,255,0.06);
}

/* ----------------------------- Pulse ----------------------------- */
.pulse-block {
    width: 260px; height: 120px;
    border-radius: 10px; margin: 1rem auto;
    background: linear-gradient(135deg,#001122,#003344);
    animation: pulse 2.2s ease-in-out infinite;
    display: flex; align-items: center; justify-content: center;
    color: #0ff; font-weight: 600;
}

/* ----------------------------- Grid ----------------------------- */
.grid-demo {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.grid-demo .cell {
    height: 120px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #002;
}
.grid-demo .cell:nth-child(1) { animation: fadeInOut 5s infinite; background: linear-gradient(135deg,#bff,#0ff);}
.grid-demo .cell:nth-child(2) { animation: slideAcross 6s infinite; background: linear-gradient(135deg,#9ef,#0cf);}
.grid-demo .cell:nth-child(3) { animation: pulse 3s infinite; background: linear-gradient(135deg,#7cf,#099);}

/* ----------------------------- Mobile / Responsive Adjustments ----------------------------- */
@media (max-width: 768px) {
    .container { padding: 1rem; }

    .hero-section h1 { font-size: 2rem; }
    .hero-section p { font-size: 1rem; }

    .portrait-demo { width: 220px; height: 300px; }
    .portrait-wrapper { flex-direction: column; align-items: center; gap: 1.5rem; }
    .portrait-card { width: 80%; height: 300px; }

    .grid-demo { grid-template-columns: 1fr; gap: 8px; }
    .grid-demo .cell { height: 100px; font-size: 0.9rem; }

    .bounce-card, .pulse-block, .full-transition { width: 90%; }
}
