/*
Aryoumehr Creator System
تاریخ تولید: 2024-01-15
نسخه: 1.0.0
*/

:root {
    --primary-color: #405de6;
    --secondary-color: #5851db;
    --accent-color: #fd1d1d;
    --text-color: #262626;
    --text-secondary: #8e8e8e;
    --background: #fafafa;
    --white: #ffffff;
    --border: #dbdbdb;
    --shadow: 0 1px 3px rgba(0,0,0,0.12);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text-color);
    line-height: 1.6;
    direction: rtl;
}

.app-container {
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 1rem;
}

.header-container {
    max-width: 975px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 1rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo h1 span {
    color: var(--accent-color);
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    width: 250px;
}

.search-bar i {
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.search-bar input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.btn-icon:hover {
    background-color: #f0f0f0;
}

/* Main Content */
.app-main {
    flex: 1;
    max-width: 975px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
}

#module-container {
    min-height: 70vh;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    overflow: hidden;
}

.loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 300px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Bottom Navigation */
.bottom-nav {
    display: none;
    background-color: var(--white);
    border-top: 1px solid var(--border);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0.5rem 0;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    font-size: 0.8rem;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.nav-item.active {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 0;
    }
    
    .search-bar {
        display: none;
    }
    
    .header-actions {
        display: none;
    }
    
    .bottom-nav {
        display: flex;
    }
    
    .app-main {
        padding: 0.5rem;
        margin-bottom: 60px;
    }
    
    #module-container {
        padding: 1rem;
    }
}

/* Module Container Styles */
.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.module-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.module-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

.btn-secondary {
    background-color: #f0f0f0;
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}
