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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #0f0f0f;
    /* Fallback */
    background: radial-gradient(circle at 50% 0%, #1a1a1a 0%, #0f0f0f 100%);
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ===========================
   PARTICLE BACKGROUND
   =========================== */
#particleContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
}

/* ===========================
   MAIN CONTENT LAYOUT
   =========================== */
main {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 140px 2rem 4rem 2rem;
    /* Spacing for fixed navbar */
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
    animation: fadeInDown 0.8s ease-out;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ff00cc 0%, #333399 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.6;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    padding: 0 1rem;
    animation: fadeIn 1s ease-out;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #ffffff;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

/* Grid & Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 0 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* CARD STYLING & HOVER EFFECT */
.project-card {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    /* Needed for the shine effect */
    animation: fadeInUp 0.6s ease both;
    /* 'both' keeps it visible after anim */
    display: flex;
    flex-direction: column;
}

/* The Shine Effect (Gradient Swipe) */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 10;
    pointer-events: none;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.05);
    transform: translateY(-10px);
    background: rgba(40, 40, 40, 0.8);
}

/* Code Preview Section */
.code-preview {
    background: #0a0a0a;
    padding: 1.5rem;
    height: 180px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

/* Add a green line at top of code block */
.code-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ff88, transparent);
    opacity: 0.5;
}

.code-text {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #00ff88;
    white-space: pre-wrap;
    line-height: 1.5;
    opacity: 0.9;
}

.project-info {
    padding: 1.5rem 2rem 2rem 2rem;
    flex-grow: 1;
}

.project-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: white;
}

.project-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tag {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.75rem;
    color: #ccc;
    transition: all 0.3s ease;
}

.project-card:hover .tag {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Animation Keyframes */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* ===========================
   GAME BUTTON STYLES
   =========================== */

/* ===========================
   GAME BUTTON STYLES
   =========================== */

/* Ensure tags have a margin bottom to separate from button */
.project-tags {
    margin-bottom: 1.5rem;
    margin-top: auto;
}

/* Container for the two buttons */
.card-actions {
    display: flex;
    gap: 10px;
    /* Space between buttons */
    width: 100%;
}

.game-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    /* Makes buttons share equal width */
    padding: 0.8rem 0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

/* --- PRIMARY BUTTON (Play Demo) --- */
.game-btn.primary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.game-btn.primary:hover {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    border-color: transparent;
    color: #000000;
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
    transform: translateY(-2px);
}

/* --- SECONDARY BUTTON (View Code/GitHub) --- */
.game-btn.secondary {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cccccc;
}

.game-btn.secondary:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: #000000;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.game-btn:active {
    transform: translateY(-1px);
}
/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem 4rem;
    }

    nav {
        padding: 1rem 1.5rem;
    }
}

