* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* Font باید اول تعریف شود */
@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Regular.woff2") format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #00af9d;
    --secondary: #003471;
    --white: #ffffff;
    --bg-dark: #0a0e27;
    --text-light: #e0e0e0;
    --shadow: rgba(0, 175, 157, 0.2);
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1f3a 100%);
    color: var(--text-light);
    min-height: 100vh;
    direction: rtl;
}

/* Navbar */
.navbar {
    background: rgba(0, 52, 113, 0.95);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo img {
    width: 150px;
    height: auto;
}

.navbar h1 {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Main Menu */
.main-menu {
    padding: 3rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    opacity: 0.8;
}

/* Test Grid */
.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.test-card {
    background: linear-gradient(145deg, rgba(0, 52, 113, 0.6), rgba(0, 175, 157, 0.1));
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.test-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.test-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.test-card:hover::before {
    opacity: 0.15;
}

.test-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: grayscale(0.3);
}

.test-card h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.test-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Instructions */
.instructions {
    background: rgba(0, 52, 113, 0.3);
    border: 1px solid var(--primary);
    border-radius: 10px;
    padding: 2rem;
    margin-top: 2rem;
}

.instructions h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.instructions ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.instructions li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

kbd {
    background: var(--secondary);
    color: var(--primary);
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-family: monospace;
    font-size: 0.9rem;
    border: 1px solid var(--primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Test Screen */
.test-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.test-screen.hidden {
    display: none;
}

.test-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 2px solid var(--primary);
}

.control-btn {
    background: var(--secondary);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.control-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.05);
}

.test-title {
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 600;
}

.test-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.test-info {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: 10px;
    border: 1px solid var(--primary);
    text-align: center;
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 100;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    background: rgba(0, 52, 113, 0.3);
    border-top: 2px solid var(--primary);
}

footer p {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    transition: opacity 0.3s ease;
}

footer p:hover {
    opacity: 0.8;
}

footer .heart {
    color: #ff4757;
    display: inline-block;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
}

.footer-logo {
    display: inline-block;
    text-decoration: none;
    vertical-align: middle;
    margin: 0 0.3rem;
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.2) rotate(5deg);
}

.footer-logo img {
    width: 28px;
    height: 28px;
    vertical-align: middle;
}

footer small {
    display: block;
    color: var(--text-light);
    opacity: 0.6;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .test-grid {
        grid-template-columns: 1fr;
    }
    
    .instructions ul {
        grid-template-columns: 1fr;
    }
}

/* Utility */
.hidden {
    display: none !important;
}
