/* Reset & Font */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #0f172a;
    color: #fff;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: #020617;
}

.logo {
    font-size: 22px;
    font-weight: 600;
    color: #38bdf8;
}

.nav-links a {
    margin-left: 20px;
    text-decoration: none;
    color: #fff;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #38bdf8;
}

/* HERO */
.hero {
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-size: 40px;
}

.hero p {
    margin-top: 10px;
    color: #94a3b8;
}

/* CONTAINER */
.container {
    padding: 40px;
}

/* GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* CARD */
.card {
    background: #1e293b;
    padding: 20px;
    border-radius: 15px;
    transition: 0.3s;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    background: #334155;
}

.card h3 {
    margin-bottom: 10px;
}

.card p {
    color: #94a3b8;
    font-size: 14px;
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 30px;
    margin-top: 40px;
    background: #020617;
    color: #94a3b8;
}
/* ---------- TUTORIAL PAGE SPECIFIC STYLES ---------- */

/* Code block styling */
pre {
    background: #020617;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    position: relative;
}

button.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #38bdf8;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
}

/* Video styling */
.video iframe {
    width: 80%;            /* 80% of container */
    height: 600px;         /* fixed height */
    border-radius: 10px;
    display: block;        /* allows margin auto to work */
    margin: 0 auto;        /* centers iframe */
}

/* Content area */
.content {
    width: 80%;           /* same as iframe */
    margin: 10px auto 40px auto; /* centers content with bottom margin */
    background: #1e293b;
    padding: 25px;
    border-radius: 10px;
    line-height: 1.7;
    overflow-wrap: break-word;
}
/* Tutorial page title */
.title {
     width: 80%;           /* same as iframe */
    margin: 0 auto 40px auto; /* centers content with bottom margin */
    background: #1e293b;
    padding: 25px;
    border-radius: 10px;
    line-height: 1.7;
    overflow-wrap: break-word;
}

.categories {
    margin-bottom: 30px;
    text-align: center;
}

.categories a {
    display: inline-block;
    margin: 0 10px 10px 0;
    padding: 8px 15px;
    background: #1e293b;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s;
}

.categories a:hover,
.categories a.active {
    background: #38bdf8;
    color: #020617;
}

.nav-links a.active {
    color: #38bdf8;
}

.search-bar {
    text-align: center;
    margin-bottom: 20px;
}

.search-bar input[type="text"] {
    padding: 8px 12px;
    width: 250px;
    border-radius: 5px;
    border: none;
    margin-right: 5px;
}

.search-bar button {
    padding: 8px 12px;
    border-radius: 5px;
    border: none;
    background: #38bdf8;
    color: #020617;
    cursor: pointer;
}

.search-bar button:hover {
    background: #0ea5e9;
}

.hero-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #38bdf8;
    color: #020617;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.hero-btn:hover {
    background: #0ea5e9;
}