* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #222;
}

.upload-page {
    min-height: 100vh;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-card {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.upload-card h1 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 26px;
    text-align: center;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.upload-form label {
    font-weight: bold;
    font-size: 16px;
}

.upload-form input[type="file"] {
    width: 100%;
    padding: 14px;
    border: 2px dashed #bbb;
    border-radius: 10px;
    background: #fafafa;
    font-size: 15px;
}

.upload-form small {
    color: #666;
    font-size: 13px;
}

.upload-form button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: #1d72f3;
    color: #fff;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
}

.upload-form button:hover {
    background: #155fc9;
}

.alert {
    padding: 12px 14px;
    margin-bottom: 18px;
    border-radius: 10px;
    font-size: 14px;
}

.alert p {
    margin: 0 0 6px;
}

.alert p:last-child {
    margin-bottom: 0;
}

.alert-error {
    background: #ffe5e5;
    color: #8a1f1f;
    border: 1px solid #f2b8b8;
}

.alert-success {
    background: #e8f8ee;
    color: #1d6b39;
    border: 1px solid #b8e4c6;
}

.preview-box {
    margin-bottom: 18px;
    text-align: center;
}

.preview-box img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.upload-choice-box {
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fafafa;
}

.upload-choice-title {
    margin: 0 0 10px;
    font-weight: bold;
}

.upload-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.upload-choice-note {
    display: block;
    margin-left: 24px;
    font-size: 0.85rem;
    color: #666;
    font-weight: normal;
}

.upload-choice:last-child {
    margin-bottom: 0;
}

.upload-choice input[type="radio"] {
    width: 18px;
    height: 18px;
}

.upload-source-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hidden {
    display: none !important;
}

.upload-spinner {
    margin-top: 15px;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    background: #f5f5f5;
}

.spinner-circle {
    width: 36px;
    height: 36px;
    margin: 0 auto 10px auto;
    border: 4px solid #ddd;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: uploadSpin 0.8s linear infinite;
}

.upload-spinner p {
    margin: 0;
    font-size: 0.95rem;
    color: #333;
}

@keyframes uploadSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.upload-form.is-uploading button[type="submit"] {
    opacity: 0.6;
    pointer-events: none;
}
@media screen and (max-width: 480px) {
    .upload-page {
        padding: 12px;
        align-items: flex-start;
    }

    .upload-card {
        padding: 18px;
        border-radius: 10px;
    }

    .upload-card h1 {
        font-size: 22px;
    }

    .upload-form button {
        font-size: 16px;
        padding: 14px;
    }
}