* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    gap: 15px;
}

.card-form-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

form-group {
    display: block;
    margin-bottom: 20px;
}

.form-group-input-container {
    display: flex;
    position: relative;
    width: 100%;
}

.card-type {
    position: absolute;
    top: 8px;
    right: 10px;
}

.card-type-hide {
    display: none;
}

.card-type-show {
    display: block;
}

.card-back {
    display: flex;
    justify-self: start;
    justify-content: flex-start;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: #666;
    width: 100%;
    max-width: 400px;
}

.card-back:hover {
    cursor: pointer;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #00c853;
}

input.error {
    border-color: #e74c3c;
}

.row {
    display: flex;
    gap: 15px;
}

.row form-group {
    flex: 1;
}

error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #44cf65 0%, #00c853 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.server-error-message {
    text-align: center;
    margin-top: 12px;
}

security-note {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #666;
    display: block;
}

/* Стили лоадера */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loader-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.loader-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.loader-overlay.visible .loader-container {
    transform: translateY(0);
}

/* Анимация спиннера */
.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #00c853;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Текст загрузки */
.loading-text {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 500;
}

.spinner.pulse {
    animation: spin-pulse 1.5s ease-in-out infinite;
}

@keyframes spin-pulse {
    0% {
        transform: rotate(0deg);
        border-width: 2px;
    }

    50% {
        transform: rotate(180deg);
        border-width: 8px;
    }

    100% {
        transform: rotate(360deg);
        border-width: 2px;
    }
}

@media (max-width: 768px) {
    .loader-container {
        padding: 30px;
        margin: 20px;
    }

    .spinner {
        width: 50px;
        height: 50px;
    }

    .loading-text {
        font-size: 16px;
    }
}