* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f8;
    color: #2c3e50;
    line-height: 1.6;
}


header {
    text-align: center;
    padding: 10px;
    background: linear-gradient(120deg, #2980b9, #6dd5fa);
    color: white;
}

header h1 {
    font-weight: 700;
    margin: 0;
}

nav {
    background: #34495e;
    padding: 10px;
    text-align: center;
}
.question{
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.admin-nav {
    display: flex;
    justify-content: space-around;
}

nav a {
    color: white;
    margin: 0 10px;
    text-decoration: none;
    font-weight: 500;
}

nav a:hover {
    text-decoration: underline;
}

button.navbar-toggler {
    width: auto
}

.stats {
    display: flex;
    gap: 10px;

}

.card1 {
    flex: 1;
    border-radius: 8px;
    border-style: solid;
    text-align: center;
    border-color: #a2a2c5;
    color: #ffffff;
    background-color: #3498db;
}

.subject-grid {
    display: grid;
    gap: 25px;
    justify-content: center;
    padding: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.subject-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.subject-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.subject-body {
    padding: 15px;
}

.subject-body h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 8px;
}

.subject-body p {
    color: #666;
    font-size: 0.95rem;
    min-height: 45px;
    overflow: hidden;
}

.btn-view {
    display: inline-block;
    padding: 8px 15px;
    color: #ffffff
    background: #3498db;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
}

.btn-view:hover {
    background: #217dbb;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px;
}
.container-info {
    display: flex
;
    align-items: center;
    justify-content: space-between;
}
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

th,
td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

th {
    background: #3498db;
    color: white;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

.btn {
    display: inline-block;
    margin: 4px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.btn-role {
    background: #8e44ad
}

.btn-add {
    background: #27ae60;
}

.btn-edit {
    background: #f39c12;
}

.btn-delete {
    background: #e74c3c;
}

.btn-back {
    background: #3d3d3d;
    color: #ffffff
}
input[type="radio"] {
    margin-right: 8px;

}
input,
textarea,
select {
    
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

button {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

button:hover {
    background: #2980b9;
}


.auth-box {
    max-width: 360px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    margin: 50px auto;
    text-align: center;
}

.auth-box h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.auth-box a {
    color: #3498db;
    font-weight: bold;
    text-decoration: none;
}


.quiz-list {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.quiz-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.quiz-card h3 {
    color: #34495e;
}


.btn-start {
    background: #27ae60;
    color: white;
    border-radius: 5px;
    padding: 8px 15px;
    text-decoration: none;
}

.btn-start:hover {
    background: #219150;
}
.form-check1 {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
    margin-bottom: 10px;
}
.form-check-input1 {
    margin: 0 10px 0 0;
}


@media (max-width: 576px) {
    header {
        padding: 15px;
        font-size: 16px;
    }

    .subject-grid {
        grid-template-columns: 1fr;
    }

    .subject-card {
        width: 100%;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        margin: 5px;
    }

    .container {
        padding: 10px;
    }

    table,
    th,
    td {
        font-size: 12px;
        padding: 8px;
    }

    button,
    .btn {
        font-size: 14px;
        padding: 10px;
    }

    .auth-box {
        width: 90%;
        padding: 20px;
    }
}

@media (min-width: 577px) and (max-width: 992px) {
    .subject-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    table,
    th,
    td {
        font-size: 13px;
    }
}

/* 🖥️ Desktop lớn */
@media (min-width: 993px) {
    .container {
        max-width: 1200px;
    }
}