* {
    box-sizing: border-box;
}

:root {
    --bg: #060303;
    --bg-soft: #100707;
    --card: rgba(255, 255, 255, 0.035);
    --card-border: rgba(255, 255, 255, 0.07);
    --red: #ff454f;
    --red-dark: #c9363d;
    --text-muted: rgba(255, 255, 255, 0.45);
}

body {
    margin: 0;
    min-height: 100vh;
    color: #fff;
    font-family: Arial, sans-serif;
    background:
        radial-gradient(circle at 80% 10%, rgba(255, 69, 79, 0.12), transparent 30%),
        radial-gradient(circle at 40% 90%, rgba(255, 69, 79, 0.16), transparent 35%),
        linear-gradient(180deg, #0b0505 0%, #060303 55%, #020101 100%);
}

.phone-shell {
    max-width: 420px;
    min-height: 100vh;
    margin: auto;
    padding: 28px 20px 34px;
}

.app-header {
    padding-bottom: 22px;
    margin-bottom: 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
    width: 112px;
    display: block;
    margin-bottom: 6px;
}

.app-header p,
.subtitle {
    margin: 0;
    color: var(--text-muted);
}

h1, h2 {
    margin-top: 0;
    letter-spacing: -0.4px;
}

h1 {
    font-size: 30px;
    line-height: 1.15;
}

h2 {
    font-size: 25px;
}

label {
    display: block;
    margin-top: 16px;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.78);
    font-weight: 600;
}

/* INPUT + TEXTAREA */
input,
textarea {
    width: 100%;
    padding: 16px 18px;
    margin: 0 0 4px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(145deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
    color: white;
    font-size: 15px;
    font-family: Arial, sans-serif;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.015);
}

textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.4;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255,255,255,0.28);
}

input:focus,
textarea:focus {
    border-color: rgba(255, 69, 79, 0.65);
    box-shadow:
        0 0 0 4px rgba(255, 69, 79, 0.09),
        inset 0 0 0 1px rgba(255,255,255,0.02);
}

.primary-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border: none;
    border-radius: 18px;
    color: white;
    font-weight: 800;
    font-size: 16px;
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-height: 56px;
    cursor: pointer;
    box-shadow: 0 16px 36px rgba(255, 69, 79, 0.24);
}

.secondary-btn {
    width: 100%;
    padding: 16px;
    margin-top: 10px;
    background: #000;
    color: #fff;
    border-radius: 18px;
    text-align: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 16px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.primary-btn:active,
.secondary-btn:active {
    transform: scale(0.99);
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-text {
    display: block;
}

.btn-saving {
    display: none;
    align-items: center;
    gap: 8px;
}

.primary-btn.loading .btn-text {
    display: none !important;
}

.primary-btn.loading .btn-saving {
    display: flex !important;
}

.loader {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
    flex-shrink: 0;
}

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

.upload-box {
    border: 1px dashed rgba(255, 69, 79, 0.65);
    padding: 0;
    text-align: center;
    border-radius: 20px;
    position: relative;
    height: 180px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff7777;
    background:
        radial-gradient(circle at center, rgba(255, 69, 79, 0.11), transparent 55%),
        rgba(255, 255, 255, 0.025);
}

.upload-box input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 5;
    cursor: pointer;
}

.photo-preview {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

#uploadText {
    position: absolute;
    z-index: 2;
    color: #ff7777;
    font-weight: 800;
}

.profile-image-wrap {
    height: 280px;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: var(--card);
    border: 1px solid var(--card-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scan-frame {
    position: absolute;
    inset: 34px;
    border: 2px solid var(--red);
    border-radius: 18px;
    box-shadow:
        0 0 20px rgba(255, 69, 79, 0.45),
        inset 0 0 20px rgba(255, 69, 79, 0.12);
}

.detail-card,
.alert-box,
.empty-card {
    padding: 18px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018));
    border: 1px solid var(--card-border);
    border-radius: 20px;
    margin-top: 14px;
    box-shadow: 0 16px 38px rgba(0,0,0,0.24);
}

.detail-card small {
    display: block;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.detail-card strong {
    font-size: 18px;
}

.alert-box {
    color: rgba(255,255,255,0.78);
}

.alert-box strong {
    display: block;
    margin-bottom: 12px;
    color: #fff;
}

.alert-box small {
    display: block;
    color: var(--text-muted);
    margin-top: 10px;
}

.alert-box p {
    margin: 4px 0 0;
    color: #fff;
}

.empty-card {
    text-align: center;
    color: rgba(255,255,255,0.55);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.empty-card span {
    color: var(--red);
    font-size: 30px;
}

.id-text {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    text-align: center;
    margin-top: 18px;
}

@media (max-width: 480px) {
    .phone-shell {
        padding: 24px 18px 30px;
    }

    h1 {
        font-size: 28px;
    }

    .profile-image-wrap {
        height: 240px;
    }
}