/* Custom CSS */
:root {
    --primary-accent: #510778;
    --navbar-border-top: #3a0556;
    --button-border: #3a0556;
    --link-focus: #3a0556;
    --form-shadow: rgba(81, 7, 120, 0.6);
    --pagination-bg: #7a2b9e;
    --link-hover-bg: #3a0556;
    --navbar-focus: #7a2b9e;
}

/* Additional overrides if necessary */
.text-primary {
    color: var(--primary-accent) !important;
}

.bg-primary {
    background-color: var(--primary-accent) !important;
}

#top {
    background: var(--primary-accent);
    color: #fff;
}

#footer {
    background: var(--primary-accent);
    color: #fff;
}

#copyright {
    background: #34044D;
    color: #fff;
}

/* Heading text balance */
h2 small {
    font-size: 0.5em;
    font-weight: normal;
    color: #999;
    margin-left: 10px;
}

#top-main p {
    font-size: 21pt;
}

#heading-breadcrumbs {
    background: #510778 !important;
}

#heading-breadcrumbs h1 {
    color: #fff !important;
}

/* Member Profile Layout */
.member-image-container {
    border: 1px solid #ddd;
    padding: 5px;
    background: #fff;
    margin-bottom: 20px;
}

.img-member-main,
.img-member-sub,
.img-member-banner {
    width: 100%;
    height: auto;
    display: block;
}

.district-label {
    background-color: var(--primary-accent);
    color: #fff;
    display: inline-block;
    padding: 5px 15px;
    font-weight: bold;
    margin-bottom: 15px;
}

.profile-name {
    font-size: 2.5em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 10px;
}

.profile-kana {
    display: block;
    font-size: 0.5em;
    font-weight: normal;
    color: #666;
    margin-top: 5px;
}

.profile-divider {
    border-top: 1px solid #ccc;
    margin: 20px 0;
}

.profile-divider-thick {
    border-top: 3px solid var(--primary-accent);
    margin: 30px 0;
}

.profile-details {
    font-size: 1.1em;
}

.profile-row {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
}

.profile-label {
    font-weight: bold;
    width: 120px;
    flex-shrink: 0;
}

.profile-value {
    flex-grow: 1;
}

/* SNS Grid */
.sns-section {
    margin-top: 20px;
}

.sns-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.sns-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-accent);
    color: #fff !important;
    padding: 10px;
    border-radius: 5px;
    text-decoration: none !important;
    font-weight: bold;
    transition: background-color 0.3s;
}

.sns-btn:hover {
    background-color: #3a0556;
}

.sns-btn.disabled {
    background-color: #ddd;
    color: #999 !important;
    pointer-events: none;
}

.sns-btn i {
    margin-right: 8px;
}

.sns-icon-img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

.donate-btn {
    background-color: #20b2aa;
    border-color: #20b2aa;
    color: #fff !important;
    width: 100%;
    font-weight: bold;
}

.donate-btn:hover {
    background-color: #178580;
    border-color: #178580;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

@media (max-width: 768px) {
    .sns-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-row {
        display: block;
    }

    .profile-label {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* YouTube Grid */
.youtube-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.youtube-card {
    display: block;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none !important;
    color: #333;
    height: 100%;
}

.youtube-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.youtube-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #000;
}

.youtube-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 3rem;
    transition: color 0.3s;
}

.youtube-card:hover .play-icon {
    color: #ff0000;
}

.youtube-info {
    padding: 15px;
}

.youtube-title {
    font-size: 14px;
    font-weight: bold;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #333;
}

@media (max-width: 992px) {
    .youtube-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .youtube-grid {
        grid-template-columns: 1fr;
    }
}

/* Suspended Member Style */
.suspended-member {
    background-color: #f9f9f9;
    color: #999;
}

.suspended-member td {
    border-top: 1px solid #eee;
}

.suspended-member a {
    color: #999;
    pointer-events: none;
    text-decoration: none;
}