* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #0a1428;
    color: #2c3e50;
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 215, 0, 0.16), transparent 42%),
        radial-gradient(circle at 85% 80%, rgba(0, 123, 255, 0.35), transparent 48%),
        linear-gradient(135deg, #0a1428 0%, #0d2a52 50%, #007bff 130%);
}

.page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 75%);
    pointer-events: none;
}

.card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(5, 15, 35, 0.45);
    padding: 46px 38px 38px;
    max-width: 480px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.logo-badge {
    width: 88px;
    height: 88px;
    margin: -80px auto 20px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(5, 15, 35, 0.45);
    border: 4px solid #fff;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

h1 {
    font-size: 1.6rem;
    margin: 0 0 10px;
    color: #0d1b2e;
    text-align: center;
    font-weight: 700;
}

.subtitle {
    font-size: 0.98rem;
    line-height: 1.55;
    color: #6c7a89;
    text-align: center;
    margin: 0 0 28px;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #445;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #9aa8b4;
    pointer-events: none;
}

input[type="text"] {
    width: 100%;
    padding: 14px 16px 14px 42px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    background: #f8fafc;
    transition: border-color 0.15s, background 0.15s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15);
}

.btn-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

button[type="submit"] {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: linear-gradient(135deg, #0056b3, #007bff);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 6px 16px rgba(0, 86, 179, 0.35);
}

button[type="submit"] i {
    font-size: 16px;
}

button[type="submit"]:hover {
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.45);
}

button[type="submit"]:active {
    transform: translateY(1px);
}

.btn-reset {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 18px;
    background: #f1f5f9;
    color: #445;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.btn-reset i {
    font-size: 15px;
}

.btn-reset:hover {
    background: #e6edf3;
    border-color: #cbd5e1;
}

.btn-reset:active {
    transform: translateY(1px);
}

.alert {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.87rem;
    line-height: 1.4;
}

.alert-error {
    background: #fdecec;
    color: #9c3232;
    border: 1px solid #f6c9c9;
}

.token-result {
    margin-top: 22px;
    padding: 22px 20px;
    background: linear-gradient(135deg, #eef6ff, #fffbe6);
    border: 1px dashed #9ecbff;
    border-radius: 14px;
    text-align: center;
}

.token-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 0 12px;
    font-size: 0.78rem;
    color: #0056b3;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.token-label i {
    font-size: 13px;
}

.token-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(5, 15, 35, 0.1);
    max-width: 100%;
}

.token-value {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #1c2b36;
    word-break: break-all;
}

.copy-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: #e8f2ff;
    color: #0056b3;
    cursor: pointer;
    transition: background 0.15s;
}

.copy-btn i {
    font-size: 14px;
}

.copy-btn:hover {
    background: #d3e7ff;
}

.copy-feedback {
    position: absolute;
    top: -30px;
    right: 0;
    background: #1c2b36;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.copy-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

.token-details {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
    font-size: 0.88rem;
    color: #6c7a89;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .card {
        padding: 36px 22px 26px;
    }
}
