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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
                 "Noto Sans JP", sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #1a56db;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-top: 4px;
}

/* Card */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 40px 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.card h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #111;
}

.description {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 28px;
    line-height: 1.7;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #374151;
}

.required {
    color: #dc2626;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: #1a56db;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.form-group input::placeholder {
    color: #9ca3af;
}

button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #1a56db;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

button[type="submit"]:hover {
    background: #1648b8;
}

button[type="submit"]:disabled {
    background: #93a3bf;
    cursor: not-allowed;
}

/* Loading */
#loading {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #1a56db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#loading p {
    font-size: 14px;
    color: #6b7280;
}

/* Messages */
.message {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
}

.message.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.message p {
    font-size: 15px;
    line-height: 1.7;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Footer */
footer {
    text-align: center;
    margin-top: auto;
    padding-top: 40px;
}

footer p {
    font-size: 12px;
    color: #9ca3af;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 24px 16px;
    }

    .card {
        padding: 28px 20px;
    }

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