* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Vazir", "Segoe UI", "Tahoma", sans-serif !important;
}

body {
    background: linear-gradient(180deg, #000000 -10%, #1a1a2e 100%);
    direction: rtl;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Improved Background Image with dark overlay */
.position-fix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0.35;
    filter: blur(6px) brightness(0.5);
    transform: scale(1.05);
}

/* Dark gradient overlay for better depth */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
            circle at 30% 50%,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.35) 100%
    );
    pointer-events: none;
    z-index: -1;
}

/* Dark Glassmorphic Card */
.card {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
            0 25px 50px -12px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    overflow: hidden;
    transition:
            transform 0.3s ease,
            box-shadow 0.3s ease;
    width: 100%;
    max-width: 520px;
    margin: 20px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow:
            0 30px 60px -15px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    background: rgba(0, 0, 0, 0.88);
}

.card-body {
    padding: 2rem 2rem 1.8rem;
}

/* Gradient Header */
h1 {
    background: linear-gradient(
            135deg,
            #CF2C91,
            #a82276,
            #8a1d62
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    text-align: center;
    animation: shimmer 3s infinite linear;
}
h6 {
    background: linear-gradient(
            135deg,
            #CF2C91,
            #a82276,
            #8a1d62
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 0;
    letter-spacing: -0.5px;
    text-align: center;
    animation: shimmer 3s infinite linear;
}

h4 {
    background: linear-gradient(135deg, #fff, #fff, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
    font-size: 1rem;
    text-align: end;
    letter-spacing: -0.5px;
    margin-left: 1rem;
    margin-right: 1rem;
    margin-top: 1rem;
}

@keyframes shimmer {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.title-decoration {
    width: 100%;
    max-width: 200px;
    height: 4px;
    background: linear-gradient(90deg, #CF2C91, #8a1d62);
    border-radius: 4px;
    margin: 12px auto 24px auto;
    box-shadow: 0 0 8px rgba(207, 44, 145, 0.5);
}

/* Input Groups */
.input-group-custom {
    margin-bottom: 1.75rem;
}

label {
    display: block;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 8px;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    padding-right: 5px;
}

#nid,
#otp-code {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    transition: all 0.25s ease;
    font-weight: 600;
    letter-spacing: 1px;
    direction: ltr;
    text-align: center;
    color: #f1f5f9;
    backdrop-filter: blur(4px);
}

#nid:focus,
#otp-code:focus {
    outline: none;
    border-color: #CF2C91;
    box-shadow: 0 0 0 4px rgba(207, 44, 145, 0.2);
    background-color: rgba(0, 0, 0, 0.95);
}

/* Modern Button */
.btn-modern {
    display: block;
    width: 100%;
    background: #CF2C91;
    border: none;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 40px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-modern:hover {
    background: linear-gradient(105deg, #CF2C91, #a82276);
    transform: scale(1.01);
    box-shadow: 0 12px 28px rgba(207, 44, 145, 0.45);
}

.btn-modern:active {
    transform: scale(0.98);
}

.btn-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* OTP Group Container */
.otp-section {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

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

.resend-area {
    text-align: center;
    margin-top: 15px;
    font-size: 0.85rem;
}

.resend-btn {
    background: none;
    border: none;
    color: #CF2C91;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    padding: 5px 10px;
}

.resend-btn:hover:not(:disabled) {
    color: #CF2C91;
    text-decoration: underline;
}

.resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.timer-text {
    color: #a0aec0;
    font-size: 0.8rem;
    margin-top: 8px;
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link button {
    background: none;
    border: none;
    color: #cbd5e0;
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.back-link button:hover {
    color: #CF2C91;
}

/* Floating Shapes */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: radial-gradient(
            circle at 30% 30%,
            rgba(207, 44, 145, 0.6),
            rgba(207, 44, 145, 0.2)
    );
    border-radius: 50%;
    animation: float 25s infinite cubic-bezier(0.45, 0.05, 0.2, 0.99);
    filter: blur(8px);
}

@keyframes float {
    0% {
        transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
        opacity: 0.2;
    }
    20% {
        transform: translateY(-50px) translateX(30px) rotate(72deg) scale(1.08);
        opacity: 0.5;
    }
    40% {
        transform: translateY(-120px) translateX(-20px) rotate(144deg) scale(1.15);
        opacity: 0.35;
    }
    60% {
        transform: translateY(-160px) translateX(40px) rotate(216deg) scale(1.2);
        opacity: 0.45;
    }
    80% {
        transform: translateY(-80px) translateX(-40px) rotate(288deg) scale(1.05);
        opacity: 0.3;
    }
    100% {
        transform: translateY(0px) translateX(0px) rotate(360deg) scale(1);
        opacity: 0.2;
    }
}

.description-text {
    text-align: center;
    color: #e2e8f0;
    margin-bottom: 1.8rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Mobile responsive */
@media (max-width: 576px) {
    .card-body {
        padding: 1.5rem;
    }
    h1 {
        font-size: 1.8rem;
    }
    #nid,
    #otp-code {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    .btn-modern {
        padding: 12px 16px;
        font-size: 1rem;
    }
    .card {
        margin: 16px;
        max-width: calc(100% - 32px);
    }
}

/* Toast notification style (fallback) */
.toast-notify {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1rem;
    z-index: 9999;
    border-right: 4px solid #CF2C91;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* OTP Input Fields - 6 Digit Boxes */
.otp-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 30px 0 20px;
    flex-wrap: wrap;
}

.otp-box {
    width: 65px;
    height: 75px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #f1f5f9;
    transition: all 0.25s ease;
    direction: ltr;
    caret-color: #CF2C91;
}

.otp-box:focus {
    outline: none;
    border-color: #CF2C91;
    box-shadow: 0 0 0 4px rgba(207, 44, 145, 0.2);
    background-color: rgba(0, 0, 0, 0.95);
    transform: scale(1.02);
}

/* Hidden input for managing OTP value */
.hidden-otp-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

/* ===== ADDITIONAL CSS FOR RESULT PAGE - MATCHING EXISTING DESIGN ===== */

/* Result Icon Styles */
.result-icon {
    text-align: center;
    margin-bottom: 20px;
}

.success-icon,
.error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 85px;
    height: 85px;
    border-radius: 50%;
    font-size: 48px;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-icon {
    background: linear-gradient(145deg, #1a5c3e, #0e3d28);
    border: 2px solid #2ecc71;
    color: #2ecc71;
    box-shadow: 0 0 30px rgba(46, 204, 113, 0.3);
}

.error-icon {
    background: linear-gradient(145deg, #5c1a1a, #3d0e0e);
    border: 2px solid #e74c3c;
    color: #e74c3c;
    box-shadow: 0 0 30px rgba(231, 76, 60, 0.3);
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    70% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Status Titles */
.status-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.status-title.success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.status-title.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.status-message {
    text-align: center;
    color: #cbd5e0;
    font-size: 0.95rem;
    margin-bottom: 25px;
    padding: 0 15px;
}

/* Tracking Code Box (Success) */
.tracking-box {
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.25);
    border-radius: 24px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    backdrop-filter: blur(4px);
}

.tracking-label {
    font-size: 0.8rem;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.tracking-code {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 2px;
    direction: ltr;
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 8px 20px;
    border-radius: 40px;
    font-family: monospace !important;
}

.copy-btn {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 10px;
    font-weight: 600;
}

.copy-btn:hover {
    background: rgba(46, 204, 113, 0.3);
    transform: scale(1.02);
}

/* Error Details Box */
.error-box {
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.25);
    border-radius: 24px;
    padding: 20px;
    margin: 20px 0;
}

.error-title {
    font-size: 0.9rem;
    font-weight: 700;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-detail {
    color: #f5a623;
    font-size: 0.85rem;
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 16px;
    direction: rtl;
}

.error-suggestion {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px dashed rgba(231, 76, 60, 0.25);
    font-size: 0.8rem;
    color: #a0aec0;
}

/* Info Section (Additional Data) */
.info-section {
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.85rem;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #8b92b0;
    font-weight: 500;
}

.info-value {
    color: #e2e8f0;
    font-weight: 600;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.btn-primary-custom {
    flex: 1;
    background: #CF2C91;
    border: none;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 40px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-primary-custom:hover {
    background: linear-gradient(105deg, #CF2C91, #a82276);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(207, 44, 145, 0.4);
}

.btn-secondary-custom {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 40px;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary-custom:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: rgba(207, 44, 145, 0.3);
}

/* Mobile responsive for result page */
@media (max-width: 576px) {
    .status-title {
        font-size: 1.4rem;
    }
    .tracking-code {
        font-size: 1.2rem;
        padding: 6px 12px;
    }
    .success-icon,
    .error-icon {
        width: 65px;
        height: 65px;
        font-size: 36px;
    }
    .action-buttons {
        flex-direction: column;
    }
    .btn-primary-custom,
    .btn-secondary-custom {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    .info-section {
        padding: 12px;
    }
    .info-row {
        font-size: 0.75rem;
    }
    .tracking-box {
        padding: 15px;
    }
    .error-box {
        padding: 15px;
    }
}

/* Print styles for success page */
@media print {
    .floating-shapes,
    .position-fix,
    body::before,
    .action-buttons,
    .copy-btn,
    .back-link {
        display: none !important;
    }
    .card {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    .status-title.success,
    .tracking-code,
    .tracking-label {
        color: #2ecc71 !important;
        background: none !important;
        -webkit-background-clip: unset !important;
        background-clip: unset !important;
    }
    .info-value,
    .status-message {
        color: #333 !important;
    }
    body {
        background: white !important;
    }
}

.id-display-box {
    background: rgba(207, 44, 145, 0.1);
    border: 1px solid rgba(207, 44, 145, 0.3);
    border-radius: 20px;
    padding: 20px;
    margin-top: 25px;
    margin-bottom: 25px;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
}

.id-display-box:hover {
    background: rgba(207, 44, 145, 0.15);
    border-color: rgba(207, 44, 145, 0.5);
}

.id-label {
    font-size: 0.8rem;
    color: #CF2C91;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.id-value {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #CF2C91, #a82276);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 2px;
    direction: ltr;
    font-family: monospace !important;
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
    line-height: 1.4;
}

.id-value-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.copy-id-btn {
    background: rgba(207, 44, 145, 0.15);
    border: 1px solid rgba(207, 44, 145, 0.3);
    color: #CF2C91;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.copy-id-btn:hover {
    background: rgba(207, 44, 145, 0.3);
    transform: scale(1.02);
}

.copy-id-btn:active {
    transform: scale(0.98);
}

.info-message {
    text-align: center;
    color: #cbd5e0;
    font-size: 0.85rem;
    margin-top: 15px;
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    justify-content: center;
}

.btn-secondary-custom {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 40px;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary-custom:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: rgba(207, 44, 145, 0.3);
    color: #CF2C91;
}

/* Toast notification */
.toast-notify {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    z-index: 9999;
    border-right: 4px solid #CF2C91;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    white-space: nowrap;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Mobile responsive */
@media (max-width: 576px) {
    .id-value {
        font-size: 1.1rem;
    }
    .copy-id-btn {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    .id-display-box {
        padding: 15px;
    }
    .btn-secondary-custom {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
    .toast-notify {
        white-space: normal;
        text-align: center;
        max-width: 90%;
    }
}