/* ================= Tool Container ================= */
.hash-tool-container {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 80px;
}

/* ================= Header ================= */
.hash-header {
    text-align: center;
    margin-bottom: 30px;
}

.hash-header h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.hash-header p {
    color: var(--footer-text);
    font-size: 0.95rem;
}

/* ================= Workspace (Vertical Stack) ================= */
.hash-workspace {
    display: flex;
    flex-direction: column;
    /* تحويل الترتيب ليكون تحت بعضه */
    gap: 25px;
}

/* ================= Input Section (Thin Rectangle) ================= */
.hash-input-section {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.hash-input-section label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.hash-input-section textarea {
    width: 100%;
    min-height: 120px;
    /* مستطيل نحيف ومناسب */
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--nav-bg);
    color: var(--text-color);
    font-size: 16px;
    /* يمنع زووم الآيفون */
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: monospace;
}

.hash-input-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

/* ================= Output Section (Sleek & Stacked) ================= */
.hash-output-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* مسافة أصغر بين المربعات لتبدو كمجموعة واحدة */
}

.hash-result-card {
    background-color: var(--nav-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 15px;
    /* تقليل الحشوة لتصبح المربعات أنحف */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hash-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hash-algo-name {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
    /* تصغير الخط قليلاً */
}

.copy-btn {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
    font-weight: 500;
}

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

.hash-result-input {
    width: 100%;
    padding: 8px 10px;
    /* تصغير حشوة حقل الإخراج */
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    outline: none;
}

/* ================= Mobile Adjustments ================= */
@media (max-width: 768px) {
    .hash-input-section textarea {
        min-height: 100px;
    }
}