/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Reset */
:root{
    --bg:#f5f7fb;
    --card:#ffffff;
    --text:#222;
    --text-muted:rgba(34,34,34,.65);
    --primary:#4f46e5;
    --shadow:0 10px 30px rgba(0,0,0,.08);
    --tag-bg:#eef2ff;
}

body.dark{
    --bg:#0f172a;
    --card:#1e293b;
    --text:#f8fafc;
    --text-muted:rgba(248,250,252,.65);
    --primary:#818cf8;
    --shadow:0 10px 30px rgba(0,0,0,.45);
    --tag-bg:rgba(129,140,248,.15);
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

html{
    scroll-behavior:smooth;
}

body{
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:var(--bg);
    color:var(--text);
    transition:background .4s ease, color .4s ease;

}

main{
    flex:1;
}

/* Navbar */

header{
    width:100%;
    position:sticky;
    top:0;
    z-index:1000;
    background:var(--card);
    box-shadow:var(--shadow);
}

.nav{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px 40px;
    background:var(--card);
    box-shadow:var(--shadow);
    position:sticky;
    top:0;
    z-index:1000;
    transition:background .4s ease, box-shadow .4s ease;

}

.logo{
    color:var(--primary);
    font-size:28px;
    font-weight:700;
}

.nav-links{
    display:flex;
    align-items:center;
    gap:25px;
}

.nav-links a{
    text-decoration:none;
    color:var(--text);
    font-weight:500;
    transition:.3s;
    position:relative;
    padding-bottom:4px;
}

.nav-links a::after{
    content:"";
    position:absolute;
    left:0;
    bottom:-2px;
    width:0%;
    height:2px;
    background:var(--primary);
    transition:width .3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after{
    width:100%;
}

.nav-links a:hover,
.nav-links a.active{
    color:var(--primary);
}
/* Space between links and theme button */
.theme-btn{
    margin-left:20px;
}

.theme-btn{
    width:48px;
    height:48px;
    border:none;
    border-radius:50%;
    background:linear-gradient(135deg,#4f46e5,#7c3aed);
    color:#fff;
    font-size:20px;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:all .35s ease;
    box-shadow:0 8px 20px rgba(79,70,229,.35);
}

.theme-btn:hover{
    transform:rotate(180deg) scale(1.1);
    box-shadow:0 12px 28px rgba(79,70,229,.5);
}

.theme-btn:active{
    transform:scale(.9);
}
.theme-btn.spin{
    animation:spinOnce .5s ease;
}

@keyframes spinOnce{
    from{ transform:rotate(0deg) scale(1); }
    to{ transform:rotate(360deg) scale(1); }
}

.menu-btn{
    display:none;
    font-size:24px;
    cursor:pointer;
    color:var(--text);
    margin-left:15px;
}

/* Hero Section */

.hero{
    text-align:center;
    padding:100px 20px;
    background:linear-gradient(135deg,#4f46e5,#7c3aed);
    color:#fff;
}

.hero h1{
    font-size:50px;
    margin-bottom:20px;
}

.hero p{
    max-width:700px;
    margin:auto;
    line-height:1.8;
    font-size:18px;
}

/* Search Section */

.search-section{
    max-width:900px;
    margin:50px auto;
    padding:0 20px;
}

.search-box{
    display:flex;
    background:var(--card);
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 8px 25px rgba(0,0,0,.08);
}

.search-box input{
    flex:1;
    border:none;
    outline:none;
    padding:18px;
    font-size:16px;
    background:var(--card);
    color:var(--text);
}

.search-box button{
    border:none;
    background:#4f46e5;
    color:#fff;
    padding:0 30px;
    cursor:pointer;
    transition:.3s;
}

.search-box button:hover{
    background:#4338ca;
}

/* Filters */

.filters{
    max-width:1200px;
    margin:40px auto;
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:15px;
    padding:0 20px;
}

.filters button{
    border:none;
    padding:12px 22px;
    border-radius:30px;
    background:#fff;
    color:#333;
    font-weight:600;
    cursor:pointer;
    box-shadow:0 5px 15px rgba(0,0,0,.08);
    transition:.3s;
}

.filters button:hover{
    background:#4f46e5;
    color:#fff;
}

.filters .active{
    background:#4f46e5;
    color:#fff;
}

/* Teams Grid */

.teams-grid{
    max-width:1200px;
    margin:60px auto;
    padding:0 20px;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:30px;
}

/* Team Card */
.team-card{
    background:var(--card);
    border-radius:20px;
    padding:25px;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
    transition:.35s ease;
    position:relative;
    overflow:hidden;
}

.team-card::before{
    content:"";
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:5px;
    background:linear-gradient(90deg,#4f46e5,#7c3aed,#06b6d4);
}

.team-card:hover{
    transform:translateY(-10px);
    box-shadow:0 20px 40px rgba(0,0,0,.15);
}

/* Team Header */
.team-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px;
}

.team-header h2{
    font-size:22px;
    color:var(--text);
}

/* Status Badge */

.status{
    padding:6px 12px;
    border-radius:20px;
    font-size:12px;
    font-weight:600;
}

.status.open{
    background:#dcfce7;
    color:#16a34a;
}

.status.full{
    background:#fee2e2;
    color:#dc2626;
}

/* Category */

.category{
    color:#4f46e5;
    font-weight:600;
    margin-bottom:10px;
    font-size:14px;
}

/* Description */

.team-card p{
    color:var(--text);
    line-height:1.6;
    margin-bottom:15px;
}

/*Members Info*/

.members{
    font-weight:600;
    color:#444;
    margin-bottom:15px;
}

/*Roles Tags*/

.roles{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:20px;
}

.roles span{
    background:#eef2ff;
    color:#4f46e5;
    padding:6px 12px;
    border-radius:20px;
    font-size:12px;
    font-weight:600;
}

.team-card button{
    width:100%;
    padding:14px;
    border:none;
    border-radius:12px;
    background:#4f46e5;
    color:#fff;
    font-weight:600;
    cursor:pointer;
    transition:.3s;
}

.team-card button:hover{
    background:#4338ca;
    transform:scale(1.03);
}

.team-card button:disabled{
    background:#9ca3af;
    cursor:not-allowed;
    transform:none;
}
/*Pagination */

.pagination{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:12px;
    margin:70px 0;
    flex-wrap:wrap;
}

.pagination button{
    width:45px;
    height:45px;
    border:none;
    border-radius:50%;
    background:#fff;
    color:#333;
    font-weight:600;
    cursor:pointer;
    box-shadow:0 5px 15px rgba(0,0,0,.08);
    transition:.3s;
}

.pagination button:hover{
    background:#4f46e5;
    color:#fff;
    transform:translateY(-3px);
}

.pagination .active{
    background:#4f46e5;
    color:#fff;
}

/*Create Team Section */

.create-team{
    max-width:1100px;
    margin:80px auto;
    padding:60px 30px;
    text-align:center;
    background:linear-gradient(135deg,#4f46e5,#7c3aed);
    color:#fff;
    border-radius:20px;
}

.create-team h2{
    font-size:38px;
    margin-bottom:20px;
}

.create-team p{
    max-width:700px;
    margin:auto;
    line-height:1.8;
    margin-bottom:30px;
    color:#f3f4f6;
}

.create-btn{
    display:inline-block;
    padding:15px 35px;
    background:#fff;
    color:#4f46e5;
    text-decoration:none;
    font-weight:600;
    border-radius:10px;
    transition:.3s;
}

.create-btn:hover{
    background:#111827;
    color:#fff;
    transform:translateY(-4px);
}

/*Footer */

footer{
    background:#111827;
    color:#fff;
    margin-top:auto;
    padding:60px 20px;
}

.footer-container{
    max-width:1200px;
    margin:auto;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:40px;
}

.footer-container h3,
.footer-container h4{
    margin-bottom:20px;
}

.footer-container p{
    color:#ddd;
    line-height:1.8;
}

.footer-container a{
    color:#ddd;
    text-decoration:none;
    transition:.3s;
}

.footer-container a:hover{
    color:#fff;
}

.footer-container i{
    color:#4f46e5;
    margin-right:10px;
}

footer hr{
    margin:40px 0 20px;
    border:1px solid rgba(255,255,255,.12);
}

footer .copyright{
    text-align:center;
    color:#bbb;
}

/* RESPONSIVE DESIGN */

/* Hide menu button on desktop */
.menu-btn{
    display:none;
}

/* Tablet */
@media (max-width:992px){

    .nav{
        padding:15px 25px;
    }

    .logo{
        font-size:24px;
    }

    .hero{
        padding:80px 20px;
    }

    .hero h1{
        font-size:42px;
    }

    .hero p{
        font-size:17px;
    }

    .teams-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .search-box{
        flex-direction:column;
    }

    .search-box button{
        width:100%;
        height:55px;
    }
}

/* Mobile */
@media (max-width:768px){

    .nav{
        padding:15px 20px;
        position:relative;
    }

    .logo{
        font-size:22px;
    }

    .theme-btn{
        width:42px;
        height:42px;
        margin-left:auto;
        margin-right:12px;
        font-size:18px;
    }

    .menu-btn{
        display:flex;
        align-items:center;
        justify-content:center;
        font-size:24px;
        cursor:pointer;
        color:var(--text);
    }

    .nav-links{
        display:none;
    }

    .nav-links.open{
        display:flex;
        flex-direction:column;
        align-items:center;
        gap:18px;

        position:absolute;
        top:75px;
        left:0;

        width:100%;
        padding:25px 0;

        background:var(--card);
        box-shadow:0 10px 25px rgba(0,0,0,.15);
        z-index:999;
    }

    .nav-links a{
        width:100%;
        text-align:center;
        padding:10px;
    }

    .hero{
        padding:70px 20px;
    }

    .hero h1{
        font-size:32px;
    }

    .hero p{
        font-size:16px;
    }

    .search-section{
        margin:35px auto;
    }

    .search-box{
        flex-direction:column;
    }

    .search-box input{
        width:100%;
    }

    .search-box button{
        width:100%;
        height:50px;
    }

    .filters{
        gap:10px;
    }

    .filters button{
        padding:10px 16px;
        font-size:14px;
    }

    .teams-grid{
        grid-template-columns:1fr;
        gap:20px;
    }

    .team-card{
        padding:20px;
    }

    .team-header{
        flex-direction:column;
        align-items:flex-start;
        gap:10px;
    }

    .roles{
        gap:6px;
    }

    .pagination{
        gap:8px;
    }

    .pagination button{
        width:40px;
        height:40px;
    }

    .create-team{
        margin:50px 15px;
        padding:40px 20px;
    }

    .create-team h2{
        font-size:28px;
    }

    .create-team p{
        font-size:15px;
    }

    .footer-container{
        grid-template-columns:1fr;
        text-align:center;
    }
}

/* Small Phones */
@media (max-width:480px){

    .hero h1{
        font-size:28px;
    }

    .hero p{
        font-size:15px;
    }

    .team-card{
        padding:18px;
    }

    .team-header h2{
        font-size:20px;
    }

    .roles span{
        font-size:11px;
        padding:5px 10px;
    }

    .team-card button{
        padding:12px;
    }

    .footer{
        padding:40px 20px;
    }
}