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

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --success: #10b981;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8fafc;
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.container {
    max-width: 680px;
    width: 100%;
}

.card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 20px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.header {
    text-align: center;
    padding: 60px 40px 40px;
    border-bottom: 1px solid var(--gray-100);
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 18px;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2);
}

.logo i {
    font-size: 36px;
    color: white;
}

h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 16px;
    color: var(--gray-600);
    font-weight: 400;
}

.content {
    padding: 48px 40px;
}

.section {
    margin-bottom: 40px;
}

.section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 18px;
    pointer-events: none;
}

input[type="text"] {
    width: 100%;
    padding: 16px 18px 16px 52px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--gray-50);
    color: var(--gray-900);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

input[type="text"]::placeholder {
    color: var(--gray-400);
}

.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.radio-card {
    position: relative;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--gray-50);
    text-align: center;
}

.radio-card input[type="radio"]:checked + .radio-label {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.04);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.radio-label:hover {
    border-color: var(--gray-300);
    background: white;
}

.radio-card input[type="radio"]:checked + .radio-label:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.04);
}

.radio-icon {
    font-size: 28px;
    color: var(--gray-400);
    margin-bottom: 12px;
    transition: all 0.2s;
}

.radio-card input[type="radio"]:checked + .radio-label .radio-icon {
    color: var(--primary);
}

.radio-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.radio-desc {
    font-size: 12px;
    color: var(--gray-600);
}

.archive-link {
    font-size: 11px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-top: 8px;
}

.archive-link:hover {
    text-decoration: underline;
}

.btn-primary {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-primary:not(:disabled):active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    box-shadow: none;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.status-box {
    margin-top: 32px;
    padding: 24px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    text-align: center;
    display: none;
}

.status-box.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.status-box.error {
    background: #fef2f2;
    border-color: #fecaca;
}

.status-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: var(--primary);
}

.status-box.error .status-icon {
    color: var(--danger);
}

.status-text {
    font-size: 15px;
    color: var(--gray-700);
    font-weight: 500;
}

.status-box.error .status-text {
    color: var(--danger);
}

.status-timer {
    margin-top: 12px;
    font-size: 13px;
    color: var(--gray-500);
}

.btn-success {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    color: white;
}

.download-area {
    margin-top: 32px;
    display: none;
}

.download-area.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.info-section {
    padding: 40px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

.info-grid {
    display: grid;
    gap: 32px;
}

.info-block h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.info-block p {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 8px;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    font-size: 14px;
    color: var(--gray-600);
    padding-left: 24px;
    position: relative;
    margin-bottom: 8px;
    line-height: 1.6;
}

.info-list li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: var(--primary);
    font-weight: bold;
}

.footer {
    text-align: center;
    padding: 24px 40px;
    border-top: 1px solid var(--gray-100);
    font-size: 13px;
    color: var(--gray-600);
}

.footer strong {
    color: var(--gray-900);
    font-weight: 600;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
}

.d-none {
    display: none !important;
}

@media (max-width: 640px) {
    body {
        padding: 20px;
    }

    .header {
        padding: 40px 24px 30px;
    }

    h1 {
        font-size: 26px;
    }

    .subtitle {
        font-size: 14px;
    }

    .content {
        padding: 32px 24px;
    }

    .radio-group {
        grid-template-columns: 1fr;
    }

    .info-section, .footer {
        padding: 32px 24px;
    }
}