/* ---- General ---- */
.as-form-wrap, .as-list, .as-single {
    max-width: 960px;
    margin: 0 auto 2rem;
    font-family: inherit;
}
.as-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: .75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.as-notice {
    color: #856404;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    padding: .5rem 1rem;
    border-radius: 4px;
}

/* ---- Form ---- */
.as-form label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
}
.as-form input[type="number"],
.as-form textarea {
    display: block;
    width: 100%;
    padding: .5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: .25rem;
    font-size: 1rem;
}

/* ---- Buttons ---- */
.as-btn {
    display: inline-block;
    padding: .5rem 1.2rem;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: .95rem;
}
.as-btn:hover { background: #c0392b; color: #fff; }
.as-btn-back {
    display: inline-block;
    margin-bottom: 1rem;
    color: #555;
    text-decoration: none;
}
.as-vote-btn { background: #27ae60; }
.as-vote-btn:hover { background: #1e8449; }

/* ---- Cards ---- */
.as-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}
.as-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: var(--theme-color-200);
    box-shadow: 0 2px 4px rgba(0,0,0,.07);
    transition: transform .2s;
}
.as-card:hover { transform: translateY(-3px); }
.as-card img { width: 100%; display: block; }
.as-card-body { padding: .75rem; }
.as-card-body h3 { margin: 0 0 .5rem; color: var(--theme-color-700); font-size: .95rem; }
.as-card-body h3 a { text-decoration: none; color: #333; }
.as-votes { margin: 0; color: var(--theme-color-500); font-weight: 700; }

/* ---- Single ---- */
.as-single-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.as-poster {
    width: auto;
    border-radius: 6px;
    flex-shrink: 0;
}
.as-single-info { flex: 1;background-color: var(--theme-color-200);
    color: var(--theme-color-600);
    padding: 10px;
    border-radius: 10px; }
.as-single-info h1 { margin-top: 0; }
.as-en-title { color: #777; margin-top: -.5rem; font-style: italic; }
.as-meta-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.as-meta-table th, .as-meta-table td {
    padding: .4rem .6rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: .9rem;
}
.as-meta-table th { width: 35%; color: #555; font-weight: 600; }
.as-synopsis { margin-bottom: 2rem; }
.as-suggestion-meta { background: var(--theme-color-200);color:var(--theme-color-700); padding: 1rem 1.5rem; border-radius: 6px; border: 1px solid #eee; }

/* ---- Widget ---- */
.as-widget-list { list-style: none; padding: 0; margin: 0; }
.as-widget-list li { padding: .35rem 0; border-bottom: 1px solid #eee; font-size: .9rem; }
.as-widget-list li a { text-decoration: none; color: #333; }
.as-widget-list li a:hover { color: #e74c3c; }






/* =========================================================
   WIDGET — General
   ========================================================= */
.as-widget-empty {
    color: #999;
    font-style: italic;
    font-size: .85rem;
}

/* =========================================================
   WIDGET 1 — Latest Suggested
   ========================================================= */
.as-w-suggested-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.as-w-sug-card {
    display: flex;
    gap: .75rem;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    background: var(--theme-color-200);
    padding: .5rem;
    align-items: flex-start;
}
.as-w-sug-poster {
    flex-shrink: 0;
    width: 70px;
}
.as-w-sug-poster img {
    width: 70px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}
.as-w-sug-info {
    flex: 1;
    min-width: 0;
}
.as-w-sug-title {
    margin: 0 0 .4rem;
    font-size: .9rem;
    line-height: 1.3;
}
.as-w-sug-title a {
    text-decoration: none;
    color: #222;
}
.as-w-sug-title a:hover {
    color: #e74c3c;
}
.as-w-sug-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 .4rem;
    display: flex;
    flex-wrap: wrap;
    gap: .2rem .6rem;
}
.as-w-sug-meta li {
    font-size: .75rem;
    color: #555;
    border: none;
    padding: 0;
}
.as-w-sug-meta li span {
    font-weight: 600;
    color: #333;
}
.as-w-sug-synopsis {
    font-size: .75rem;
    color: #666;
    margin: 0 0 .5rem;
    line-height: 1.4;
}
.as-w-btn {
    display: inline-block;
    padding: .25rem .7rem;
    background: #e74c3c;
    color: #fff !important;
    border-radius: 4px;
    font-size: .75rem;
    text-decoration: none;
    transition: background .2s;
}
.as-w-btn:hover {
    background: #c0392b;
}

/* =========================================================
   WIDGET 2 — Latest Voted
   ========================================================= */
.as-w-voted-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .85rem;
}
.as-w-voted-item {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid #f0f0f0;
}
.as-w-voted-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.as-w-voted-who {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    background-color: var(--theme-color-300);
    border-top-right-radius: 10px;
}
.as-w-avatar {
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0;
}
.as-w-voted-username {
    font-weight: 700;
    font-size: .85rem;
    color: #222;
}
.as-w-voted-label {
    font-size: .8rem;
    color: #888;
}
.as-w-voted-anime {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: var(--theme-color-200);
    border-radius: 5px;
    padding: .4rem .5rem;
}
.as-w-voted-poster img {
    width: 40px;
    height: 56px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
    flex-shrink: 0;
}
.as-w-voted-anime-info {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.as-w-voted-anime-info strong {
    font-size: .85rem;
    color: #222;
    line-height: 1.3;
}
.as-w-voted-anime-info strong a {
    text-decoration: none;
    color: #222;
}
.as-w-voted-anime-info strong a:hover {
    color: #e74c3c;
}
.as-w-voted-total {
    font-size: .78rem;
    color: #e74c3c;
    font-weight: 600;
}

/* =========================================================
   WIDGET 3 — Top Suggestions Grid
   ========================================================= */
.as-w-top-grid {
    display: grid;
    grid-template-columns: repeat( 5, 1fr );
    gap: .5rem;
}
.as-w-top-item {
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    background: #111;
    aspect-ratio: 2/3;
}
.as-w-top-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: .85;
    transition: opacity .2s;
}
.as-w-top-item:hover img {
    opacity: .5;
}
.as-w-top-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}
.as-w-top-rank {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0,0,0,.7);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    z-index: 2;
}
.as-w-top-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.85));
    padding: .5rem .3rem .3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
}
.as-w-top-title {
    color: #fff;
    font-size: .62rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.as-w-top-votes {
    color: #f1c40f;
    font-size: .65rem;
    font-weight: 700;
}

/* Responsive — collapse top grid on narrow sidebars */
@media ( max-width: 300px ) {
    .as-w-top-grid {
        grid-template-columns: repeat( 3, 1fr );
    }
}