@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

:root {
    --bg-color: #0f172a;
    --container-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --gradient: linear-gradient(135deg, #0ea5e9, #6366f1);
    --input-bg: #0f172a;
    --border-color: #334155;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Cairo', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-bottom: 20px;
}

/* رأس الموقع (Header) */
.site-header {
    width: 100%;
    background-color: var(--container-bg);
    padding: 15px 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 1200px;
}

.logo-container i {
    font-size: 32px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-container h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    letter-spacing: 0.5px;
}

/* الإعلانات */
.ad-space {
    background-color: rgba(30, 41, 59, 0.7);
    border: 1px dashed var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    transition: 0.3s;
}

.ad-space:hover {
    border-color: var(--text-muted);
    background-color: rgba(30, 41, 59, 0.9);
}

.top-ad, .bottom-ad {
    width: 100%;
    max-width: 970px;
    height: 90px;
    margin: 20px 0;
}

/* الفوتر (Footer) */
.site-footer {
    width: 100%;
    text-align: center;
    padding: 25px 0;
    margin-top: auto;
    color: var(--text-muted);
    font-size: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: var(--container-bg);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

/* قسم مقال السيو */
.seo-content {
    margin-top: 0;
    text-align: right;
    line-height: 1.8;
}

.seo-content h2, .seo-content h3 {
    color: var(--accent);
    margin-bottom: 15px;
    margin-top: 25px;
}

.seo-content p, .seo-content ul {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 15px;
}

.seo-content ul {
    padding-right: 20px;
}

.seo-content li {
    margin-bottom: 8px;
}

.main-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 25px;
    width: 100%;
    max-width: 1200px;
}

.side-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
    flex-shrink: 0;
}

.center-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

.square-ad {
    width: 250px;
    height: 250px;
}

.center-ad {
    width: 100%;
    height: 250px;
}

.side-ad {
    width: 250px;
    height: 600px;
}

/* الحاوية الرئيسية */
.container {
    background-color: var(--container-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 35px 30px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

h1 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

/* مربع النتيجة */
.result-container {
    background-color: var(--input-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    transition: border-color 0.3s;
    min-height: 70px;
}

.result-container:focus-within {
    border-color: var(--accent);
}

.result-container textarea {
    background-color: transparent;
    border: none;
    font-size: 18px;
    width: 100%;
    outline: none;
    color: var(--text-main);
    direction: ltr;
    text-align: left;
    font-family: monospace;
    letter-spacing: 1.5px;
    resize: none;
    word-break: break-all;
    line-height: 1.4;
    padding: 5px;
}

.result-container textarea::placeholder {
    color: var(--text-muted);
    font-family: 'Cairo', sans-serif;
    letter-spacing: 0;
    font-size: 16px;
}

.result-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-right: 10px;
}

.result-btns .btn {
    margin-right: 0;
}
.btn {
    border: none;
    background: var(--gradient);
    color: white;
    font-size: 16px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-right: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(14, 165, 233, 0.5);
}

.btn:active {
    transform: translateY(0);
}

.btn-large {
    display: block;
    width: 100%;
    font-size: 18px;
    padding: 14px;
    margin-top: 25px;
    font-weight: 700;
    border-radius: 12px;
    height: auto;
}

/* الإعدادات */
.settings {
    margin-bottom: 25px;
}

.setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0;
    font-weight: 600;
}

/* شريط التمرير (Slider) */
input[type="range"] {
    -webkit-appearance: none;
    width: 55%;
    height: 8px;
    background: var(--border-color);
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0ea5e9;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
    transition: 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* أزرار التبديل (Checkboxes as Toggles) */
input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 46px;
    height: 24px;
    background: var(--border-color);
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: 0.3s;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    top: 3px;
    left: 4px;
    background: var(--text-muted);
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

input[type="checkbox"]:checked {
    background: var(--accent);
}

input[type="checkbox"]:checked::before {
    left: 24px;
    background: white;
}

/* قسم القوة */
.strength-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.strength-section p {
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 15px;
}

.strength-bar-container {
    width: 100%;
    height: 12px;
    background-color: var(--input-bg);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s ease;
    background-color: #e74c3c;
    border-radius: 10px;
}

.encryption-rate {
    font-size: 14px !important;
    color: var(--text-muted) !important;
    text-align: center;
    display: block !important;
    font-weight: 600 !important;
}

/* التجاوب مع الشاشات */
@media (max-width: 1050px) {
    .side-column {
        display: none;
    }
}

@media (max-width: 480px) {
    .center-column {
        max-width: 100%;
    }
    .container {
        width: 100%;
        border-radius: 0;
        box-shadow: none;
        border: none;
        padding: 25px 20px;
    }
    .main-wrapper {
        margin: 0;
    }
    input[type="range"] {
        width: 45%;
    }
}
