@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* ریست اولیه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* بدنه */
body {
    background: linear-gradient(120deg, #a1c4fd, #c2e9fb); /* رنگ‌های ملایم تر و جذاب تر */
    color: #2d3748;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

/* کانتینر اصلی */
.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 800px;
    position: relative;
    overflow: hidden;
    animation: zoomIn 0.7s ease-in-out;
}

/* افکت طلایی */
.container::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #ffde7d, transparent); /* رنگ طلایی ملایم تر */
    opacity: 0.3;
    z-index: -1;
}

/* عنوان‌ها */
h1 {
    font-size: 36px;
    color: #2d3748;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    animation: slideInDown 0.8s ease-out;
}

h3 {
    font-size: 24px;
    color: #4a5568;
    margin-bottom: 15px;
}

/* پاراگراف‌ها */
p {
    font-size: 18px;
    color: #718096;
    margin-bottom: 10px;
}

/* باکس پین‌ها */
.pin {
    background: linear-gradient(45deg, #e0f7fa, #f1f8e9); /* رنگ‌های ملایم تر */
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    transition: all 0.4s ease;
    border: 2px solid #63b3ed;
}

.pin:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(99, 179, 237, 0.3);
    border-color: #ffde7d; /* رنگ طلایی ملایم تر */
}

/* جدول‌ها */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

th {
    background: #63b3ed;
    color: #ffffff;
    font-weight: 600;
}

td {
    background: #f7fafc;
}

/* سوئیچ تغییر وضعیت */
.toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
}

input[type="checkbox"] {
    display: none;
}

input[type="checkbox"] + label {
    width: 70px;
    height: 35px;
    background: #cbd5e0;
    border-radius: 35px;
    position: relative;
    cursor: pointer;
    transition: background 0.4s ease;
}

input[type="checkbox"] + label:after {
    content: '';
    position: absolute;
    width: 29px;
    height: 29px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.4s ease, background 0.4s ease;
}

input[type="checkbox"]:checked + label {
    background: #2d3748;
}

input[type="checkbox"]:checked + label:after {
    transform: translateX(35px);
    background: #ffde7d;
}

/* انیمیشن‌ها */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .container {
        max-width: 90%;
        padding: 25px;
        margin: 0 10px; /* فاصله از کناره‌ها */
    }

    h1 {
        font-size: 28px;
    }

    h3 {
        font-size: 20px;
    }

    p {
        font-size: 16px;
    }

    .pin {
        padding: 15px;
    }

    table {
        width: calc(100% - 20px); /* فاصله از کناره‌ها */
        margin: 10px auto; /* وسط‌چین با فاصله */
    }

    th, td {
        padding: 12px;
    }

    input[type="checkbox"] + label {
        width: 60px;
        height: 30px;
    }

    input[type="checkbox"] + label:after {
        width: 24px;
        height: 24px;
    }

    input[type="checkbox"]:checked + label:after {
        transform: translateX(30px);
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 20px;
        margin: 0 10px; /* فاصله از کناره‌ها */
    }

    h1 {
        font-size: 24px;
    }

    h3 {
        font-size: 18px;
    }

    p {
        font-size: 14px;
    }

    .pin {
        padding: 12px;
    }

    table {
        width: calc(100% - 20px); /* فاصله از کناره‌ها */
        margin: 10px auto;
        font-size: 14px;
    }

    th, td {
        padding: 10px;
    }

    input[type="checkbox"] + label {
        width: 50px;
        height: 25px;
    }

    input[type="checkbox"] + label:after {
        width: 19px;
        height: 19px;
    }

    input[type="checkbox"]:checked + label:after {
        transform: translateX(25px);
    }
}