/* ===== RESET ===== */
* {
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; /* ВАЖНО: УБИВАЕТ ЛЮБОЙ ЛИШНИЙ СКРОЛЛ */
}

/* ===== PAGE ===== */
.page {
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;

    background-image: url("bg.png");
    background-repeat: no-repeat;
    background-position: center right;
    background-size: 100% 100%;
}

/* ===== CARD ===== */
.card {
    background: #fff;
    width: 360px;
    padding: 28px;
    margin-left: 60px;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* ===== LOGO ===== */
.logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 4px solid #5b1ccf;
    color: #5b1ccf;
    font-weight: bold;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* ===== TEXT ===== */
h1 {
    margin: 0 0 20px;
    color: #5b1ccf;
    font-size: 26px;
}

label {
    font-size: 14px;
    margin-bottom: 6px;
    display: block;
}

input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 16px;
    border: 1px solid #777;
    border-radius: 4px;
}

/* ===== BUTTON ===== */
button {
    width: 100%;
    padding: 12px;
    background: #5b1ccf;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover:not(:disabled) {
    background: #4a1aa8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(91, 28, 207, 0.3);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #4caf50;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
}

.error-icon {
    width: 80px;
    height: 80px;
    background: #f44336;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
}

.modal-content h2 {
    margin: 0 0 10px;
    color: #333;
    font-size: 24px;
}

.modal-content p {
    margin: 0 0 30px;
    color: #666;
    font-size: 14px;
}

.modal-btn {
    background: #5b1ccf;
    padding: 12px 30px;
    width: auto;
    min-width: 120px;
}

.modal-btn:hover {
    background: #4a1aa8;
}

.modal-content.error .modal-btn {
    background: #f44336;
}

.modal-content.error .modal-btn:hover {
    background: #da190b;
}

/* ===== LINKS ===== */
.links {
    margin-top: 14px;
}

.links a {
    display: block;
    font-size: 13px;
    color: #5b1ccf;
    text-decoration: none;
    margin-bottom: 6px;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    html, body {
        overflow: auto;
    }

    .page {
        background: #f6f7f9;
        align-items: flex-start;
    }

    .card {
        width: 100%;
        max-width: 420px;
        min-height: 100vh;
        margin: 0 auto;
        border-radius: 0;
        box-shadow: none;
    }
}
