        h1 {
            font-weight: 700;
            font-size: 2.6rem;
            margin-bottom: 40px;
            color: #0f172a;
            user-select: none;
        }
        form {
            width: 100%;
            max-width: 720px;
            display: flex;
            gap: 15px;
            margin-bottom: 45px;
        }
        input[type="url"], input[type="text"], input[type="tel"] {
            flex-grow: 1;
            border: 2px solid #ccc;
            padding: 14px 18px;
            border-radius: 8px;
            transition: border-color 0.25s ease;
        }
        input[type="url"]:focus, input[type="text"]:focus, input[type="tel"]:focus {
            border-color: #2563eb;
            outline: none;
        }
        button {
            background-color: #2563eb;
            border: none;
            color: white;
            padding: 14px 28px;
            font-weight: 700;
            border-radius: 8px;
            cursor: pointer;
            transition: background-color 0.3s ease;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        button:hover:not(:disabled) {
            background-color: #1e40af;
        }
        button:disabled {
            background-color: #93c5fd;
            cursor: not-allowed;
        }
        .spinner {
            display: none;
            width: 20px;
            height: 20px;
            border: 3px solid #ffffff;
            border-top: 3px solid transparent;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-left: 8px;
        }
        button:disabled .spinner {
            display: inline-block;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        .stats-container {
            display: flex;
            justify-content: center;
            gap: 20px;
            max-width: 720px;
            width: 100%;
            margin-bottom: 40px;
            flex-wrap: wrap;
        }
        .stat-box {
            background: #f9fafb;
            border-radius: 14px;
            box-shadow: 0 0 8px rgb(0 0 0 / 0.07);
            width: 160px;
            min-height: 120px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            user-select: none;
            padding: 20px;
        }
        .stat-box.score {
            background: #22c55e;
            color: white;
            box-shadow: 0 0 14px rgb(34 197 94 / 0.6);
        }
        .stat-number {
            font-weight: 900;
            font-size: 3.4rem;
            line-height: 1;
        }
        .stat-label {
            margin-top: 10px;
            font-weight: 700;
        }
        .stat-box.ok {
            border-left: 6px solid #15803d;
        }
        .stat-box.warning {
            border-left: 6px solid #b45309;
        }
        .stat-box.issue {
            border-left: 6px solid #991b1b;
        }
        .messages-list {
            max-width: 720px;
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }
        .message-item {
            border-radius: 10px;
            padding: 14px 18px;
            white-space: pre-wrap;
            word-break: break-word;
        }
        .message-item .title {
            font-weight: 700;
            margin-bottom: 6px;
        }
        .message-item .detail {
            font-weight: 400;
            color: #475569;
        }
        .message-item.ok {
            background-color: #dcfce7;
            color: #14532d;
        }
        .message-item.warning {
            background-color: #fef9c3;
            color: #78350f;
        }
        .message-item.issue {
            background-color: #fee2e2;
            color: #7f1d1d;
        }
        .favicon-img {
            width: 24px;
            height: 24px;
            vertical-align: middle;
            margin-right: 8px;
        }
        .links-box {
            background: #f9fafb;
            border-radius: 10px;
            box-shadow: 0 0 8px rgb(0 0 0 / 0.07);
            padding: 14px 18px;
            border-left: 6px solid #991b1b;
        }
        .links-box details {
            margin-top: 10px;
        }
        .links-box summary {
            font-weight: 700;
            cursor: pointer;
            user-select: none;
            color: #0f172a;
        }
        .links-box ul {
            list-style: disc;
            padding-right: 20px;
            margin-top: 10px;
        }
        .links-box li {
            color: #475569;
            margin-bottom: 8px;
        }
        .links-box a {
            color: #2563eb;
            text-decoration: none;
        }
        .links-box a:hover {
            text-decoration: underline;
        }
        .images-box {
            background: #f9fafb;
            border-radius: 10px;
            box-shadow: 0 0 8px rgb(0 0 0 / 0.07);
            padding: 14px 18px;
            border-left: 6px solid #991b1b;
            display: none;
        }
        .images-box details {
            margin-top: 10px;
        }
        .images-box summary {
            font-weight: 700;
            cursor: pointer;
            user-select: none;
            color: #0f172a;
        }
        .images-box ul {
            list-style: disc;
            padding-right: 20px;
            margin-top: 10px;
        }
        .images-box li {
            color: #475569;
            margin-bottom: 8px;
        }
        .images-box a {
            color: #2563eb;
            text-decoration: none;
        }
        .images-box a:hover {
            text-decoration: underline;
        }
        .show-images-btn {
            background-color: #2563eb;
            border: none;
            color: white;
            padding: 10px 20px;
            font-weight: 700;
            border-radius: 8px;
            cursor: pointer;
            transition: background-color 0.3s ease;
            margin-top: 10px;
            display: inline-block;
        }
        .show-images-btn:hover {
            background-color: #1e40af;
        }
        .order-form-container {
            max-width: 720px;
            width: 100%;
            background: #f9fafb;
            border-radius: 14px;
            box-shadow: 0 0 8px rgb(0 0 0 / 0.07);
            padding: 20px;
            margin-top: 40px;
        }
        .order-form-container h2 {
            font-weight: 700;
            color: #0f172a;
            margin-bottom: 20px;
        }
        .order-form {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        .form-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .form-group label {
            font-weight: 700;
            font-size: 1rem;
            color: #0f172a;
        }
        .form-response {
            margin-top: 10px;
            font-size: 1rem;
            text-align: center;
        }
        .form-response.success {
            color: #14532d;
            background-color: #dcfce7;
            padding: 10px;
            border-radius: 8px;
        }
        .form-response.error {
            color: #7f1d1d;
            background-color: #fee2e2;
            padding: 10px;
            border-radius: 8px;
        }
        .history-container {
            max-width: 720px;
            width: 100%;
            background: #f9fafb;
            border-radius: 14px;
            box-shadow: 0 0 8px rgb(0 0 0 / 0.07);
            padding: 20px;
            margin-top: 40px;
        }
        .history-container h2 {
            font-weight: 700;
            font-size: 1.8rem;
            color: #0f172a;
            margin-bottom: 20px;
        }
        .history-list {
            list-style: none;
            padding: 0;
        }
        .history-list li {
            padding: 10px 0;
            border-bottom: 1px solid #e5e7eb;
        }
        .history-list li:last-child {
            border-bottom: none;
        }
        .history-list a {
            color: #2563eb;
            text-decoration: none;
        }
        .history-list a:hover {
            text-decoration: underline;
        }
        .clear-history-btn {
            background-color: #991b1b;
            margin-top: 10px;
        }
        .clear-history-btn:hover {
            background-color: #7f1d1d;
        }
        @media (max-width: 700px) {
            .stats-container {
                justify-content: center;
                gap: 20px;
            }
            .stat-box {
                width: 140px;
                min-height: 110px;
                font-size: 0.9rem;
                padding: 18px 14px;
            }
            .stat-number {
                font-size: 2.8rem;
            }
        }
        
        
        
        
        
        
        
        
        
        
        
        
        .stats-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.pagespeed-container {
    display: block;
    width: 100%;
    margin-top: 20px;
}

.stat-box.pagespeed {
    width: 100%;
    padding: 20px;
    border-radius: 8px;
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 150px;
}

.score-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.score-container .stat-number {
    font-size: 2.5em;
    margin-right: 10px;
}

.score-container .stat-label {
    font-size: 1.2em;
    margin-top: 0;
}

.stat-details {
    margin-top: 15px;
    font-size: 0.9em;
    text-align: left;
    width: 100%;
}

.stat-details div {
    margin-bottom: 5px;
}

.stat-box.pagespeed-red {
    background-color: #dc3545;
}

.stat-box.pagespeed-yellow {
    background-color: #ffc107;
}

.stat-box.pagespeed-green {
    background-color: #28a745;
}

.stat-box {
    flex: 1;
    min-width: 150px;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stat-box.score {
    background-color: #007bff;
    color: white;
}

.stat-box.ok {
    background-color: #28a745;
    color: white;
}

.stat-box.warning {
    background-color: #ffc107;
    color: black;
}

.stat-box.issue {
    background-color: #dc3545;
    color: white;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
}

.stat-label {
    font-size: 1em;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .stat-box {
        min-width: 100%;
        margin-bottom: 10px;
    }
    .stat-box.pagespeed {
        min-height: 200px;
    }
}














.main-container { max-width: 1200px; margin: 0 auto; padding: 20px; }
        .main-index { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); }
        #seoForm { display: flex; gap: 10px; margin-bottom: 20px; }
        #urlInput, #deviceSelect {
            flex: 1;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 8px;
            font-size: 15px;
        }
        #submitBtn {
            padding: 10px 20px;
            background: #4caf50;
            color: #fff;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.3s;
            font-size: 15px;
        }
        #submitBtn:disabled { background: #999; cursor: not-allowed; }
        #submitBtn .spinner {
            display: none;
            width: 16px;
            height: 16px;
            border: 2px solid #fff;
            border-top: 2px solid transparent;
            border-radius: 50%;
            animation: spin-der 1s linear infinite;
            margin-right: 5px;
        }
        #submitBtn:disabled .spinner { display: inline-block; }
        #downloadPDFBtn {
            padding: 10px 20px;
            background: #d32f2f;
            color: #fff;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.3s;
            font-size: 15px;
            margin-left: 10px;
        }
        #downloadPDFBtn:hover { background: #b71c1c; }
        @keyframes spin-der { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
        .stats-container { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
        .stat-box { flex: 1; min-width: 150px; padding: 15px; text-align: center; border-radius: 8px; }
        .stat-box.score { background: #e3f2fd; }
        .stat-box.ok { background: #e8f5e9; }
        .stat-box.warning { background: #fff3e0; }
        .stat-box.issue { background: #ffebee; }
        .stat-number { font-size: 2.2rem; font-weight: bold; color: #333; }
        .stat-label { font-size: 14px; color: #444; text-align: center; font-weight: 500; margin-bottom: 8px; animation: fadeIn 0.5s ease-out; }
        .pagespeed-container { margin-top: 20px; padding: 20px; background: #fff; border-radius: 12px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); }
        .stat-box.pagespeed { display: flex; flex-direction: column; align-items: center; padding: 20px; border: none; }
        .score-container {
            position: relative;
            width: 140px;
            height: 140px;
            margin-bottom: 10px;
            background: #ffffff;
            border-radius: 50%;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .score-container:hover {
            transform: scale(1.03);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
        }
        .circular-progress {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .circular-progress svg {
            width: 100%;
            height: 100%;
            transform: rotate(-90deg);
        }
        .circular-progress .progress-background {
            fill: none;
            stroke: #e0e0e0;
            stroke-width: 8;
        }
        .circular-progress .progress-bar {
            fill: none;
            stroke: var(--progress-color, #4caf50);
            stroke-width: 8;
            stroke-linecap: round;
            stroke-dasharray: 377;
            stroke-dashoffset: calc(377 - (377 * var(--score)) / 100);
            transition: stroke-dashoffset 1s ease;
        }
        .circular-progress .stat-number {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 2.4rem;
            font-weight: 700;
            color: #1a1a1a;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            animation: bounceIn 0.8s ease-out 0.5s;
        }
        @keyframes fadeIn {
            0% { opacity: 0; }
            100% { opacity: 1; }
        }
        @keyframes bounceIn {
            0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
            60% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
            100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
        }
        @keyframes slideIn {
            to { opacity: 1; transform: translateY(0); }
        }
        .stat-details { width: 100%; margin-top: 20px; }
        .metric {
            display: flex;
            align-items: center;
            margin: 10px 0;
            padding: 10px;
            background: #f9f9f9;
            border-radius: 8px;
            transition: transform 0.3s ease;
            opacity: 0;
            transform: translateY(20px);
            animation: slideIn 0.5s ease-out forwards;
        }
        .metric:nth-child(2) { animation-delay: 0.1s; }
        .metric:nth-child(3) { animation-delay: 0.2s; }
        .metric:nth-child(4) { animation-delay: 0.3s; }
        .metric:nth-child(5) { animation-delay: 0.4s; }
        .metric:nth-child(6) { animation-delay: 0.5s; }
        .metric:nth-child(7) { animation-delay: 0.6s; }
        .metric:nth-child(8) { animation-delay: 0.7s; }
        .metric:nth-child(9) { animation-delay: 0.8s; }
        .metric:hover { transform: translateY(-3px); }
        .metric span { color: #000; font-size: 15px; }
        .metric strong { color: #333; font-size: 15px; }
        .metric-description { font-size: 14px; color: #777; margin: 5px 0 0 30px; }
        .status-icon {
            display: inline-block;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            margin-right: 5px;
        }
        .status-good { background: #4caf50; }
        .status-warning { background: #ff9800; }
        .status-poor { background: #d32f2f; }
        .improvement-suggestions, .diagnostics {
            margin-top: 20px;
            width: 100%;
            opacity: 0;
            animation: fadeIn 0.5s ease-out forwards;
        }
        .improvement-suggestions { animation-delay: 0.8s; }
        .diagnostics { animation-delay: 0.9s; }
        .improvement-suggestions h3, .diagnostics h3 { font-size: 18px; color: #333; margin-bottom: 10px; }
        .improvement-suggestions ul, .diagnostics ul { list-style: none; padding: 0; }
        .improvement-suggestions li, .diagnostics li {
            padding: 10px;
            background: #fff3e0;
            border-radius: 6px;
            margin-bottom: 8px;
            color: #333;
            font-size: 14px;
        }
        .accordion { margin-top: 10px; }
        .accordion-item {
            background: #f9f9f9;
            border-radius: 6px;
            margin-bottom: 8px;
            padding: 10px;
            cursor: pointer;
            transition: background 0.3s;
        }
        .accordion-item:hover { background: #e0e0e0; }
        .accordion-content {
            display: none;
            padding: 10px;
            font-size: 14px;
            color: #555;
        }
        .accordion-item.active .accordion-content { display: block; }
        .pagespeed-red { --progress-color: #d32f2f; }
        .pagespeed-yellow { --progress-color: #ff9800; }
        .pagespeed-green { --progress-color: #4caf50; }
        .extra-scores-container {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
            margin-top: 20px;
            opacity: 0;
            animation: fadeIn 0.5s ease-out forwards 0.7s;
        }
        .extra-score-box {
            flex: 1;
            min-width: 150px;
            padding: 15px;
            text-align: center;
            border-radius: 8px;
            background: #f0f0f0;
            transition: transform 0.3s ease;
        }
        .extra-score-box:hover { transform: translateY(-3px); }
        .extra-score-number { font-size: 2rem; font-weight: bold; }
        .extra-score-label { font-size: 15px; color: #555; }
        #pageRankBox {
            background: #e0f7fa;
            position: relative;
            padding: 15px;
            text-align: center;
            border-radius: 8px;
            min-height: 80px;
        }
        #pageRankBox .progress-container {
            position: relative;
            height: 20px;
            background: #f0f0f0;
            border-radius: 4px;
            overflow: hidden;
        }
        #pageRankBox .progress-bar {
            height: 100%;
            border-radius: 4px;
            transition: width 0.5s ease;
        }
        #pageRankBox .progress-number {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-weight: bold;
            font-size: 1.2rem;
            color: #333;
            z-index: 2;
        }
        .progress-bar-danger { background-color: #d32f2f; }
        .progress-bar-warning { background-color: #ff9800; }
        .progress-bar-success { background-color: #4caf50; }
        .industry-comparison {
            margin-top: 20px;
            padding: 15px;
            background: #333;
            color: #fff;
            border-radius: 8px;
            font-size: 14px;
            opacity: 0;
            animation: fadeIn 0.5s ease-out forwards 1s;
        }
        .industry-comparison h3 { font-size: 18px; color: #fff; margin-bottom: 10px; }
        .industry-comparison li { margin-bottom: 8px; }
        .messages-list { margin-top: 20px; }
        .message-item { padding: 15px; margin-bottom: 10px; border-radius: 8px; }
        .message-item.ok { background: #e8f5e9; }
        .message-item.warning { background: #fff3e0; }
        .message-item.issue { background: #ffebee; }
        .message-item .title { font-weight: bold; display: flex; align-items: center; font-size: 15px; }
        .message-item .detail { margin-top: 5px; color: #555; font-size: 14px; }
        .order-form-container { margin-top: 20px; padding: 20px; background: #f5f5f5; border-radius: 12px; }
        .order-form { display: flex; flex-direction: column; gap: 15px; }
        .form-group { display: flex; flex-direction: column; }
        .form-group label { font-size: 15px; color: #333; margin-bottom: 5px; }
        .form-group input { padding: 10px; border: 1px solid #ccc; border-radius: 8px; font-size: 15px; }
        #orderSubmitBtn {
            padding: 10px;
            background: #4caf50;
            color: #fff;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 15px;
        }
        #orderSubmitBtn:disabled { background: #999; cursor: not-allowed; }
        #orderSubmitBtn .spinner {
            display: none;
            width: 16px;
            height: 16px;
            border: 2px solid #fff;
            border-top: 2px solid transparent;
            border-radius: 50%;
            animation: spin-der 1s linear infinite;
            margin-right: 5px;
        }
        #orderSubmitBtn:disabled .spinner { display: inline-block; }
        .form-response { margin-top: 10px; padding: 10px; border-radius: 6px; font-size: 15px; }
        .form-response.success { background: #e8f5e9; color: #2e7d32; }
        .form-response.error { background: #ffebee; color: #c62828; }
        .history-container { margin-top: 20px; }
        .history-list { list-style: none; padding: 0; }
        .history-list li { padding: 10px; background: #f9f9f9; border-radius: 6px; margin-bottom: 8px; font-size: 15px; }
        .clear-history-btn {
            padding: 10px;
            background: #f44336;
            color: #fff;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 15px;
        }
        @media (max-width: 768px) {
            .stats-container, .extra-scores-container { flex-direction: column; }
            .score-container { width: 120px; height: 120px; }
            .circular-progress .stat-number { font-size: 2rem; }
            .stat-label { font-size: 13px; }
            #seoForm { flex-direction: column; }
            #urlInput, #deviceSelect { margin-bottom: 10px; }
            #downloadPDFBtn { margin-left: 0; margin-top: 10px; }
        }
        #reportContainer {
            direction: rtl;
            text-align: right;
            font-family: 'Vazir', Tahoma, sans-serif;
            display: none;
            padding: 20px;
            background: #fff;
        }
        #reportContainer h2 {
            font-size: 24px;
            margin-bottom: 20px;
        }
        #reportContainer .stat-box, #reportContainer .extra-score-box {
            margin: 10px 0;
        }
        #reportContainer .message-item img {
            display: none;
        }
        
        
        
        
        
        
        
         #submitBtn.scanning {
            position: relative;
            overflow: hidden;
        }
        #submitBtn.scanning::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            animation: scan 1.5s linear infinite;
        }
        @keyframes scan {
            0% { left: -100%; }
            100% { left: 100%; }
        }
        .spinner {
            display: none;
            margin-right: 5px;
            width: 16px;
            height: 16px;
            border: 2px solid #fff;
            border-top: 2px solid transparent;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        button[aria-busy="true"] .spinner {
            display: inline-block;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        /* استایل کادر پیام‌ها */
        #loadingMessages {
            display: none;
            margin-top: 10px;
            padding: 15px;
            background: linear-gradient(135deg, #f0f4f8, #d9e2ec);
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            text-align: center;
            overflow: hidden;
            position: relative;
            width: 100%; /* عرض کامل */
        }
        #loadingMessages.show {
            display: block;
            animation: fadeIn 0.5s ease-in-out;
        }
        #loadingMessages.hide {
            animation: fadeOut 0.5s ease-in-out forwards;
        }
        #loadingMessages p {
            margin: 0;
            font-size: 16px;
            color: #333;
            opacity: 0;
            transform: translateY(20px);
            animation: slideUp 1.5s ease-in-out infinite;
        }
        @keyframes slideUp {
            0% { opacity: 0; transform: translateY(20px); }
            20% { opacity: 1; transform: translateY(0); }
            80% { opacity: 1; transform: translateY(0); }
            100% { opacity: 0; transform: translateY(-20px); }
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: scale(0.95); }
            to { opacity: 1; transform: scale(1); }
        }
        @keyframes fadeOut {
            from { opacity: 1; transform: scale(1); }
            to { opacity: 0; transform: scale(0.95); display: none; }
        }
        
        
        
        
        
        
        
       