/* استایل‌های مدرن و تمیز برای هاب (نسخه ۵ قابلیت) */
body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
    direction: rtl;
    color: #333;
    -webkit-tap-highlight-color: transparent;
}

.screen {
    display: none; 
    padding-bottom: 50px;
    animation: fadeIn 0.3s ease-in-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loader */
#loading-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
}
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Hub Styling */
.hub-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 25px 20px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.hub-header h1 { margin: 0; font-size: 1.4rem; }
.status-badge {
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-top: 10px;
    display: inline-block;
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 20px;
    margin-top: -20px;
}
.menu-grid.full-5 {
    grid-template-columns: repeat(3, 1fr); /* ۳ ستون */
}

.menu-card {
    background: white;
    border-radius: 15px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    cursor: pointer;
    min-height: 120px;
}
.menu-card:active { transform: scale(0.95); }
.menu-card .icon { font-size: 2rem; margin-bottom: 5px; }
.menu-card h3 { margin: 0 0 5px 0; font-size: 0.9rem; color: #444; }
.menu-card p { margin: 0; font-size: 0.65rem; color: #888; }
.menu-card.disabled { opacity: 0.6; filter: grayscale(100%); cursor: not-allowed; }

.upgrade-btn {
    background: #28a745;
    color: white;
    border: none;
    width: 90%;
    padding: 15px;
    border-radius: 12px;
    font-size: 1rem;
    margin: 0 auto;
    display: block;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

/* App Pages Styling */
.app-header {
    background: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.app-header h2 { margin: 0; font-size: 1.1rem; }

.container { padding: 20px; }

/* Form Elements Styling */
label {
    display: block;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 5px;
    margin-top: 15px;
}

input[type="text"], input[type="url"], input[type="password"], textarea, select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 0.9rem;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.primary-button, #analyze-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.primary-button:hover, #analyze-button:hover {
    background-color: #0056b3;
}

.action-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.action-row select { flex: 1; }
.action-row button { flex: 1; }

.output-box {
    background-color: #f8f9fa;
    border: 1px dashed #ced4da;
    padding: 15px;
    margin-top: 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.output-box textarea {
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    min-height: 100px;
}

.status-box { 
    padding: 15px; 
    border-radius: 8px; 
    margin-top: 20px; 
}
.status-box.warning { 
    background: #fff3cd; 
    color: #856404; 
    border: 1px solid #ffeeba; 
}
.status-box.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

hr {
    border: 0;
    height: 1px;
    background: #ddd;
    margin: 20px 0;
}
