:root {
    --neon-blue: #00f3ff;
    --neon-pink: #ff2a6d;
    --cyber-yellow: #f9f002;
    --cyber-green: #00ff88;
    --dark-bg: #0a0a1a;
    --darker-bg: #050510;
    --panel-bg: rgba(10, 10, 30, 0.8);
    --border-glow: 0 0 20px rgba(0, 243, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Share Tech Mono', monospace;
    background: var(--darker-bg);
    background-image: 
        linear-gradient(45deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(-45deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.tutorial-header {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a1a2e 50%, var(--dark-bg) 100%);
    border-bottom: 2px solid var(--neon-blue);
    padding: 20px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tutorial-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.1), transparent);
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.tutorial-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--neon-blue);
    text-shadow: 0 0 30px var(--neon-blue);
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.tutorial-subtitle {
    font-size: 1.2rem;
    color: var(--cyber-yellow);
    text-shadow: 0 0 10px var(--cyber-yellow);
    position: relative;
    z-index: 2;
}

/* Navigation */
.tutorial-nav {
    background: var(--panel-bg);
    border-bottom: 1px solid var(--neon-blue);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    position: relative;
}

.nav-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--neon-blue);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--neon-blue);
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-back:hover {
    background: rgba(0, 243, 255, 0.1);
    box-shadow: var(--border-glow);
    transform: translateX(-5px);
}

/* Hamburger Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--neon-blue);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-toggle-active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle-active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle-active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Screenshot Containers */

.screenshot-container img {
    margin: 20px 0;
    text-align: center;
    width: 100%;
    border-radius: 10px;
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
    transition: all 0.3s ease;
}

.screenshot-container-cipher img {
    margin: 20px 0;
    text-align: center;
    width: 100%;
    transition: all 0.3s ease;
}

.screenshot-container img:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.5);
}

.screenshot-container.main-menu img {
    max-width: 100%;
}

.screenshot-container.mode-card img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.screenshot-container p {
    margin-top: 10px;
    color: var(--neon-blue);
    font-weight: 600;
}

.screenshot-container.mode-card p {
    margin-top: 8px;
    font-size: 0.9rem;
}

/* Technique Cards */
.techniques-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.technique-card {
    background: rgba(5, 5, 16, 0.9);
    border: 2px solid var(--neon-blue);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.technique-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.4);
    border-color: var(--cyber-yellow);
}

.technique-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.technique-card:hover::before {
    left: 100%;
}

.technique-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--neon-blue);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.technique-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
}

.nav-menu {
    display: flex;
    gap: 15px;
    list-style: none;
    flex-wrap: nowrap;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--neon-blue);
    color: var(--dark-bg);
    box-shadow: 0 0 15px var(--neon-blue);
}

/* Main Content */
.tutorial-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 2.5rem) clamp(1rem, 3vw, 1.25rem);
}

.tutorial-section {
    background: var(--panel-bg);
    border: 2px solid var(--neon-blue);
    border-radius: 15px;
    padding: clamp(1.5rem, 4vw, 1.875rem);
    margin-bottom: clamp(2rem, 5vw, 2.5rem);
    box-shadow: var(--border-glow);
    position: relative;
    overflow: hidden;
}

.tutorial-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-pink), var(--cyber-yellow));
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--neon-blue);
    margin-bottom: 20px;
    text-shadow: 0 0 20px var(--neon-blue);
    display: flex;
    align-items: center;
    gap: 15px;
    line-height: 1.2;
}

.section-icon {
    font-size: clamp(1.25rem, 3vw, 2rem);
    color: var(--cyber-yellow);
    flex-shrink: 0;
}

.section-content {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    line-height: 1.8;
}

/* Game Mode Cards */
.game-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.mode-card {
    background: rgba(5, 5, 16, 0.9);
    border: 2px solid var(--neon-blue);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.4);
    border-color: var(--cyber-yellow);
}

.mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.mode-card:hover::before {
    left: 100%;
}

.mode-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--neon-blue);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-icon {
    font-size: 1.5rem;
    color: var(--cyber-yellow);
}

.mode-description {
    color: #ccc;
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.6;
}

.mode-description p {
    margin-bottom: 15px;
}

.mode-description ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.mode-description li {
    margin-bottom: 5px;
}

.mode-features {
    list-style: none;
    margin-bottom: 20px;
}

.mode-features li {
    color: var(--cyber-green);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-features li::before {
    content: '▶';
    color: var(--neon-blue);
    font-size: 0.8rem;
}

.difficulty-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.difficulty-beginner { background: var(--cyber-green); color: var(--dark-bg); }
.difficulty-intermediate { background: var(--cyber-yellow); color: var(--dark-bg); }
.difficulty-advanced { background: var(--neon-pink); color: #fff; }

/* Cipher Types */
.cipher-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.cipher-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--neon-blue);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.cipher-card:hover {
    border-color: var(--cyber-yellow);
    box-shadow: 0 0 20px rgba(249, 240, 2, 0.3);
}

.cipher-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    color: var(--neon-blue);
    margin-bottom: 10px;
}

.cipher-example {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--neon-pink);
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    color: var(--cyber-yellow);
}

/* Screenshots */
.screenshot-placeholder {
    background: rgba(0, 0, 0, 0.5);
    border: 2px dashed var(--neon-blue);
    border-radius: 10px;
    padding: 60px 20px;
    text-align: center;
    margin: 20px 0;
    color: var(--neon-blue);
    font-style: italic;
}

.screenshot-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    color: var(--cyber-yellow);
}

/* Tips and Tricks */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.tip-card {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--cyber-green);
    border-radius: 8px;
    padding: 20px;
    position: relative;
}

.tip-card::before {
    content: '💡';
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--dark-bg);
    padding: 0 10px;
    font-size: 1.5rem;
}

.tip-title {
    color: var(--cyber-green);
    font-weight: 600;
    margin-bottom: 10px;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 12px;
    }

    .nav-menu a {
        padding: 5px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .tutorial-title {
        font-size: 2rem;
    }

    .nav-container {
        flex-direction: row;
        gap: 10px;
        padding: 0 15px;
    }

    /* Show hamburger menu on mobile */
    .nav-toggle {
        display: flex;
    }

    /* Hide desktop nav menu, show mobile version */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--panel-bg);
        border: 1px solid var(--neon-blue);
        border-top: none;
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
    }

    .nav-menu-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        display: block;
        padding: 12px 20px;
        font-size: 1rem;
        width: 100%;
        border-radius: 0;
        transition: all 0.3s ease;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: rgba(0, 243, 255, 0.1);
        color: var(--neon-blue);
    }

    .nav-back {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .game-modes {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .tutorial-section {
        padding: 20px;
    }

    .modal-content {
        max-width: 95%;
        max-height: 95%;
    }

    .close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }

}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 10px;
        gap: 8px;
    }

    .nav-back {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .nav-toggle {
        padding: 6px;
    }

    .nav-toggle span {
        width: 20px;
        height: 2px;
    }

    .nav-menu a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tutorial-section {
    animation: fadeInUp 0.6s ease-out;
}

/* Image Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.5);
    border: 2px solid var(--neon-blue);
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: var(--neon-blue);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px var(--neon-blue);
}

.close:hover,
.close:focus {
    color: var(--cyber-yellow);
    text-shadow: 0 0 20px var(--cyber-yellow);
    transform: scale(1.1);
}


@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--neon-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cyber-yellow);
}
