.codebank-container {
    max-width: 1200px;
    /* اعمال فاصله قطعی از هدر */
    margin: 150px auto 50px auto !important; 
    padding: 0 20px;
    min-height: 60vh;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    position: relative;
    z-index: 10;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.code-card {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.code-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: #3b82f6;
}

.preview-area {
    aspect-ratio: 16 / 9;
    width: 100%;
    background: #ffffff;
    position: relative;
    border-bottom: 1px solid #334155;
    overflow: hidden;
}

.preview-area iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-body h3 {
    margin: 0 0 10px 0;
    color: #f8fafc;
    font-size: 20px;
    font-weight: bold;
}

.card-body p {
    margin: 0 0 25px 0;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    flex-grow: 1;
}

.view-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #3b82f6;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 15px;
    transition: background-color 0.3s ease;
}

.view-btn:hover {
    background-color: #2563eb;
}
