    /* ساختار اصلی */
    body {
        margin: 0;
        font-family: sans-serif;
        direction: rtl;
        background: #f3f3f3;
        background-image: url(bgpc.jpg);
        backdrop-filter: blur(30px);
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        background-position-y: -340px;
    }

    @media (max-width: 600px) {
        body {
            background-position-y: 19px;
            background-size: 620px;
        }
         .cards-row {
        display: flex;
        gap: 20px;
       
        margin-bottom: 40px;
        flex-wrap: wrap;
    }
    .card {
        width: 100%;
        flex: none;
    }

    }

    .container {
        max-width: 1100px;
        margin: 40px auto;
        padding: 0 20px;

        min-height: 100vh;
    }

    /* کارت‌ها (سه مربع بالا) */
    .cards-row {
        display: flex;
        gap: 20px;
        justify-content: space-between;
        margin-bottom: 40px;
        flex-wrap: wrap;
    }

    .card {
        flex: 1 1 calc(33.33% - 20px);
        background: #d1d1d1;
        color: #3b3b3b;
        border-radius: 8px;
        padding: 30px 20px 20px;
        text-align: center;
        box-shadow: 0px 2px 10px 0px black;
    }

    .card-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .card button {
        margin-top: 20px;
        background: #007bff;
        color: #fff;
        border: none;
        padding: 10px 18px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
    }

    .card button:hover {
        background: #005fcc;
    }

    /* لیست دانش‌آموزها */
    .students-list {
        margin-top: 20px;
        background: #fff;
        border-radius: 8px;
        padding: 20px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    }

    .students-list h2 {
        margin-top: 0;
        margin-bottom: 15px;
        font-size: 18px;
    }

    .student-row {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 8px 0;
        gap: 344px;
        border-bottom: 1px solid #eee;
    }

    .student-row:last-child {
        border-bottom: none;
    }

    .student-name {
        font-size: 25px;
    }

    .student-row button {
        background: #007bff;
        color: #fff;
        border: none;
        padding: 5px 12px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 25px;
        font-weight: bold;
    }

    .student-row button:hover {
        background: #005fcc;
    }

    /* مودال نمرات */
    .modal-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        justify-content: center;
        align-items: center;
        z-index: 1000;
    }

    .modal {
        background: #fff;
        border-radius: 8px;
        max-width: 800px;
        width: 95%;
        padding: 20px 20px 25px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
    }

    .modal-header h3 {
        margin: 0;
        font-size: 18px;
    }

    .close-btn {
        background: none;
        border: none;
        font-size: 22px;
        cursor: pointer;
        line-height: 1;
    }

    .total-row {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 15px;
    }

    .total-row label {
        font-size: 14px;
    }

    .total-row input {
        width: 120px;
        padding: 5px 8px;
        border-radius: 4px;
        border: 1px solid #ccc;
        text-align: center;
    }

    /* جدول نمرات */
    .table-wrapper {
        overflow-x: auto;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
        min-width: 500px;
        /* برای اسکرول موبایل */
    }

    table th,
    table td {
        border: 1px solid #ddd;
        padding: 6px 4px;
        text-align: center;
    }

    table th {
        background: #f0f0f0;
    }

    table input {
        width: 95%;
        border: none;
        outline: none;
        text-align: center;
        font-size: 12px;
    }

    /* تبلت */
    @media (max-width: 900px) {
        .card {
            flex: 1 1 calc(50% - 20px);
        }
    }

    /* موبایل */
    @media (max-width: 600px) {
        .container {
            margin: 0px;
            padding: 0 10px;
            flex-wrap: wrap;
            min-height: 100vh;
            flex-direction: column;
            display: flex;
        }

        .card {
            flex: 1 1 100%;
            flex-wrap: wrap;
            padding: 20px 15px 15px;
        }

        .card-title {
            font-size: 18px;
        }

        .students-list {
            padding: 15px;
        }

        .student-row {
            flex-direction: column;
            align-items: flex-start;
            gap: 25px;
            font-size: 25px;
        }

        .modal {
            width: 95%;
            padding: 15px;
        }

        table {
            font-size: 12px;
        }
    }