.container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px;
    }

    .main-container {
        margin-top: 0px;
        margin-bottom: 0px;
    }

    .search-results {
        
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        padding: 30px;
        margin-bottom: 30px;
        animation: fadeIn 0.5s ease;
    }

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

    .search-header {
        border-bottom: 2px solid var(--border);
        padding-bottom: 20px;
        margin-bottom: 30px;
        scroll-margin-top: 20px;
    }

    .search-header h1 {
        
        font-size: 1.8em;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .search-header h1 i {
        color: var(--secondary);
    }

    .source-info {
        background: linear-gradient(135deg, #eef2ff, #e0e7ff);
        padding: 12px 20px;
        border-radius: var(--radius-xs);
        color: var(--info);
        font-weight: 500;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        border-right: 4px solid var(--info);
    }

    .source-info i {
        font-size: 1.2em;
    }

    .response-container {
        
        padding: 25px;
        border-radius: var(--radius);
        border: 1px solid var(--border);
        margin-bottom: 30px;
        line-height: 1.8;
        font-size: 1.1em;
    }

    .ai-results-container {
        background: linear-gradient(135deg, #ffffff, #f8fafc);
        border-radius: var(--radius);
        border: 2px solid var(--border);
        overflow: hidden;
        margin-top: 30px;
        display: none;
    }

    .ai-results-header {
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: white;
        padding: 20px 30px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .ai-results-header h3 {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 1.3em;
    }

    .ai-stats {
        display: flex;
        gap: 20px;
        font-size: 0.9em;
    }

    .ai-stats span {
        background: rgba(255, 255, 255, 0.2);
        padding: 5px 12px;
        border-radius: 20px;
        font-weight: 600;
    }

    .ai-results-content {
        padding: 30px;
        max-height: 600px;
        overflow-y: auto;
    }

    .loading-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 60px 30px;
        text-align: center;
    }

    .spinner {
        display: flex;
        gap: 8px;
        margin-bottom: 20px;
    }

    .spinner .dot1,
    .spinner .dot2,
    .spinner .dot3 {
        width: 12px;
        height: 12px;
        background: var(--secondary);
        border-radius: 50%;
        animation: bounce 1.4s infinite ease-in-out both;
    }

    .spinner .dot1 { animation-delay: -0.32s; }
    .spinner .dot2 { animation-delay: -0.16s; }

    @keyframes bounce {
        0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
        40% { transform: scale(1); opacity: 1; }
    }


    .chat-container {
        border-radius: var(--radius);
        overflow: hidden;
    }

    .chat-header {
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: white;
        padding: 25px 30px;
        display: flex;
        align-items: center;
        gap: 20px;
        flex-wrap: wrap;
    }

    .chat-header-icon {
        background: linear-gradient(135deg, #ffd700, #ffea80);
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 28px;
        
        flex-shrink: 0;
    }

    .chat-header-text {
        flex: 1;
        min-width: 300px;
    }

    .chat-header-text h2 {
        font-size: 1.6em;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .chat-header-text p {
        font-size: 1em;
        opacity: 0.9;
        color: #ffd700;
    }

    .chat-status {
        background: rgba(255, 215, 0, 0.15);
        border: 1px solid rgba(255, 215, 0, 0.3);
        padding: 10px 18px;
        border-radius: 25px;
        font-size: 0.9em;
        display: flex;
        align-items: center;
        gap: 10px;
        white-space: nowrap;
    }

    .chat-status i {
        color: var(--success);
        font-size: 0.8em;
    }

    .chat-messages {
        height: 580px;
        overflow-y: auto;
        padding: 25px;
        
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
.message {
    max-width: 85%;
    padding: 5px 25px;
    border-radius: 18px;
    line-height: 1.7;
    font-size: 13px;
    position: relative;
    animation: fadeInUp 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

    .message.question {
        background: linear-gradient(135deg, var(--accent), #f59e0b);
        color: white;
        align-self: flex-end;
        border-bottom-right-radius: 5px;
        box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
    }

    .message.answer {
        
        align-self: flex-start;
        border: 1px solid var(--border);
        border-bottom-left-radius: 5px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    }

    .message.question::before {
        content: '';
        position: absolute;
        right: -8px;
        top: 20px;
        width: 0;
        height: 0;
        border-top: 8px solid transparent;
        border-bottom: 8px solid transparent;
        border-left: 8px solid #f59e0b;
    }

    .message.answer::before {
        content: '';
        position: absolute;
        left: -8px;
        top: 20px;
        width: 0;
        height: 0;
        border-top: 8px solid transparent;
        border-bottom: 8px solid transparent;
        border-right: 8px solid var(--border);
    }

    .message-time {
        font-size: 12px;
        opacity: 0.7;
        margin-top: 8px;
        display: block;
        text-align: left;
    }

    .message.question .message-time {
        text-align: right;
        color: rgba(255, 255, 255, 0.8);
    }

.compact-article {
    border-radius: 12px;
    border: 1px solid var(--border);
    margin: 6px 0;
    padding: 0px;
    display: flex;
    gap: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

    .compact-article:hover {
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .compact-article::before {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        width: 5px;
        height: 100%;
    }

    .compact-article:nth-child(4n+1)::before { background: linear-gradient(to bottom, #3b82f6, #1d4ed8); }
    .compact-article:nth-child(4n+2)::before { background: linear-gradient(to bottom, #10b981, #047857); }
    .compact-article:nth-child(4n+3)::before { background: linear-gradient(to bottom, #f59e0b, #d97706); }
    .compact-article:nth-child(4n+4)::before { background: linear-gradient(to bottom, #ef4444, #dc2626); }

    .compact-article-img {
        width: 120px;
        height: 100px;
        flex-shrink: 0;
        border-radius: 8px;
        overflow: hidden;
        border: 2px solid #e5e7eb;
        transition: var(--transition);
    }

    .compact-article:hover .compact-article-img {
        border-color: var(--accent);
        transform: scale(1.05);
    }

    .compact-article-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .compact-article-content {
        flex: 1;
        min-width: 0;
    }

    .compact-article-title {
        font-size: 1.1em;
        font-weight: 700;
        margin-bottom: 8px;
        
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        transition: var(--transition);
    }

    .compact-article:hover .compact-article-title {
        color: var(--accent);
    }

    .compact-article-excerpt {
        font-size: 0.9em;
        margin-bottom: 12px;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .compact-article-meta {
        display: flex;
        gap: 15px;
        align-items: center;
        flex-wrap: wrap;
        font-size: 0.85em;
        
    }

    .compact-article-meta-item {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .compact-article-meta-item i {
        color: var(--accent);
        font-size: 0.9em;
    }

.compact-article-read-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
    width: 99%;
}



    .compact-article-read-btn:hover {
        background: linear-gradient(135deg, #dc2626, #b91c1c);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
        text-decoration: none;
        color: white;
    }

    .compact-article-read-btn:active {
        transform: translateY(0);
    }

    .compact-article-read-btn i {
        font-size: 0.9em;
    }

.ai-intro-box {
    background: #c0a82d2e;
    padding: 2px;
    margin: 0px 0;
    border-radius: var(--radius);
    border-right: 4px solid #f6783b;
    position: relative;
}

    .ai-intro-box::before {
        content: '🤖';
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 24px;
        
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .ai-intro-content {
        margin-right: 70px;
    }

    .ai-intro-title {
        font-size: 1.2em;
        margin-bottom: 10px;
        font-weight: 700;
    }

    .ai-intro-text {
        
        line-height: 1.7;
    }

.stats-box {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 4px;
    margin: 3px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

    .stat-item {
        text-align: center;
        padding: 15px;
        border-radius: 10px;
        transition: var(--transition);
    }

    .stat-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    }

    .stat-value {
        font-size: 1.8em;
        font-weight: 800;
        margin-bottom: 5px;
    }

    .stat-label {
        font-size: 0.9em;
        
    }

    .view-controls {
        display: flex;
        gap: 10px;
        margin: 20px 0;
        padding: 15px;
        
        border-radius: var(--radius);
        justify-content: flex-end;
    }

    .view-btn {
        
        border: 1px solid var(--border);
        padding: 8px 15px;
        border-radius: var(--radius-xs);
        cursor: pointer;
        transition: var(--transition);
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.9em;
    }

    .view-btn:hover {
        background: var(--border);
    }

    .view-btn.active {
        background: var(--primary);
        color: white;
        border-
    }

    .chat-input-area {
        padding: 25px;
        
        border-top: 1px solid var(--border);
    }

    .input-wrapper {
        display: flex;
        gap: 15px;
        align-items: flex-end;
        margin-bottom: 20px;
    }

    .chat-textarea:focus {
        outline: none;
        border-
        box-shadow: 0 0 0 3px rgba(39, 39, 40, 0.1);
    }

    .chat-textarea::placeholder {
        
    }

    .chat-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        min-width: 140px;
    }

.send-button {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 44px 20px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

    .send-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    }

    .send-button:active {
        transform: translateY(0);
    }

    .send-button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

    .provider-select {
        padding: 12px 15px;
        border: 1px solid var(--border);
        border-radius: var(--radius-xs);
        
        font-family: 'Noto Sans Arabic', sans-serif;
        font-size: 14px;
        width: 100%;
        
    }

    .provider-select:focus {
        outline: none;
        border-
    }

    .chat-tools {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .tool-button {
        padding: 12px 18px;
        
        border: 1px solid var(--border);
        border-radius: var(--radius-xs);
        font-size: 14px;
        cursor: pointer;
        transition: var(--transition);
        display: flex;
        align-items: center;
        gap: 8px;
        
    }

    .tool-button:hover {
        background: var(--border);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .typing-indicator {
        display: none;
        align-items: center;
        gap: 10px;
        padding: 15px 25px;
        
        border-radius: 25px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        margin: 10px 25px;
        align-self: flex-start;
        border: 1px solid var(--border);
    }

    .typing-indicator span {
        width: 8px;
        height: 8px;
        background: var(--primary);
        border-radius: 50%;
        animation: typing 1.4s infinite ease-in-out both;
    }

    .typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
    .typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

    @keyframes typing {
        0%, 80%, 100% { transform: scale(0); }
        40% { transform: scale(1); }
    }

    .typing-indicator span:last-child {
        animation: none;
        width: auto;
        height: auto;
        background: transparent;
        
        font-size: 14px;
        margin-right: 10px;
    }

    .scroll-to-top {
        position: fixed;
        bottom: 30px;
        left: 30px;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: white;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        cursor: pointer;
        z-index: 1000;
        opacity: 0;
        transform: translateY(20px);
        transition: var(--transition);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        border: 2px solid white;
    }

    .scroll-to-top.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .scroll-to-top:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    }

    .notification {
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%) translateY(-100px);
        padding: 15px 25px;
        border-radius: var(--radius-sm);
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
        z-index: 10000;
        transition: transform 0.4s ease;
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 300px;
        max-width: 90vw;
    }

    .notification.show {
        transform: translateX(-50%) translateY(0);
    }

    .notification.success {
        background: linear-gradient(135deg, var(--success), #059669);
        color: white;
        border-right: 4px solid #047857;
    }

    .notification.error {
        background: linear-gradient(135deg, var(--danger), #dc2626);
        color: white;
        border-right: 4px solid #b91c1c;
    }

    .notification.warning {
        background: linear-gradient(135deg, var(--warning), #d97706);
        color: white;
        border-right: 4px solid #b45309;
    }

    .notification.info {
        background: linear-gradient(135deg, var(--info), #2563eb);
        color: white;
        border-right: 4px solid #1d4ed8;
    }

    body.dark-mode {
        background: #1a1a1a;
        color: #e5e7eb;
    }

    body.dark-mode .search-results,
    body.dark-mode .chat-section,
    body.dark-mode .chat-textarea,
    body.dark-mode .provider-select,
    body.dark-mode .tool-button {
        background: #2d2d2d;
        color: #e5e7eb;
        border-color: #4b5563;
    }

    body.dark-mode .chat-messages {
        background: #1a1a1a;
    }

    body.dark-mode .message.answer {
        background: #374151;
        color: #e5e7eb;
        border-color: #4b5563;
    }

    body.dark-mode .compact-article {
        background: #2d2d2d;
        border-color: #4b5563;
    }

    body.dark-mode .compact-article-title {
        color: #e5e7eb;
    }

    body.dark-mode .compact-article-excerpt {
        color: #9ca3af;
    }

    body.dark-mode .ai-intro-box {
        background: linear-gradient(135deg, #1e3a8a, #1e40af);
        color: #e5e7eb;
        border-right-color: #60a5fa;
    }

    body.dark-mode .stats-box {
        background: #2d2d2d;
        border-color: #4b5563;
    }

    body.dark-mode .view-btn {
        background: #374151;
        border-color: #4b5563;
        color: #e5e7eb;
    }

    body.dark-mode .view-btn.active {
        background: var(--primary);
        color: white;
    }

    @media (max-width: 768px) {
        .container {
            padding: 15px;
        }

        .main-container {
            margin-top: 10px;
        }

        .search-results,
        .chat-section {
            padding: 0px;
        }

        .compact-article {
            flex-direction: column;
            gap: 15px;
        }

        .compact-article-img {
            width: 100%;
            height: 200px;
        }

        .ai-intro-box::before {
            display: none;
        }

        .ai-intro-content {
            margin-right: 0;
        }

        .chat-header {
            padding: 20px;
            flex-direction: column;
            text-align: center;
            gap: 15px;
        }

        .chat-header-text {
            min-width: auto;
            text-align: center;
        }

        .chat-header-text h2 {
            font-size: 1.3em;
        }

        .chat-messages {
            height: 400px;
            padding: 15px;
        }

        .message {
            max-width: 97%;
            padding: 15px 18px;
            font-size: 15px;
        }

        .input-wrapper {
            flex-direction: column;
        }

        .chat-buttons {
            flex-direction: row;
            width: 100%;
            min-width: auto;
        }

        .send-button,
        .provider-select {
            flex: 1;
            padding: 14px;
        }

        .chat-textarea {
            min-height: 100px;
            font-size: 15px;
        }

        .ai-results-header {
            flex-direction: column;
            gap: 15px;
            text-align: center;
        }

        .ai-stats {
            justify-content: center;
        }

        .chat-tools {
            justify-content: center;
        }

        .tool-button span {
            display: none;
        }

        .tool-button {
            padding: 12px;
            border-radius: 50%;
            width: 44px;
            height: 44px;
            justify-content: center;
        }

        .stats-box {
            grid-template-columns: 1fr;
        }

        .scroll-to-top {
            left: 15px;
            bottom: 15px;
            width: 45px;
            height: 45px;
            font-size: 18px;
        }
    }

    @media (max-width: 480px) {
        .chat-messages {
            height: 350px;
        }

        .message {
            max-width: 97%;
            padding: 12px 15px;
            font-size: 14px;
        }

        .search-header h1 {
            font-size: 1.4em;
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
        }

        .ai-stats {
            flex-direction: column;
            gap: 10px;
        }

        .notification {
            min-width: auto;
            width: 95%;
            padding: 12px 18px;
            font-size: 14px;
        }

        .compact-article-img {
            height: 180px;
        }

        .compact-article-meta {
            flex-direction: column;
            align-items: flex-start;
            gap: 8px;
        }
    }

    .message-content {
        line-height: 1.8;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .message-content h1,
    .message-content h2,
    .message-content h3 {
        
        margin: 0px 0 12px 0;
        font-weight: 600;
        line-height: 1.3;
    }

    .message-content h1 { font-size: 1.4em; border-bottom: 2px solid currentColor; padding-bottom: 8px; }
    .message-content h2 { font-size: 1.2em; border-bottom: 1px solid currentColor; padding-bottom: 6px; }
    .message-content h3 { font-size: 1.1em; }

    .message-content ul,
    .message-content ol {
        margin: 12px 0 12px 25px;
        padding-right: 15px;
    }

.message-content li {
    margin-bottom: 8px;
    line-height: 1.6;
    
}

    .message-content code:not(pre code) {
        background: rgba(0, 0, 0, 0.08);
        padding: 2px 6px;
        border-radius: 4px;
        font-family: 'Courier New', monospace;
        font-size: 0.9em;
        color: #dc2626;
    }

    .message-content pre {
        background: #1f2937;
        color: #f9fafb;
        padding: 18px;
        border-radius: 8px;
        overflow-x: auto;
        margin: 15px 0;
        border: 1px solid #374151;
        font-size: 14px;
        line-height: 1.5;
    }

    .message-content pre code {
        background: transparent;
        
        padding: 0;
    }

    .message-content blockquote {
        border-right: 4px solid var(--accent);
        padding: 15px 20px;
        margin: 15px 0;
        background: rgba(245, 158, 11, 0.05);
        border-radius: 0 8px 8px 0;
        font-style: italic;
        color: #92400e;
    }

    .status-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        margin: 0 5px;
    }

    .status-badge.online {
        background: rgba(16, 185, 129, 0.1);
        color: var(--success);
        border: 1px solid rgba(16, 185, 129, 0.3);
    }

    .status-badge.offline {
        background: rgba(239, 68, 68, 0.1);
        color: var(--danger);
        border: 1px solid rgba(239, 68, 68, 0.3);
    }

    .status-badge.loading {
        background: rgba(245, 158, 11, 0.1);
        color: var(--warning);
        border: 1px solid rgba(245, 158, 11, 0.3);
    }

    @keyframes slideInRight {
        from { transform: translateX(30px); opacity: 0; }
        to { transform: translateX(0); opacity: 1; }
    }

    .slide-in-right {
        animation: slideInRight 0.5s ease;
    }

    @keyframes slideInLeft {
        from { transform: translateX(-30px); opacity: 0; }
        to { transform: translateX(0); opacity: 1; }
    }

    .slide-in-left {
        animation: slideInLeft 0.5s ease;
    }

    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    :focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }

    @media print {
        .chat-input-area,
        .chat-tools,
        .typing-indicator,
        .notification,
        .info-box {
            display: none !important;
        }

        .chat-messages {
            height: auto;
            overflow: visible;
        }

        .message {
            max-width: 100%;
            break-inside: avoid;
        }
		
    }
	
	

.result-summary-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 25px 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    
    transition: var(--transition);
}

.result-summary-table:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.result-summary-table thead {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.result-summary-table thead th {
    color: white;
    font-weight: 700;
    font-size: 1.1em;
    padding: 20px 25px;
    text-align: right;
    position: relative;
}

.result-summary-table thead th:first-child {
    border-top-right-radius: var(--radius);
}

.result-summary-table thead th:last-child {
    border-top-left-radius: var(--radius);
}

.result-summary-table thead th::after {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.result-summary-table thead th:first-child::after {
    display: none;
}

.result-summary-table tbody tr {
    transition: var(--transition);
}

.result-summary-table tbody tr:hover {
    
}

.result-summary-table tbody td {
    padding: 18px 25px;
    border-bottom: 1px solid var(--border);
    font-size: 1em;
    line-height: 1.6;
    vertical-align: top;
}

.result-summary-table tbody tr:last-child td {
    border-bottom: none;
}

.result-summary-table tbody td:first-child {
    font-weight: 600;
    
    width: 30%;
    border-left: 1px solid var(--border);
}

.result-summary-table tbody td:last-child {
    
    width: 70%;
    direction: ltr;
    text-align: left;
}

.result-summary-table tbody tr:last-child td:first-child {
    border-bottom-right-radius: var(--radius);
}

.result-summary-table tbody tr:last-child td:last-child {
    border-bottom-left-radius: var(--radius);
}

.result-summary-table tbody tr:nth-child(2) td:last-child {
    color: var(--success);
    font-weight: 700;
    font-size: 1.2em;
}

.result-summary-table tbody tr:nth-child(3) td:last-child {
    color: var(--accent);
    font-weight: 600;
}

.result-summary-table tbody tr:nth-child(4) td:last-child {
    color: var(--info);
}

.result-summary-table tbody tr:nth-child(5) td:last-child {
    
    font-style: italic;
}

.result-summary-table strong {
    color: var(--primary-dark);
    font-weight: 700;
}


.table-gradient-rows tbody tr:nth-child(odd) {
    background: linear-gradient(90deg, rgba(248, 250, 252, 0.8), rgba(241, 245, 249, 0.4));
}

.table-gradient-rows tbody tr:nth-child(even) {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(248, 250, 252, 0.4));
}

.table-colored-borders tbody td:first-child {
    border-right: 4px solid var(--info);
    padding-right: 21px;
}

.table-colored-borders tbody tr:nth-child(2) td:first-child {
    border-right-color: var(--success);
}

.table-colored-borders tbody tr:nth-child(3) td:first-child {
    border-right-color: var(--accent);
}

.table-colored-borders tbody tr:nth-child(4) td:first-child {
    border-right-
}

.table-colored-borders tbody tr:nth-child(5) td:first-child {
    border-right-color: var(--warning);
}


.table-card-style {
    display: block;
    
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    margin: 25px 0;
}

.table-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

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

.table-card-label {
    font-weight: 600;
    
    font-size: 1em;
    min-width: 40%;
}

.table-card-value {
    
    font-size: 1em;
    text-align: left;
    direction: ltr;
    flex: 1;
    padding-right: 15px;
}

.table-card-row:nth-child(2) .table-card-value {
    color: var(--success);
    font-weight: 700;
    font-size: 1.2em;
}

.table-card-row:nth-child(3) .table-card-value {
    color: var(--accent);
    font-weight: 600;
}


.table-sidebar-style {
    
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 25px 0;
}

.table-sidebar-item {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.table-sidebar-item:last-child {
    border-bottom: none;
}

.table-sidebar-item::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background: linear-gradient(to bottom, var(--info), var(--info-light));
    transition: var(--transition);
}

.table-sidebar-item:nth-child(2)::before {
    background: linear-gradient(to bottom, var(--success), var(--success-light));
}

.table-sidebar-item:nth-child(3)::before {
    background: linear-gradient(to bottom, var(--accent), var(--warning));
}

.table-sidebar-item:nth-child(4)::before {
    background: linear-gradient(to bottom, var(--primary), var(--primary-light));
}

.table-sidebar-item:nth-child(5)::before {
    background: linear-gradient(to bottom, var(--text-light), var(--border));
}

.table-sidebar-label {
    font-weight: 600;
    
    min-width: 35%;
    position: relative;
    padding-right: 15px;
}

.table-sidebar-value {
    
    flex: 1;
    text-align: left;
    direction: ltr;
    padding-left: 15px;
}

.table-sidebar-item:hover::before {
    width: 8px;
}

@media (max-width: 768px) {
    .result-summary-table {
        font-size: 14px;
    }
    
    .result-summary-table thead th,
    .result-summary-table tbody td {
        padding: 15px;
    }
    
    .result-summary-table tbody td:first-child,
    .result-summary-table tbody td:last-child {
        width: 50%;
    }
    
    .table-card-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .table-card-label,
    .table-card-value {
        width: 100%;
        text-align: right;
    }
    
    .table-card-value {
        padding-right: 0;
        direction: rtl;
    }
    
    .table-sidebar-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .table-sidebar-label,
    .table-sidebar-value {
        width: 100%;
    }
    
    .table-sidebar-value {
        padding-left: 0;
        direction: rtl;
    }
}

@media (max-width: 480px) {
    .result-summary-table {
        font-size: 13px;
    }
    
    .result-summary-table thead th,
    .result-summary-table tbody td {
        padding: 12px 10px;
    }
}

body.dark-mode .result-summary-table,
body.dark-mode .table-card-style,
body.dark-mode .table-sidebar-style {
    background: #2d2d2d;
    border-color: #4b5563;
}

body.dark-mode .result-summary-table thead {
    background: linear-gradient(135deg, #374151, #4b5563);
}

body.dark-mode .result-summary-table tbody td {
    border-color: #4b5563;
    color: #e5e7eb;
}

body.dark-mode .result-summary-table tbody td:first-child {
    color: #d1d5db;
    border-left-color: #4b5563;
}

body.dark-mode .result-summary-table tbody tr:hover {
    background: #374151;
}

body.dark-mode .result-summary-table tbody tr:nth-child(2) td:last-child {
    color: #10b981;
}

body.dark-mode .result-summary-table tbody tr:nth-child(3) td:last-child {
    color: #f59e0b;
}

body.dark-mode .result-summary-table strong {
    color: #f3f4f6;
}

body.dark-mode .table-card-row {
    border-color: #4b5563;
}

body.dark-mode .table-card-label {
    color: #d1d5db;
}

body.dark-mode .table-card-value {
    color: #e5e7eb;
}

body.dark-mode .table-sidebar-item {
    border-color: #4b5563;
}

body.dark-mode .table-sidebar-label {
    color: #d1d5db;
}

body.dark-mode .table-sidebar-value {
    color: #e5e7eb;
}

@keyframes tableRowAppear {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.result-summary-table tbody tr {
    animation: tableRowAppear 0.5s ease forwards;
}

.result-summary-table tbody tr:nth-child(1) { animation-delay: 0.1s; }
.result-summary-table tbody tr:nth-child(2) { animation-delay: 0.2s; }
.result-summary-table tbody tr:nth-child(3) { animation-delay: 0.3s; }
.result-summary-table tbody tr:nth-child(4) { animation-delay: 0.4s; }
.result-summary-table tbody tr:nth-child(5) { animation-delay: 0.5s; }

.table-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.table-icon i {
    font-size: 1.1em;
    color: var(--accent);
}

.table-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin-right: 8px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.processing-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(245, 158, 11, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    color: var(--accent);
    font-weight: 600;
}

.processing-time i {
    font-size: 0.9em;
}





.weather-card {
    background: linear-gradient(135deg, #4fc5fe, #fe3000);
    color: #fff;
    border-radius: 16px;
    padding: 16px;
    font-family: "Segoe UI", Tahoma, sans-serif;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.weather-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: -6px;
}

.weather-icon {
    font-size: 42px;
}

.weather-title h3 {
    margin: 0;
    font-size: 20px;
}

.weather-desc {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.weather-content {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.weather-main {
    text-align: center;
}

.temp-current {
    font-size: 42px;
    font-weight: bold;
    line-height: 1;
}

.temp-unit {
    font-size: 18px;
    margin-right: 2px;
}

.temp-feels {
    margin: 6px 0 0;
    font-size: 13px;
    opacity: 0.9;
}

.weather-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weather-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    padding: 6px 10px;
    border-radius: 10px;
}

.detail-icon {
    font-size: 18px;
}

.detail-info {
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

.detail-label {
    opacity: 0.85;
}

.detail-value {
    font-weight: bold;
    font-size: 13px;
}




.prayer-times-card {
    border-radius: 16px;
    padding: 14px;
    font-family: "Segoe UI", Tahoma, sans-serif;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.prayer-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 14px;
}

.prayer-table thead th {
    background: #f3f6fa;
    color: #333;
    padding: 8px;
    border-radius: 8px;
    font-weight: 600;
}

.prayer-table tbody tr {
    transition: background 0.2s ease;
}

.prayer-table tbody tr:hover {
    background: #f7faff;
}

.prayer-name {
    font-weight: 500;
}

.prayer-time {
    text-align: center;
    font-weight: bold;
}

.time-value {
    background: #3d3d3d;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 13px;
}

.prayer-status {
    text-align: left;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.prayer-done .status-badge {
    background: #e7f7ee;
    color: #1f9254;
}

.prayer-upcoming .status-badge {
    background: #fff4e5;
    color: #b45309;
}

.prayer-upcoming {
    background: #fffaf3;
}

.prayer-done {
    opacity: 0.9;
}

@media (max-width: 480px) {
    .prayer-times-card {
        padding: 10px;
    }

    .prayer-table {
        font-size: 13px;
    }

    .status-badge {
        font-size: 11px;
    }
}

#styleSelect,
#toneSelect {
    display: none !important;
}