/* static/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
@font-face {
    font-family: IRANYekanX;
    src: url('../font/IRANYekanX-regular.woff') format('woff');
}

@font-face {
    font-family: IRANYekanX;
    src: url('../font/IRANYekanX-bold.woff') format('woff');
    font-weight: 700;
}
body {
    font-family: IRANYekanX;
    background: #fafafa;
    color: #1a1a1a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

header {
    text-align: center;
    margin-bottom: 24px;
}

header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

header p {
    font-size: 14px;
    color: #666;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.step.active .step-num {
    background: #2563eb;
    color: #fff;
}

.step.completed .step-num {
    background: #059669;
    color: #fff;
}

.step-text {
    font-size: 11px;
    color: #999;
}

.step.active .step-text {
    color: #2563eb;
    font-weight: 500;
}

.step-line {
    width: 40px;
    height: 2px;
    background: #e5e7eb;
    margin: 0 8px;
    margin-bottom: 20px;
}

.step-line.completed {
    background: #059669;
}

/* Upload Card */
.upload-card, .verify-card, .payment-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: #2563eb;
    background: #f0f7ff;
}

.drop-zone-content svg {
    color: #999;
    margin-bottom: 16px;
}

.drop-zone-content p {
    font-size: 15px;
    color: #333;
    margin-bottom: 8px;
}

.file-types {
    font-size: 12px;
    color: #999;
}

/* File Preview */
.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f0f7ff;
    border-radius: 12px;
    margin-top: 16px;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 12px;
    color: #666;
}

.remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: #fee;
    color: #e53e3e;
}

/* Progress Bar */
.upload-progress {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0efff 100%);
    border-radius: 12px;
    border: 1px solid #d0e4ff;
}

.upload-progress.complete {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #86efac;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-title {
    font-size: 14px;
    font-weight: 500;
    color: #1e40af;
}

.upload-progress.complete .progress-title {
    color: #166534;
}

.progress-percent {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
}

.upload-progress.complete .progress-percent {
    color: #16a34a;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
    border-radius: 6px;
    transition: width 0.2s ease;
    position: relative;
    overflow: hidden;
}

.upload-progress.complete .progress-bar {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
    animation: moveStripes 1s linear infinite;
}

@keyframes moveStripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
}

/* Options */
.options {
    margin-top: 24px;
}

.options.hidden {
    display: none;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-group label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.option-group select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.option-group select:focus {
    outline: none;
    border-color: #2563eb;
}

/* Price Section */
.price-section {
    margin-top: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.price-section.hidden {
    display: none;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.price-row:not(:last-child) {
    border-bottom: 1px solid #e8e8e8;
}

.price-row .price {
    font-size: 20px;
    font-weight: 700;
    color: #059669;
}

.price-note {
    margin-top: 12px;
    font-size: 11px;
    color: #999;
    text-align: center;
}

/* Submit Button */
.submit-btn, .pay-btn {
    width: 100%;
    margin-top: 24px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover:not(:disabled), .pay-btn:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.submit-btn:disabled, .pay-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.pay-btn {
    background: #059669;
}

.pay-btn:hover:not(:disabled) {
    background: #047857;
}

.pay-btn .btn-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner {
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
}

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

/* File Summary */
.file-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 24px;
}

.file-summary svg {
    color: #2563eb;
    flex-shrink: 0;
}

.file-summary div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-summary strong {
    font-size: 14px;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-summary span {
    font-size: 12px;
    color: #666;
}

/* Verify Card */
.verify-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.verify-desc {
    font-size: 13px;
    color: #666;
    text-align: center;
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group input {
    flex: 1;
    padding: 14px 16px;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    direction: ltr;
    text-align: left;
}

.input-group input:focus {
    outline: none;
    border-color: #2563eb;
}

.input-group button {
    padding: 14px 20px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    min-width: 100px;
}

.input-group button:hover {
    background: #1d4ed8;
}

.input-hint {
    font-size: 11px;
    color: #999;
    margin-top: 8px;
}

/* OTP Inputs */
.otp-sent-msg {
    text-align: center;
    font-size: 13px;
    color: #059669;
    margin-bottom: 20px;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 8px;
    direction: ltr;
    margin-bottom: 20px;
}

.otp-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: border-color 0.2s;
}

.otp-digit:focus {
    outline: none;
    border-color: #2563eb;
}

.verify-otp-btn {
    width: 100%;
    padding: 14px;
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.verify-otp-btn:hover {
    background: #047857;
}

.resend-btn {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: none;
    border: none;
    color: #666;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.resend-btn:hover {
    color: #2563eb;
}

.error-msg {
    margin-top: 16px;
    padding: 12px;
    background: #fee;
    color: #dc2626;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

/* Payment Card */
.payment-details {
    margin: 20px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.detail-row.total {
    border-top: 1px solid #e5e7eb;
    margin-top: 8px;
    padding-top: 16px;
}

.detail-row .price {
    font-size: 22px;
    font-weight: 700;
    color: #059669;
}

.payment-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 12px;
    color: #666;
}

/* Result Cards */
.result-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.result-icon {
    margin-bottom: 24px;
}

.result-card.success .result-icon {
    color: #059669;
}

.result-card.failed .result-icon {
    color: #dc2626;
}

.result-card h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
}

.result-card.success h1 {
    color: #059669;
}

.result-card.failed h1 {
    color: #dc2626;
}

.result-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.ref {
    font-size: 16px;
    color: #333;
}

/* File Details */
.file-details {
    margin: 24px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    text-align: right;
}

.detail-row span:first-child {
    color: #666;
}

/* Link Section */
.link-section {
    margin: 24px 0;
    text-align: right;
}

.link-section label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.link-box {
    display: flex;
    gap: 8px;
}

.link-box input {
    flex: 1;
    padding: 12px 14px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    direction: ltr;
    text-align: left;
}

.link-box button {
    padding: 12px 14px;
    background: #f1f5f9;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.link-box button:hover {
    background: #e2e8f0;
}

/* Buttons */
.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    margin-top: 16px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: #059669;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #047857;
    transform: translateY(-1px);
}

.back-btn {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: #fff;
    background: #2563eb;
    border-radius: 10px;
    text-decoration: none;
}

.back-btn:hover {
    background: #1d4ed8;
}

.back-link {
    display: block;
    margin-top: 20px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
}

.back-link:hover {
    color: #2563eb;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 32px;
    font-size: 12px;
    color: #999;
}

/* Responsive */
@media (max-width: 480px) {
    .upload-card, .verify-card, .payment-card, .result-card {
        padding: 24px 20px;
    }

    .otp-digit {
        width: 40px;
        height: 48px;
        font-size: 20px;
    }
}