Загрузка данных



<?php
$number = 5;
$sum = 0;
$max = 1;

for ($i = 1; $i <= 10; $i++) {
    $sum += $i;

    if ($i > $max) {
        $max = $i;
    }
}
?>
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Emerald Lab | PHP</title>

<style>
:root {
    --bg: #0b100f;
    --panel: #121c18;
    --panel2: #17251e;
    --border: #294638;
    --green: #6ee7a5;
    --green2: #27ae76;
    --gold: #e5c77b;
    --text: #f2fff6;
    --muted: #a8c2b3;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    width: 450px;
    height: 450px;
    left: -180px;
    top: -180px;
    border-radius: 50%;
    background: #1c9b6240;
    filter: blur(100px);
    pointer-events: none;
    animation: glow 9s ease-in-out infinite alternate;
}

body::after {
    content: "";
    position: fixed;
    width: 400px;
    height: 400px;
    right: -180px;
    bottom: -180px;
    border-radius: 50%;
    background: #b58c3530;
    filter: blur(100px);
    pointer-events: none;
    animation: glow 11s ease-in-out infinite alternate-reverse;
}

@keyframes glow {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(35px, 25px, 0); }
}

.container {
    width: min(1050px, 92%);
    margin: auto;
    position: relative;
    z-index: 1;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0;
    border-bottom: 1px solid #ffffff12;
    animation: appear .7s ease both;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.5px;
}

.logo-icon {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border-radius: 14px;
    background: linear-gradient(135deg, #208657, #124c37);
    color: #c7ffdd;
    box-shadow: 0 0 25px #27ae7640;
}

.logo span {
    color: var(--green);
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #286347;
    background: #173d2b80;
    color: var(--green);
    border-radius: 30px;
    padding: 7px 12px;
    font-size: 11px;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    50% { opacity: .45; }
}

.hero {
    padding: 78px 0 42px;
    text-align: center;
    animation: appear .8s .1s ease both;
}

.eyebrow {
    display: inline-block;
    padding: 7px 14px;
    margin-bottom: 24px;
    border: 1px solid #326448;
    background: #193e2b80;
    color: var(--green);
    border-radius: 30px;
    font-size: 11px;
    letter-spacing: 1.5px;
    font-weight: 800;
}

.hero h1 {
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.08;
    letter-spacing: -2.5px;
    margin-bottom: 22px;
}

.gradient-text {
    background: linear-gradient(100deg, #6ee7a5, #b4efc5, #e5c77b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    max-width: 580px;
    margin: auto;
    color: var(--muted);
    font-size: 15px;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding: 13px 21px;
    border-radius: 12px;
    background: linear-gradient(110deg, #238a59, #176b46);
    color: #f3fff7;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 28px #27ae7620;
    transition: transform .25s, box-shadow .25s;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px #27ae7645;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 65px;
    animation: appear .8s .2s ease both;
}

.stat {
    padding: 22px;
    text-align: center;
    background: #121c18cc;
    border: 1px solid var(--border);
    border-radius: 17px;
    transition: border-color .3s, transform .3s;
}

.stat:hover {
    transform: translateY(-4px);
    border-color: #4e8a67;
}

.stat-value {
    color: var(--green);
    font-size: 29px;
    font-weight: 800;
}

.stat:nth-child(2) .stat-value {
    color: var(--gold);
}

.stat-label {
    color: var(--muted);
    font-size: 12px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 25px;
}

.section-heading h2 {
    font-size: 28px;
    letter-spacing: -.7px;
}

.section-heading p {
    color: var(--muted);
    font-size: 13px;
}

.count {
    padding: 7px 11px;
    border-radius: 9px;
    color: var(--green);
    border: 1px solid var(--border);
    background: #14241b;
    font-size: 12px;
}

.tasks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.task {
    position: relative;
    overflow: hidden;
    padding: 25px;
    background: linear-gradient(145deg, #15221b, #101713);
    border: 1px solid var(--border);
    border-radius: 19px;
    opacity: 0;
    animation: rise .65s ease forwards;
    transition: transform .3s, border-color .3s,
                background .3s;
}

.task:nth-child(1) { animation-delay: .08s; }
.task:nth-child(2) { animation-delay: .16s; }
.task:nth-child(3) { animation-delay: .24s; }
.task:nth-child(4) { animation-delay: .32s; }
.task:nth-child(5) { animation-delay: .40s; }

.task::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #27ae76, #e5c77b, transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .45s;
}

.task:hover::before {
    transform: scaleX(1);
}

.task:hover {
    transform: translateY(-6px);
    border-color: #4a785c;
    background: linear-gradient(145deg, #192b21, #101713);
}

@keyframes appear {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-wide {
    grid-column: 1 / -1;
}

.task-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 19px;
}

.task-number {
    display: grid;
    place-items: center;
    width: 47px;
    height: 47px;
    border-radius: 14px;
    background: linear-gradient(140deg, #278958, #164a34);
    color: #dcffe9;
    font-weight: 800;
    font-size: 18px;
}

.tag {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid #395f48;
    background: #1b3826;
    color: #9fe9b6;
    font-size: 10px;
    font-weight: 700;
}

.task h3 {
    font-size: 20px;
    margin-bottom: 6px;
}

.description {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 20px;
}

.result-label {
    margin-bottom: 9px;
    color: var(--gold);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.result {
    background: #090f0c;
    border: 1px solid #25382c;
    border-radius: 11px;
    padding: 15px;
    color: #d4f9df;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.highlight {
    color: var(--gold);
    font-weight: 800;
}

.success {
    color: var(--green);
}

.multiplication-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.multiplication-item {
    padding: 13px 8px;
    text-align: center;
    background: #101b14;
    border: 1px solid #2a4432;
    border-radius: 11px;
    color: var(--muted);
    font-size: 13px;
    transition: background .25s, transform .25s;
}

.multiplication-item:hover {
    background: #1b3826;
    transform: translateY(-3px);
}

.multiplication-item strong {
    display: block;
    margin-top: 4px;
    color: var(--gold);
    font-size: 17px;
}

footer {
    margin-top: 65px;
    padding: 27px 0;
    border-top: 1px solid #ffffff12;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

footer strong {
    color: var(--green);
}

@media (max-width: 650px) {
    .hero {
        padding: 53px 0 35px;
    }

    .hero h1 {
        letter-spacing: -1.3px;
    }

    .stats {
        gap: 8px;
        margin-bottom: 45px;
    }

    .stat {
        padding: 15px 5px;
    }

    .stat-value {
        font-size: 23px;
    }

    .stat-label {
        font-size: 10px;
    }

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

    .task-wide {
        grid-column: auto;
    }

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

    .section-heading h2 {
        font-size: 23px;
    }

    .task {
        padding: 21px;
    }

    .navbar {
        padding: 16px 0;
    }

    .logo {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .task {
        opacity: 1;
    }
}
</style>
</head>

<body>
<div class="container">

    <nav class="navbar">
        <a href="#" class="logo">
            <div class="logo-icon">&lt;/&gt;</div>
            <div>Emerald <span>Lab</span></div>
        </a>

        <div class="status">
            <span class="dot"></span>
            ONLINE
        </div>
    </nav>

    <header class="hero">
        <div class="eyebrow">✦ Учебный проект</div>

        <h1>
            Учись. Кодируй.<br>
            <span class="gradient-text">Создавай.</span>
        </h1>

        <p>
            Практические задания по PHP.
            Изучай условия, циклы и вычисления
            в красивом и современном интерфейсе.
        </p>

        <a class="button" href="#tasks">
            Смотреть задания <span>↓</span>
        </a>
    </header>

    <section class="stats">
        <div class="stat">
            <div class="stat-value">05</div>
            <div class="stat-label">Практических заданий</div>
        </div>

        <div class="stat">
            <div class="stat-value">PHP</div>
            <div class="stat-label">Язык программирования</div>
        </div>

        <div class="stat">
            <div class="stat-value">✓</div>
            <div class="stat-label">Результаты рассчитаны</div>
        </div>
    </section>

    <section id="tasks">
        <div class="section-heading">
            <div>
                <h2>Практика</h2>
                <p>Результаты выполнения программы</p>
            </div>

            <div class="count">01 — 05</div>
        </div>

        <div class="tasks">

            <article class="task">
                <div class="task-top">
                    <div class="task-number">01</div>
                    <span class="tag">ECHO</span>
                </div>

                <h3>Приветствие</h3>
                <p class="description">
                    Выводим сообщение с помощью PHP.
                </p>

                <div class="result-label">Результат</div>
                <div class="result">
                    <span class="success">
                        <?php echo "Привет, администратор!"; ?>
                    </span>
                </div>
            </article>

            <article class="task">
                <div class="task-top">
                    <div class="task-number">02</div>
                    <span class="tag">IF / ELSE</span>
                </div>

                <h3>Проверка числа</h3>
                <p class="description">
                    Определяем чётность числа.
                </p>

                <div class="result-label">Результат</div>
                <div class="result">
                    Число:
                    <span class="highlight"><?php echo $number; ?></span><br>

                    <?php
                    if ($number % 2 != 0) {
                        echo "Число $number — <span class='success'>нечётное</span>";
                    } else {
                        echo "Число $number — <span class='success'>чётное</span>";
                    }
                    ?>
                </div>
            </article>

            <article class="task task-wide">
                <div class="task-top">
                    <div class="task-number">03</div>
                    <span class="tag">ЦИКЛ FOR</span>
                </div>

                <h3>Таблица умножения</h3>
                <p class="description">
                    Умножаем число 5 на числа от 1 до 10.
                </p>

                <div class="result-label">Результаты вычислений</div>

                <div class="multiplication-grid">
                    <?php
                    for ($i = 1; $i <= 10; $i++) {
                        echo "<div class='multiplication-item'>";
                        echo "5 × $i";
                        echo "<strong>" . (5 * $i) . "</strong>";
                        echo "</div>";
                    }
                    ?>
                </div>
            </article>

            <article class="task">
                <div class="task-top">
                    <div class="task-number">04</div>
                    <span class="tag">СУММА</span>
                </div>

                <h3>Сумма чисел</h3>
                <p class="description">
                    Находим сумму чисел от 1 до 10.
                </p>

                <div class="result-label">Результат</div>
                <div class="result">
                    Диапазон: 1–10<br>
                    Сумма:
                    <span class="highlight"><?php echo $sum; ?></span><br>
                    <span class="success">Вычисление выполнено ✓</span>
                </div>
            </article>

            <article class="task">
                <div class="task-top">
                    <div class="task-number">05</div>
                    <span class="tag">СРАВНЕНИЕ</span>
                </div>

                <h3>Максимальное число</h3>
                <p class="description">
                    Ищем максимум в диапазоне от 1 до 10.
                </p>

                <div class="result-label">Результат</div>
                <div class="result">
                    Диапазон: 1–10<br>
                    Максимум:
                    <span class="highlight"><?php echo $max; ?></span><br>
                    <span class="success">Результат найден ✓</span>
                </div>
            </article>

        </div>
    </section>

    <footer>
        <p>Создано с помощью <strong>PHP</strong> и CSS</p>
        <p>Практическая работа · <?php echo date("d.m.Y"); ?></p>
    </footer>

</div>
</body>
</html>