/* password-security.css - استایل آموزش امنیت رمز عبور */
.password-security-page {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.security-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 1200px) {
    .security-grid {
        grid-template-columns: 1fr;
    }
}

/* کارت تست رمز */
.password-test-container {
    padding: 15px 0;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input {
    flex: 1;
    padding: 12px 50px 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    direction: ltr;
    text-align: left;
}

.password-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.toggle-password-btn {
    position: absolute;
    left: 10px;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

.toggle-password-btn:hover {
    color: #495057;
}

/* نمایش قدرت رمز */
.strength-meter-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
}

.strength-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.strength-text {
    font-weight: bold;
    font-size: 1.1em;
}

.strength-meter {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin: 15px 0;
}

.strength-fill {
    height: 100%;
    border-radius: 5px;
    transition: all 0.5s ease;
}

.strength-indicators {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.strength-indicators .indicator {
    font-size: 12px;
    color: #6c757d;
    position: relative;
    flex: 1;
    text-align: center;
}

.strength-indicators .indicator::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 auto 5px;
}

.strength-indicators .weak::before {
    background: #dc3545;
}

.strength-indicators .medium::before {
    background: #ffc107;
}

.strength-indicators .strong::before {
    background: #28a745;
}

.strength-indicators .very-strong::before {
    background: #198754;
}

/* تحلیل رمز */
.analysis-details {
    margin: 25px 0;
}

.analysis-details h4 {
    margin-bottom: 15px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 10px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.analysis-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #dee2e6;
}

.analysis-item i {
    font-size: 18px;
    min-width: 20px;
}

/* زمان شکستن رمز */
.crack-time-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    margin-top: 25px;
    text-align: center;
}

.crack-time-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.crack-time-header h4 {
    margin: 0;
    color: white;
}

.crack-time-value {
    font-size: 28px;
    font-weight: bold;
    margin: 10px 0;
}

.crack-time-note {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
}

/* راهنماها */
.guidelines-container {
    padding: 15px 0;
}

.guideline-section {
    margin-bottom: 30px;
}

.guideline-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.guideline-title.do {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.guideline-title.dont {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.guideline-list {
    padding-right: 10px;
}

.guideline-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.guideline-item:last-child {
    border-bottom: none;
}

.guideline-item i {
    min-width: 20px;
}

.guideline-item.do i {
    color: #28a745;
}

.guideline-item.dont i {
    color: #dc3545;
}

/* تولید رمز */
.password-generator {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

.password-generator h4 {
    margin-bottom: 20px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 10px;
}

.generator-controls {
    margin-bottom: 20px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.control-group label {
    font-weight: 600;
}

.length-slider {
    flex: 1;
    max-width: 200px;
}

#length-value {
    font-weight: bold;
    min-width: 30px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.generate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.generated-password-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.generated-password {
    flex: 1;
    padding: 15px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-family: monospace;
    font-size: 16px;
    word-break: break-all;
    direction: ltr;
    text-align: left;
    min-height: 60px;
    display: flex;
    align-items: center;
    padding-left: 20px;
}

.copy-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    justify-content: center;
}

.copy-btn:hover {
    background: #545b62;
}

/* مثال‌ها */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .examples-grid {
        grid-template-columns: 1fr;
    }
}

.example-section {
    padding: 20px 0;
}

.example-section h4 {
    margin-bottom: 20px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 10px;
}

.techniques-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.technique-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.technique-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.technique-item h5 {
    color: #667eea;
    margin-bottom: 10px;
}

.technique-item p {
    color: #6c757d;
    margin-bottom: 10px;
}

.example-password {
    font-family: monospace;
    font-size: 16px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
    direction: ltr;
    text-align: center;
    border: 1px dashed #dee2e6;
}

/* نمونه رمزها */
.sample-passwords {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.sample-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.sample-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.sample-item.strong {
    border-left-color: #28a745;
}

.sample-item.very-strong {
    border-left-color: #198754;
}

.sample-item.medium {
    border-left-color: #ffc107;
}

.sample-password {
    font-family: monospace;
    font-size: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    direction: ltr;
    text-align: center;
}

.sample-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #6c757d;
}

.strength-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* نکات امنیتی */
.security-tips {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    padding: 20px;
}

.security-tips h5 {
    color: #856404;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-tips ul {
    margin: 0;
    padding-right: 20px;
}

.security-tips li {
    margin-bottom: 10px;
    color: #856404;
}

.security-tips li:last-child {
    margin-bottom: 0;
}