/* فونت وزیر - مدیوم */
@font-face {
    font-family: 'Vazir';
    src: url('Vazir-Medium.woff2') format('woff2'),
        url('Vazir-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* فونت وزیر - بولد */
@font-face {
    font-family: 'Vazirb';
    /* یا می‌توانید از همین 'Vazir' با وزن bold استفاده کنید */
    src: url('Vazir-Bold.woff2') format('woff2'),
        url('Vazir-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazir', sans-serif;
}

body {

    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

#app {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

.screen {
    display: none;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 500px;
    width: 100%;
    text-align: center;
    padding: 30px 20px;
}

/* لوگو و عنوان */
.logo-container {
    margin-bottom: 40px;
}

.logo-icon {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.logo-letter {
    font-size: 60px;
    font-weight: 900;
    background: linear-gradient(45deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    animation: pulse 2s infinite;
    display: inline-block;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.app-title {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

.subtitle {
    font-size: 18px;
    color: #a0a0c0;
    font-weight: 300;
}

/* دکمه‌ها */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 50px 0;
}

.btn {
    padding: 18px 35px;
    border: none;
    border-radius: 15px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #f5576c, #ff6b6b);
    color: white;
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(245, 87, 108, 0.6);
}

.btn-full {
    width: 100%;
    margin-top: 20px;
}

.btn-icon-only {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-only:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* فوتر */
.footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    font-size: 14px;
    color: #6c6c8a;
    margin-bottom: 5px;
}

.creator {
    font-size: 13px;
    color: #5a5a7a;
    font-weight: 300;
}

/* مودال‌ها */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a3e, #2a2a5e);
    border-radius: 25px;
    padding: 30px;
    max-width: 450px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    font-size: 28px;
    background: linear-gradient(45deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.modal-header p {
    color: #a0a0c0;
    font-size: 14px;
}

.modal-body {
    margin-top: 20px;
}

.close-btn {
    position: absolute;
    top: 15px;
    left: 20px;
    background: none;
    border: none;
    color: #a0a0c0;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #fff;
}

/* فرم ورودی */
.input-group {
    margin-bottom: 20px;
    text-align: right;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #a0a0c0;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

.input-group input::placeholder {
    color: #5a5a7a;
}

.error-msg {
    display: block;
    color: #f5576c;
    font-size: 13px;
    margin-top: 5px;
    min-height: 20px;
}

/* گرید مراحل */
.levels-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.level-item {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 700;
}

.level-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.level-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.05);
}

.level-item.locked:hover {
    transform: none;
}

.level-item.completed {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.level-item.current {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border-color: #f5576c;
    animation: glowPulse 1.5s infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(245, 87, 108, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(245, 87, 108, 0.6);
    }
}

/* تنظیمات */
.setting-item {
    margin-bottom: 25px;
    text-align: right;
}

.setting-item label {
    display: block;
    color: #a0a0c0;
    font-size: 14px;
    margin-bottom: 8px;
}

.setting-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 14px;
    color: #a0a0c0;
}

/* صفحه بازی */
.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-header h2 {
    font-size: 24px;
    background: linear-gradient(45deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.score-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.game-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    min-height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.game-placeholder {
    color: #5a5a7a;
    font-size: 18px;
    text-align: center;
    width: 100%;
}

/* اسکرول بار سفارشی */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* ریسپانسیو */
@media (max-width: 480px) {
    .logo-letter {
        font-size: 40px;
    }

    .app-title {
        font-size: 36px;
    }

    .subtitle {
        font-size: 16px;
    }

    .btn {
        padding: 15px 25px;
        font-size: 16px;
    }

    .modal-content {
        padding: 20px;
    }

    .levels-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .level-item {
        padding: 10px 5px;
        font-size: 12px;
    }

    .game-header h2 {
        font-size: 20px;
    }
}

@media (max-width: 360px) {
    .levels-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}