/* ================================================= */
/* AvaSite SEO Analyzer - Modern Professional Style  */
/* ================================================= */

/* --- 1. Typography & Global Reset (No Change in Font-Face) --- */
/* استفاده از فونت استاندارد IRANSans برای خوانایی بهتر در فارسی */
@font-face {
    font-family: 'IRANSans';
    src: url('../../fonts/IRANSansX-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSans';
    src: url('../../fonts/IRANSansX-Regular.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IRANSans';
    src: url('../../fonts/IRANSansX-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

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

:root {
    /* Color Palette */
    --primary-color: #007bff; /* Blue */
    --primary-light: #0d8eff;
    --primary-dark: #0056b3;
    --secondary-color: #6c757d; /* Gray */
    --success-color: #28a745; /* Green */
    --warning-color: #ffc107; /* Yellow */
    --danger-color: #dc3545; /* Red */
    --info-color: #17a2b8; /* Cyan */
    
    /* Grays & Backgrounds */
    --dark-color: #212529; 
    --light-color: #f8f9fa;
    --white: #ffffff;
    --gray-light: #e9ecef;
    --gray: #6c757d;
    --gray-dark: #495057;
    --bg-main: #f4f6f9; /* Soft background color */
    
    /* Spacing & Sizing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 32px;
    --space-xl: 64px;
    
    /* Design Elements */
    --border-radius: 16px; /* Larger radius for modern look */
    --border-radius-sm: 8px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* Lighter, more spread shadow */
    --box-shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.12);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'IRANSans', Tahoma, sans-serif;
    direction: rtl;
    background: var(--bg-main);
    color: var(--dark-color);
    line-height: 1.7; /* Increased line-height for better readability */
    overflow-x: hidden;
    font-size: 16px;
}

.container {
    width: 92%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-dark);
}

.text-center {
    text-align: center;
}
/* --- 1.5. Utilities --- */
hr {
    border: none;
    height: 1px;
    background-color: var(--gray-light);
    margin: var(--space-xl) auto;
    width: 80%; /* Shorter HR for separation */
}

/* --- 2. Buttons (BTNs) --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 30px; /* Slightly larger padding */
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 700; /* Bolder text for CTA */
    text-align: center;
    transition: var(--transition);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
    letter-spacing: 0.5px;
}
.btn:focus-visible {
    outline: 4px solid var(--primary-light);
    outline-offset: 2px;
}
.btn-primary {
    background: linear-gradient(135deg, #4c66f5, var(--primary-color)); /* More vibrant primary */
    color: var(--white);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.35);
}
.btn-primary:hover {
    transform: translateY(-3px); /* More pronounced lift */
    box-shadow: 0 12px 30px rgba(0, 123, 255, 0.45);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}
.btn-primary .btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}
.btn-primary:hover .btn-icon {
    transform: translateX(5px);
}
.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}
.btn-secondary:hover {
    transform: translateY(-1px);
    background: var(--gray-dark);
    box-shadow: 0 4px 10px rgba(108, 117, 125, 0.3);
}
.btn-small {
    padding: 10px 20px;
    font-size: 0.9rem;
}
.btn-large {
    padding: 18px 36px;
    font-size: 1.2rem;
    border-radius: var(--border-radius);
}
.btn-full {
    width: 100%;
    margin-top: var(--space-md);
}
.btn-link {
    background: transparent;
    color: var(--primary-color);
    padding: var(--space-sm) 0;
    font-weight: 500;
}
.btn-link:hover {
    color: var(--primary-dark);
    transform: none;
    box-shadow: none;
    text-decoration: underline;
}

/* --- 3. Header & Navigation --- */
header {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--gray-light);
}
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header .logo {
    font-size: 2rem; /* Slightly larger logo */
    color: var(--dark-color);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
header .logo span:first-child {
    font-size: 2rem;
    color: var(--primary-color);
}
header .logo span:last-child {
    font-weight: 700; 
    color: var(--dark-color);
    background: none; 
    -webkit-text-fill-color: inherit;
}
header nav {
    display: flex;
    align-items: center;
}
header nav a {
    margin-right: var(--space-lg);
    font-weight: 500;
    color: var(--gray-dark);
    position: relative;
    padding-bottom: 7px; /* More space for underline */
}
header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%; /* Start from center */
    transform: translateX(50%);
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 2px;
}
header nav a:hover::after,
header nav a.active::after {
    width: 100%;
    right: 0; /* Cover full width */
    transform: none;
}
.welcome-user {
    margin-right: var(--space-md);
    font-weight: 600;
    color: var(--success-color);
    font-size: 1rem;
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    background-color: #e6ffe6;
}

/* --- 4. Main Content & Forms --- */
.main-content {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
    min-height: calc(100vh - 180px); /* Adjusted for slightly larger footer/header */
}

/* --- 5. Home View (Hero Section) --- */
.hero-section {
    text-align: center;
    padding: 120px 0 100px; /* More vertical padding */
    background: linear-gradient(135deg, #4c66f5 0%, #764ba2 100%); 
    margin-bottom: var(--space-xl);
    border-radius: 0 0 40px 40px; /* More rounded bottom */
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3); /* Deeper shadow */
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.2) 100%);
    opacity: 1; /* Stronger overlay */
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
}
.hero-title {
    font-size: 4rem; /* Larger title */
    margin-bottom: var(--space-md);
    line-height: 1.1;
    font-weight: 900;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
.hero-title .highlight {
    display: block;
    background: linear-gradient(90deg, #f0e6ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}
.hero-title .sub-title {
    display: block;
    font-size: 1.8rem; /* Larger subtitle */
    font-weight: 500;
    margin-top: var(--space-sm);
    opacity: 0.9;
}
.hero-description {
    font-size: 1.35rem; /* Larger description */
    margin-bottom: var(--space-xl);
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}
.search-form {
    margin-bottom: var(--space-xl);
}
.search-container {
    display: flex;
    max-width: 800px; /* Wider search bar */
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.2); /* More transparent */
    backdrop-filter: blur(20px); 
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
}
.search-input {
    flex: 1;
    padding: 20px 30px; /* Larger input area */
    border: none;
    background: transparent;
    color: var(--white);
    font-size: 1.2rem;
    direction: ltr;
    font-weight: 500;
}
.search-input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}
.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
}
.search-btn {
    border-radius: 0;
    padding-left: 40px;
    padding-right: 40px;
    font-weight: 700;
    background: var(--white);
    color: var(--primary-color);
    transition: background 0.3s ease, color 0.3s ease;
}
.search-btn:hover {
    background: var(--gray-light);
    color: var(--primary-dark);
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stat-number {
    font-size: 3.2rem; /* Larger stats */
    font-weight: 900;
    margin-bottom: var(--space-xs);
    color: var(--white);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
}
.stat-label {
    font-size: 1.05rem;
    opacity: 0.95;
    font-weight: 500;
}

/* --- 6. Module Showcase --- */
.module-showcase-section {
    padding: var(--space-xl) 0;
    background: var(--white);
    border-radius: var(--border-radius);
    margin-top: -60px; /* Pull into the hero section */
    box-shadow: var(--box-shadow);
}
.section-title {
    font-size: 2.8rem; /* Larger title */
    color: var(--dark-color);
    margin-bottom: var(--space-lg);
    position: relative;
    font-weight: 800;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px; 
    right: 50%;
    transform: translateX(50%);
    width: 120px;
    height: 6px; /* Thicker underline */
    background: linear-gradient(90deg, var(--info-color), var(--primary-color));
    border-radius: 3px;
}
.section-subtitle {
    font-size: 1.25rem; /* Larger subtitle */
    color: var(--gray);
    margin-bottom: var(--space-xl);
    max-width: 750px;
    margin-right: auto;
    margin-left: auto;
    line-height: 1.8;
}
.module-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); 
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}
.module-group-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08); 
    transition: var(--transition);
    border-top: 5px solid var(--primary-color); 
    display: flex;
    flex-direction: column;
    height: 100%;
}
.module-group-card:nth-child(2) { border-top-color: var(--success-color); }
.module-group-card:nth-child(3) { border-top-color: var(--danger-color); }
.module-group-card:nth-child(4) { border-top-color: var(--warning-color); }
.module-group-card:nth-child(5) { border-top-color: var(--info-color); }
.module-group-card:nth-child(6) { border-top-color: var(--secondary-color); }

.module-group-card:hover {
    transform: translateY(-8px); /* More significant lift */
    box-shadow: var(--box-shadow-hover);
}
.card-header {
    padding: var(--space-lg) var(--space-lg) var(--space-md);
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.group-icon {
    font-size: 2.5rem; /* Larger icon */
    color: var(--primary-color);
}
.module-group-card:nth-child(2) .group-icon { color: var(--success-color); }
.module-group-card:nth-child(3) .group-icon { color: var(--danger-color); }
.module-group-card:nth-child(4) .group-icon { color: var(--warning-color); }
.module-group-card:nth-child(5) .group-icon { color: var(--info-color); }
.module-group-card:nth-child(6) .group-icon { color: var(--secondary-color); }

.group-title {
    font-size: 1.6rem; /* Larger title */
    color: var(--dark-color);
    margin: 0;
    font-weight: 800;
}
.module-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}
.module-list li {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--gray-light);
    transition: background-color 0.2s ease;
}
.module-list li:hover {
    background: #fcfcfc;
}
.module-list li:last-child {
    border-bottom: none;
}
.module-item {
    display: flex;
    flex-direction: column;
}
.module-name {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: var(--space-xs);
    font-size: 1.15rem;
}
.module-name .check-mark {
    color: var(--success-color);
    margin-left: 8px;
    font-size: 1.2em;
    font-weight: 900;
}
.module-desc {
    font-size: 0.95rem;
    color: var(--gray);
    line-height: 1.6;
}
.card-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--gray-light);
    background: var(--light-color);
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}
.card-footer .module-more {
    font-size: 0.95rem;
    opacity: 0.8;
}


/* Recent Reports */
.recent-reports-section {
    padding: var(--space-xl) 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef1f5 100%);
    border-radius: var(--border-radius);
}
.recent-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}
.recent-item {
    display: flex;
    align-items: center;
    background: var(--white);
    padding: var(--space-md);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    color: inherit;
    border-right: 4px solid var(--primary-color);
}
.recent-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    color: inherit;
}
.recent-score {
    margin-left: var(--space-md);
}
.recent-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.recent-url {
    font-weight: 600;
    margin-bottom: 5px;
    direction: ltr;
    text-align: left;
    font-family: 'IRANSans', monospace; /* Changed font */
    font-size: 1rem;
    color: var(--primary-dark);
}
.recent-date {
    font-size: 0.9rem;
    color: var(--gray);
}
.recent-action {
    color: var(--info-color); /* Changed to info for view */
    font-weight: 700;
    transition: var(--transition);
}
.recent-item:hover .recent-action {
    transform: translateX(-8px);
    color: var(--primary-dark);
}

/* SEO Content Section */
.seo-content-section {
    padding: var(--space-xl) 0;
    background: var(--bg-main);
}
.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: var(--space-xl); /* More padding */
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--gray-light);
}
.content-wrapper p {
    line-height: 1.9;
    color: var(--gray-dark);
    margin-bottom: var(--space-md);
    font-size: 1.05rem;
}

/* --- Auth Views (Login/Register) - No major visual change, only clean up --- */
.auth-container {
    max-width: 480px; /* Slightly wider */
    margin: var(--space-xl) auto;
    background: var(--white);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-light);
}
.title-auth {
    text-align: center;
    color: var(--primary-dark);
    margin-bottom: var(--space-sm);
    font-size: 2.2rem;
    font-weight: 800;
}
.auth-message {
    text-align: center;
    color: var(--gray);
    margin-bottom: var(--space-lg);
    font-size: 1.1rem;
}
.auth-form .form-group {
    margin-bottom: var(--space-md);
}
.auth-form label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 700;
    font-size: 1rem;
    color: var(--dark-color);
}
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    box-sizing: border-box;
    transition: var(--transition);
    font-family: inherit;
    font-size: 1.05rem;
}
.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2);
}
.auth-link {
    text-align: center;
    margin-top: var(--space-md);
    font-size: 1em;
}

/* --- 7. Report View (Header) --- */
.report-header {
    background: linear-gradient(135deg, #1f272e, #343a40); /* Darker, more serious gradient */
    color: white;
    padding: var(--space-xl) 0;
    margin-bottom: var(--space-lg);
    border-radius: var(--border-radius);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}
.score-box {
    text-align: center;
    padding: var(--space-md) 0;
}
.score-box h3 {
    font-size: 1.6rem;
    margin-bottom: var(--space-md);
    color: #c9d6e4;
    font-weight: 600;
}
.final-score {
    font-size: 5rem; /* Even bigger score */
    font-weight: 900;
    display: inline-block;
    padding: 25px 50px;
    border-radius: var(--border-radius);
    transition: background-color 0.5s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    min-width: 180px;
}
.score-80-100 { 
    background: linear-gradient(135deg, var(--success-color), #207e3e); 
    color: var(--white); 
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}
.score-50-79 { 
    background: linear-gradient(135deg, var(--warning-color), #e0a800); 
    color: var(--dark-color); 
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.2);
}
.score-0-49 { 
    background: linear-gradient(135deg, var(--danger-color), #c82333); 
    color: var(--white); 
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.report-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Wider columns */
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.info-item {
    font-size: 1.1rem;
    color: #e0e0e0;
    padding: var(--space-sm);
    border-right: 3px solid var(--primary-light); /* Thicker border */
}
.info-item span {
    display: block;
    font-weight: 800;
    font-size: 1.3em;
    margin-top: var(--space-xs);
    color: var(--white);
}

/* --- 8. Analysis Section (Report Details) --- */
.analysis-section {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: var(--space-xl); /* More padding */
    margin-bottom: var(--space-lg);
    border: 1px solid var(--gray-light);
}
.analysis-section h3 {
    border-bottom: 3px solid var(--gray-light);
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-xl); /* More space */
    color: var(--primary-dark);
    font-size: 2rem;
    font-weight: 800;
    position: relative;
}
.analysis-section h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); /* Wider columns */
    gap: var(--space-lg);
}

.result-item {
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    padding: var(--space-lg);
    transition: var(--transition);
    background: var(--light-color); 
    display: flex;
    flex-direction: column;
}
.result-item:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
    background: var(--white);
    border-color: var(--primary-color);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}
.item-header h4 {
    font-size: 1.25rem; /* Larger title */
    margin: 0;
    color: var(--dark-color);
    flex: 1;
    font-weight: 700;
    padding-left: var(--space-sm);
}

/* Status Badges */
.status-badge {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
    white-space: nowrap;
    min-width: 90px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.bg-success { background: linear-gradient(90deg, var(--success-color), #207e3e); }
.bg-warning { background: linear-gradient(90deg, #feca57, var(--warning-color)); color: var(--dark-color); }
.bg-error { background: linear-gradient(90deg, var(--danger-color), #c82333); }
.bg-info { background: linear-gradient(90deg, var(--info-color), #138496); }
.bg-locked { 
    background: linear-gradient(90deg, #99a2ad, var(--secondary-color)); /* Finer grey for locked */
    color: white;
    animation: pulse-locked 1.5s infinite; 
} 
@keyframes pulse-locked {
    0% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.03); opacity: 1; }
    100% { transform: scale(1); opacity: 0.85; }
}

.message {
    font-size: 1rem;
    color: var(--gray-dark);
    margin: 0;
    min-height: 50px; 
    line-height: 1.7;
    flex-grow: 1;
}

.value {
    display: block;
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px dashed var(--gray-light);
    font-size: 0.85rem;
    color: var(--gray);
    font-family: 'IRANSans', monospace;
}

/* --- 9. History View --- */
.title-history {
    color: var(--dark-color);
    margin-bottom: var(--space-lg);
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 15px;
    font-weight: 800;
}
.title-history::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 150px;
    height: 6px;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    border-radius: 3px;
}
.history-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    overflow: hidden;
}
.history-table th, .history-table td {
    padding: 20px 30px; /* More padding */
    text-align: right;
    border-bottom: 1px solid var(--gray-light);
}
.history-table th {
    background: linear-gradient(135deg, var(--light-color), #f1f3f5);
    font-weight: 800;
    color: var(--gray-dark);
    font-size: 1rem;
    text-transform: capitalize; /* Better for Persian */
    letter-spacing: normal;
}
.history-table tbody tr {
    transition: background-color 0.3s ease;
}
.history-table tbody tr:hover {
    background-color: #f7f9fb;
}
.history-table tr:last-child td {
    border-bottom: none;
}
.url-cell {
    max-width: 450px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'IRANSans', monospace;
    direction: ltr;
    text-align: left; 
    font-size: 1rem;
    color: var(--primary-dark);
}
.score-badge {
    padding: 10px 18px; /* Larger badge */
    border-radius: 30px;
    font-weight: 800;
    color: white;
    display: inline-block;
    min-width: 70px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.score-success { background: linear-gradient(135deg, var(--success-color), #1e7e34); }
.score-warning { background: linear-gradient(135deg, var(--warning-color), #e0a800); color: var(--dark-color); }
.score-error { background: linear-gradient(135deg, var(--danger-color), #c82333); }
.btn-view {
    background: linear-gradient(135deg, var(--info-color), #138496);
    color: white;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 600;
}
.btn-view:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(23, 162, 184, 0.4);
    color: white;
}

/* --- 10. Utility & Message Boxes --- */
.error-box, .message-box, .info-box {
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-md);
    border-radius: var(--border-radius-sm);
    text-align: right; 
    font-weight: 600;
    border-right: 8px solid; /* Thicker border */
    border-left: none;
    font-size: 1.05rem;
}
.error-box {
    background-color: #fddde0; 
    color: #721c24;
    border-color: var(--danger-color);
}
.info-box {
    background-color: #e2f7fa;
    color: #0c5460;
    border-color: var(--info-color);
}
.message-box {
    background-color: #e4fce9;
    color: #155724;
    border-color: var(--success-color);
}
.message-box p, .info-box p, .error-box p {
    margin-bottom: var(--space-sm);
    line-height: 1.7;
}

/* --- 11. Footer --- */
footer {
    text-align: center;
    padding: var(--space-lg) 0;
    background: var(--dark-color);
    color: #b0b7c3;
    font-size: 0.95rem;
    margin-top: var(--space-xl);
    border-top: 5px solid var(--primary-color);
}
footer a {
    color: #f1f3f5;
    font-weight: 600;
}
footer a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* --- 12. Responsive Design --- */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3.5rem;
    }
}
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    .module-groups {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    .hero-title {
        font-size: 3rem;
    }
    .hero-title .sub-title {
        font-size: 1.5rem;
    }
}
@media (max-width: 768px) {
    /* Header */
    .nav-bar {
        flex-direction: column;
        align-items: center;
    }
    header .logo {
        margin-bottom: var(--space-md);
    }
    header nav {
        margin-top: var(--space-sm);
        justify-content: center;
    }
    header nav a {
        margin-right: var(--space-md);
        font-size: 0.95rem;
    }

    /* Hero */
    .hero-section {
        padding: 80px 0 60px;
        margin-bottom: var(--space-lg);
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .hero-title .sub-title {
        font-size: 1.3rem;
    }
    .hero-description {
        font-size: 1.2rem;
    }
    .search-container {
        flex-direction: column;
        max-width: 100%;
        border-radius: var(--border-radius);
    }
    .search-input {
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    .search-btn {
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        padding: 18px 28px;
    }
    .hero-stats {
        gap: var(--space-lg);
        flex-wrap: wrap;
    }
    .stat-number {
        font-size: 2.6rem;
    }

    /* Sections */
    .module-showcase-section {
        margin-top: -30px;
    }
    .section-title {
        font-size: 2.2rem;
    }
    .module-groups {
        grid-template-columns: 1fr;
    }
    .recent-list {
        grid-template-columns: 1fr;
    }
    .results-grid {
        grid-template-columns: 1fr;
    }
    .report-info-grid {
        grid-template-columns: 1fr;
    }
    .history-table {
        display: block;
        overflow-x: auto;
    }
    .history-table th, .history-table td {
        padding: 15px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    .url-cell {
        max-width: 250px;
    }
    .auth-container {
        margin: var(--space-lg) auto;
        padding: var(--space-lg);
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    .hero-section {
        padding: 50px 0 30px;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-title .sub-title {
        font-size: 1.1rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .card-header {
        padding: var(--space-md);
    }
    .module-list li {
        padding: 10px var(--space-md);
    }
    .stat-number {
        font-size: 2rem;
    }
    header nav a {
        margin-right: var(--space-sm);
        font-size: 0.85rem;
    }
}