/* ===== Tabbed Ad Display ===== */

.tad-container {
    max-width: 640px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
    background: #e0f4fb;
    border: 2px solid #a8ddf0;
    border-radius: 14px;
    padding: 12px;
    box-sizing: border-box;
}

/* ===== Tab Navigation ===== */
.tad-nav {
    display: flex;
    list-style: none;
    padding: 0 !important;
    margin: 0 0 12px 0;
    gap: 6px;
}

.tad-tab {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    cursor: pointer;
    border-radius: 8px;
    font-weight: bold;
    font-size: 15px;
    transition: background 0.2s, color 0.2s;
    background: #c8c8c8;
    color: #888;
    user-select: none;
}

.tad-tab.active {
    background: #3ab2e8;
    color: #fff;
}

.tad-tab:hover:not(.active) {
    background: #b8b8b8;
}

/* ===== Content Wrapper ===== */
.tad-content-wrapper {
    background: transparent;
}

.tad-tab-content {
    display: none;
}

.tad-tab-content.active {
    display: block;
    animation: tadFadeIn 0.3s ease;
}

@keyframes tadFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Ad Card ===== */
.tad-ad-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.tad-ad-card:last-child {
    margin-bottom: 0;
}

.tad-ad-main {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

/* ===== Left Column (Icon + Tags) ===== */
.tad-ad-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 78px;
}

.tad-ad-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 8px;
}

.tad-ad-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tad-ad-tags {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}

.tad-tag {
    display: block;
    text-align: center;
    padding: 4px 0;
    border-radius: 20px;
    font-size: 10px;
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
}

/* ===== Right Column ===== */
.tad-ad-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Title + Rating row */
.tad-ad-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.tad-ad-title {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.2;
}

.tad-rating-wrap {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.tad-rating-label {
    background: #3ab2e8;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 5px;
    white-space: nowrap;
}

.tad-stars {
    display: flex;
    align-items: center;
}

/* Star rendering */
.tad-star {
    font-size: 15px;
    color: #ddd;
    display: inline-block;
    position: relative;
    line-height: 1;
}

.tad-star.star-full {
    color: #ffb400;
}

.tad-star.star-half {
    color: #ddd;
}

.tad-star.star-half::before {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    width: 55%;
    overflow: hidden;
    color: #ffb400;
    display: block;
}

.tad-rating-value {
    font-size: 12px;
    color: #777;
    white-space: nowrap;
}

/* ===== Points List ===== */
.tad-points {
    list-style: disc;
    padding-left: 18px;
    margin: 0;
}

.tad-points li {
    font-size: 13px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 2px;
}

/* ===== Download Button ===== */
.tad-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #fff !important;
    padding: 10px 3px;
    background: linear-gradient(135deg, #ff4d7e, #ff3366);
    font-weight: bold;
    border-radius: 50px;
    box-shadow: 0 3px 10px rgba(255, 70, 100, 0.4);
    transition: opacity 0.2s;
    text-decoration: none !important;
}

.tad-download-btn:hover {
    opacity: 0.88;
}

.tad-download-btn::after {
    content: '→';
    position: absolute;
    right: 12px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 28px;
    text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .tad-container {
        padding: 8px;
        border-radius: 10px;
    }

    .tad-tab {
        font-size: 13px;
        padding: 9px 4px;
    }

    .tad-ad-left {
        width: 64px;
    }
}