/* ...existing code... */

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --background-color: #f8fafc;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    /* Prevent horizontal scroll on mobile */
    overflow-x: hidden;
}

.site-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.header-content h1 {
    font-size: 2.5rem;
    margin: 0;
    font-weight: 600;
}

.header-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 1rem;
}

.search-section {
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(30,64,175,0.08);
    padding: 0.75rem 1.5rem;
    margin-bottom: 1.2rem;
    max-width: 480px;
    width: 100%;
    border: none; /* Remove border for cleaner look */
    transition: box-shadow 0.2s;
}

.search-bar:focus-within {
    box-shadow: 0 4px 16px rgba(37,99,235,0.10);
    border: none;
}

.search-icon {
    color: #64748b;
    margin-right: 1rem;
    font-size: 1.2rem;
}

#searchTests {
    border: none !important; /* Remove border in all cases */
    outline: none !important; /* Remove outline in all cases */
    font-size: 1.08rem;
    width: 100%;
    background: transparent;
    color: #1e293b;
    padding: 0.5rem 0;
    font-family: inherit;
    letter-spacing: 0.01em;
    box-shadow: none !important; /* Remove any browser default shadow */
}

#searchTests:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.2rem;
}

.filter-label {
    color: #64748b;
    font-size: 1rem;
    margin-right: 0.5rem;
    font-weight: 500;
}

.tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.35rem 1.1rem;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 500;
    border: 1px solid #c7d2fe;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

.tag:hover {
    background: #3730a3;
    color: #fff;
    border: 1px solid #3730a3;
}

.test-list-container {
    max-width: 1100px;
    margin: 2.5rem auto 2rem auto;
    padding: 0 2rem;
    box-sizing: border-box;
    width: 100%;
}

.test-list-container h1 {
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 2rem;
}

.search-bar {
    margin-bottom: 2rem;
    text-align: center;
}

#searchTests {
    width: 100%;
    max-width: 500px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#searchTests:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
}

.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.test-card {
    background: white;
    border-radius: 16px;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    box-shadow: 0 4px 16px rgba(30,64,175,0.08);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    border: 1.5px solid #e5e7eb;
    position: relative;
}

.test-card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 12px 32px rgba(37,99,235,0.13);
    border-color: var(--primary-color);
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.2rem;
}

.test-title h2 {
    margin: 0 0 0.3rem 0;
    font-size: 1.35rem;
    color: #1a1a1a;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.test-description {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
    margin-bottom: 0.2rem;
    font-weight: 400;
}

.test-category {
    font-size: 0.9rem;
    color: var(--primary-color);
    background: #dbeafe;
    padding: 0.3rem 0.95rem;
    border-radius: 16px;
    font-weight: 500;
    margin-top: 0.2rem;
    white-space: nowrap;
}

.test-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 2rem;
    padding: 1rem 0 0.5rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.98rem;
    color: #475569;
}

.stat-icon {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.stat-value {
    font-weight: 500;
}

.test-action {
    text-align: right;
    margin-top: 0.5rem;
}

.start-test-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.85rem 1.7rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    box-shadow: 0 2px 8px rgba(37,99,235,0.08);
    transition: background 0.2s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.start-test-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px) scale(1.03);
}

.test-list-container {
    max-width: 1100px;
    margin: 2.5rem auto 2rem auto;
    padding: 0 2rem;
    box-sizing: border-box;
    width: 100%;
}

.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.2rem;
}

.test-card {
    background: white;
    border-radius: 16px;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    box-shadow: 0 4px 16px rgba(30,64,175,0.08);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    border: 1.5px solid #e5e7eb;
    position: relative;
}

.test-card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 12px 32px rgba(37,99,235,0.13);
    border-color: var(--primary-color);
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.2rem;
}

.test-title h2 {
    margin: 0 0 0.3rem 0;
    font-size: 1.35rem;
    color: #1a1a1a;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.test-description {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
    margin-bottom: 0.2rem;
    font-weight: 400;
}

.test-category {
    font-size: 0.9rem;
    color: var(--primary-color);
    background: #dbeafe;
    padding: 0.3rem 0.95rem;
    border-radius: 16px;
    font-weight: 500;
    margin-top: 0.2rem;
    white-space: nowrap;
}

/* Results Page Styles */
.results-container {
    max-width: 600px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.results-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.results-card h1 {
    color: #1a1a1a;
    margin-bottom: 2rem;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 12px solid #e2e8f0;
    margin: 0 auto 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.score-circle::after {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-radius: 50%;
    border: 12px solid var(--primary-color);
    clip-path: circle(50% at 50% 50%);
    clip-path: polygon(50% 50%, 50% 0%, var(--end-x) var(--end-y));
    transform: rotate(-90deg);
    transition: all 1s ease-in-out;
}

.score-circle[data-progress="0"]::after {
    clip-path: circle(50% at 50% 50%);
}

.score-circle[data-progress="100"]::after {
    clip-path: polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%, 50% 100%);
}

.percentage {
    font-size: 3rem;
    font-weight: 600;
    color: var(--primary-color);
}

.score-label {
    color: #64748b;
    font-size: 0.9rem;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
}

.stat-item i {
    color: var(--primary-color);
}

.stat-item strong {
    color: #1a1a1a;
}

.review-btn, .home-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.review-btn {
    background: var(--primary-color);
    color: white;
    margin-right: 1rem;
}

.review-btn:hover {
    background: var(--secondary-color);
}

.home-btn {
    background: #f1f5f9;
    color: #1e293b;
}

.home-btn:hover {
    background: #e2e8f0;
}

.view-history-btn {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.view-history-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.view-history-btn i {
    font-size: 1.1rem;
}

@media (max-width: 900px) {
    .test-list-container {
        padding: 0 1rem;
    }
    .test-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
}

@media (max-width: 768px) {
    .test-list-container {
        padding: 1rem;
    }
    
    .test-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .test-list-container {
        padding: 0 0.5rem;
        margin: 1rem 0;
        width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .test-card {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        word-break: break-word;
        padding: 1.2rem 0.7rem 1rem 0.7rem;
    }
    .search-section {
        margin-bottom: 1.2rem;
        padding: 0 0.5rem;
    }
    .search-bar {
        flex-direction: row;
        padding: 0.4rem 0.7rem;
        max-width: 100%;
        min-width: 0;
    }
    #searchTests {
        font-size: 0.98rem;
        padding: 0.4rem 0;
    }
    .filter-tags {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    .filter-label {
        margin-bottom: 0.2rem;
    }
}

/* ...existing code... */