/* === Clan Detail Full Screen v7 === */
.cd-wrap {
    animation: fadeIn 0.3s ease;
}

.cd-back {
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 24px;
    transition: 0.2s;
}

.cd-back:hover {
    color: var(--text);
}

.cd-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    background: rgba(255, 255, 255, 0.02);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.cd-logo {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    object-fit: cover;
}

.cd-title {
    font-size: 2.5rem;
    font-weight: 900;
}

.cd-tag {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-left: 12px;
    background: var(--border);
    padding: 4px 8px;
    border-radius: 6px;
    vertical-align: middle;
}

.cd-badges {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.cd-badge {
    font-size: 0.8rem;
    background: rgba(167, 139, 250, 0.1);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.cd-badge b {
    font-weight: 800;
    margin-left: 4px;
}

.cd-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 24px;
}

.cd-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.cd-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 700;
}

.cd-about {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ccc;
    white-space: pre-wrap;
}

.cd-news-item {
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
}

.cd-news-item:last-child {
    border-bottom: none;
}

.cd-news-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.cd-news-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.cd-news-content {
    color: #bbb;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

.cd-btn-del {
    background: none;
    border: none;
    color: #F87171;
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: 12px;
    font-weight: 600;
}

.cd-post-form {
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.cd-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-family: inherit;
    margin-bottom: 12px;
    resize: vertical;
}

.cd-post-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.cd-btn-post {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.cd-btn-photo {
    background: var(--border);
    color: #bbb;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-block;
}

.cd-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    color: inherit;
}

.cd-member:hover {
    background: rgba(167, 139, 250, 0.08);
    border-color: rgba(167, 139, 250, 0.15);
    transform: translateX(4px);
}

.cd-member:visited {
    color: inherit;
}

.cd-member.leader {
    background: rgba(167, 139, 250, 0.05);
    border: 1px solid rgba(167, 139, 250, 0.15);
}



.cd-member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.cd-member-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.cd-member-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.cd-member-role {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.cd-btn-join {
    width: 100%;
    background: var(--text);
    color: var(--bg);
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
}

.cd-btn-submit {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Scroll for Clan Posts */
#clan-news-feed {
    min-height: auto;
    padding-right: 8px;
}

.cd-news-item {
    position: relative !important;
    padding: 16px;
    padding-right: 80px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cd-btn-edit:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: #10b981;
}

.cd-btn-del:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: #ef4444;
}


/* Clan Member Controls */
.cd-member-controls {
    margin-left: auto;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: 0.2s;
}

.cd-member:hover .cd-member-controls {
    opacity: 1;
}

.cd-btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
    color: white;
    transition: 0.2s;
}

.cd-btn-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .cd-member-controls {
        opacity: 1;
    }
}

.cd-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    width: 28px;
    height: 28px;
    color: rgba(255, 255, 255, 0.7);
}

.cd-btn-icon:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.cd-btn-icon svg {
    margin: 0;
}

/* Collapsible Form Styling */
.cd-post-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    margin-bottom: 24px;
    font-size: 0.9rem;
    transition: 0.2s;
}

.cd-post-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

.cd-btn-cancel {
    background: transparent;
    border: none;
    color: #F87171;
    font-size: 0.85rem;
    cursor: pointer;
    margin-left: auto;
    padding: 8px;
}

.cd-btn-cancel:hover {
    text-decoration: underline;
}

/* Clan News Feed Adjustments */
#clan-news-feed {
    min-height: auto;
    padding-right: 8px;
    border-radius: 8px;
}

.cd-post-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 6px 16px;
    margin-bottom: 8px;
}

.cd-post-bar:focus-within {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.cd-input-bar {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 8px 0;
    font-size: 0.95rem;
}

.cd-input-bar:focus {
    outline: none;
}

.cd-clip {
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    transition: 0.2s;
}

.cd-clip:hover {
    color: var(--accent);
}

.cd-btn-send {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 8px;
    transition: 0.2s;
}

.cd-btn-send:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.cd-post-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 4px 16px;
    margin-bottom: 12px;
    transition: 0.2s;
}

.cd-post-bar:focus-within {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
}

.cd-input-bar {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 12px 0;
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    overflow-y: hidden;
    min-height: 24px;
}

.cd-input-bar:focus {
    outline: none;
}

.cd-clip {
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    transition: 0.2s;
}

.cd-clip:hover {
    color: var(--accent);
}

.cd-btn-send {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 8px;
    transition: 0.2s;
}

.cd-btn-send:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

/* Logo Update Feature */
.cd-logo-container {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.logo-drop-zone {
    position: absolute;
    inset: 0;
    background: rgba(167, 139, 250, 0.1);
    border: 2px dashed var(--accent);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.2s;
    cursor: pointer;
    z-index: 2;
}

.logo-drop-zone:hover,
.logo-drop-zone.dragover {
    opacity: 1;
    background: rgba(167, 139, 250, 0.25);
}

.logo-drop-hint {
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    padding: 10px;
    pointer-events: none;
}

/* News Image Previews */
.cd-preview-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.cd-preview-item {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.cd-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cd-preview-del {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

.cd-preview-del:hover {
    background: #EF4444;
}