/* ================================
   Auth + Dashboard Styles (scoped)
   ================================ */

.im-form-wrapper {
    max-width: 450px;
    margin: 40px auto;
    padding: 25px 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    font-family: 'Segoe UI', sans-serif;
    transition: all 0.3s ease;
}

.im-form-wrapper h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.im-form-wrapper input[type="text"],
.im-form-wrapper input[type="email"],
.im-form-wrapper input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    margin: 10px 0 18px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border 0.2s ease;
}

.im-form-wrapper input:focus {
    border-color: #007bff;
    outline: none;
}

.im-form-wrapper button {
    width: 100%;
    padding: 12px;
    background: #007bff;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.im-form-wrapper button:hover {
    background-color: #0056b3;
}

.im-form-wrapper p.error {
    color: #dc3545;
    font-size: 14px;
    margin-bottom: 10px;
}

.im-form-wrapper p.success {
    color: #28a745;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Dashboard */
.im-dashboard {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background: #fefefe;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.im-dashboard h3 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

.im-dashboard .im-status {
    font-weight: bold;
    color: #28a745;
    font-size: 16px;
    margin-bottom: 20px;
}

.im-dashboard .im-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 18px;
    background: #007bff;
    color: white;
    font-weight: 500;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.im-dashboard .im-btn.cancel {
    background-color: #dc3545;
}

.im-dashboard .im-btn:hover {
    opacity: 0.9;
}
.im-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* === FIXED CARD LAYOUT === */

.illustration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); /* 👈 min-width of each card */
    gap: 20px;
    margin-top: 20px;
}

.im-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.im-card:hover {
    transform: translateY(-5px);
}

.im-card-header {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.im-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.im-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff9800;
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
    font-weight: 600;
}

.im-card-body {
    padding: 15px;
}

.im-card-body h4 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #222;
}

.im-tags {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.im-meta {
    font-size: 14px;
    margin-bottom: 8px;
    color: #444;
}

.rating-stars {
    margin-bottom: 8px;
}

.rating-stars .star {
    font-size: 18px;
    cursor: pointer;
    color: #ccc;
    margin-right: 4px;
}

.rating-stars .star:hover,
.rating-stars .star:hover ~ .star {
    color: #f90;
}

.im-download-btn {
    background-color: #0073aa;
    color: #fff;
    padding: 8px 12px;
    display: inline-block;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s;
}

.im-download-btn:hover {
    background-color: #005f8d;
}
.illustration-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
    box-shadow: none;
    transition: transform 0.2s ease;
}

.illustration-card img {
    width: 100%;
    height: 250px; /* 👈 adjust this for image height */
    object-fit: cover;
    display: block;
}


.illustration-card-header {
    position: relative;
}

.im-rating-stars {
    position: absolute;
    top: 8px;
    left: 10px;
    background: rgba(255,255,255,0.85);
    font-size: 13px;
    padding: 3px 7px;
    border-radius: 6px;
    z-index: 2;
    font-weight: bold;
}

.im-download-button {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 18px;            /* larger icon/text */
    padding: 10px 12px;         /* increase size */
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    z-index: 2;
}


.im-download-button:hover {
    background: #007BFF;
    color: white;
}

.im-download-count {
    position: absolute;
    top: 46px;                /* adjust based on your layout */
    right: 14px;
    background-color: #2196f3;  /* or your preferred blue */
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px;
    min-width: 24px;
    min-height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.im-keywords {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.5);
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.im-keywords .tag {
    background: #ffffffcc;
    color: #333;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

#illustration-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px; /* spacing above pagination */
    gap: 5px;
    flex-wrap: wrap;
}

#illustration-pagination button {
    background-color: #0073aa;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

#illustration-pagination button.active {
    background-color: #005177;
}

#illustration-pagination button:hover {
    background-color: #005177;
}

.im-rating-stars {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    gap: 2px;
    font-size: 16px;
}

.im-rating-stars .star {
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s;
}

.im-rating-stars .star.rated {
    color: #fbc02d; /* yellow stars */
}

.im-rating-stars .star:hover,
.im-rating-stars .star:hover ~ .star {
    color: #fbc02d;
}

#illustration-search {
    border-radius: 12px; /* 👈 Change this value as needed */
    padding: 10px 14px;
    border: 1px solid #ccc;
    font-size: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

