* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #a855f7;
    --primary-dark: #9333ea;
    --secondary-color: #ec4899;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    background: linear-gradient(to bottom right, #f0f4f8, #f8fafc);
    color: var(--text-primary);
    line-height: 1.6;
}

/* 헤더 */
.header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-banner {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

@media (min-width: 640px) {
    .header-banner {
        height: 192px;
    }
}

@media (min-width: 768px) {
    .header-banner {
        height: 224px;
    }
}

@media (min-width: 1024px) {
    .header-banner {
        height: 256px;
    }
}

.header-banner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-buttons {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 20;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.login-btn, .logout-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-block;
}

.login-btn:hover, .logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

.logout-btn {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.logout-btn:hover {
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.4);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-link {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-block;
}

.dashboard-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.4);
}

.user-name {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 섹션 */
section {
    margin-bottom: 3rem;
}

section h2 {
    font-size: 36px;
    font-weight: 700;
    line-height: 40px;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: inline-block;
    padding-bottom: 0.5rem;
    border-bottom: 4px solid var(--primary-color);
}

/* 후원 방법 섹션 */
.support-section {
    background-color: transparent;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

@media (min-width: 640px) {
    .section-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.banner-container {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.banner-slideshow {
    position: relative;
    width: 100%;
    max-width: 320px;
}

.banner-slideshow a {
    display: none;
    width: 100%;
}

.banner-slideshow a:has(.active) {
    display: block;
}

.banner-slide {
    display: none;
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: opacity 0.5s ease;
}

.banner-slide.active {
    display: block;
}

.banner-slide:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.banner-container a {
    display: inline-block;
    width: 100%;
    max-width: 320px;
}

.banner-img {
    width: 100%;
    max-width: 320px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-img:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.youtube-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 16px;
    white-space: nowrap;
}

.youtube-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.4);
}

.support-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.support-card {
    background-color: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.support-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.support-card h3 {
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.support-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

.support-card p strong, .support-card p b {
    font-weight: 700;
    color: #1e293b;
}

.card-details {
    background-color: #f1f5f9;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.account-details {
    background: linear-gradient(to bottom right, #dbeafe, #e0e7ff);
    border: 2px solid #3b82f6;
}

.detail-item {
    margin-bottom: 0.75rem;
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    line-height: 24px;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-weight: 600;
    color: #475569;
}

.detail-value {
    color: #475569;
    font-weight: 600;
}

.account-number .detail-value {
    background-color: white;
    padding: 0.625rem 0.75rem;
    border-radius: 0.25rem;
    border: 2px solid var(--text-primary);
    font-weight: bold;
    font-size: 1.125rem;
    display: inline-block;
}

.account-note .detail-value {
    background-color: #fef9c3;
    padding: 4px 8px;
    border-radius: 4px;
}

.card-features {
    list-style: none;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.card-features li {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

.checkmark {
    color: var(--primary-color);
    font-weight: bold;
    flex-shrink: 0;
}

.copy-btn, .support-link-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    gap: 0.5rem;
    width: 100%;
    text-decoration: none;
    height: 48px;
}

.copy-btn:hover, .support-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.4);
}

/* 멤버 소개 섹션 */
.members-section {
    margin-bottom: 3rem;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (max-width: 640px) {
    .members-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
}

.member-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.member-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    object-fit: cover;
    border: 3px solid #a855f7;
}

.member-avatar-fallback {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    background: linear-gradient(135deg, #a855f7, #9333ea);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.member-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 28px;
}

.member-role {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.member-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
}

.open-chat-btn, .message-btn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1f2937;
    border: none;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-decoration: none;
    height: 44px;
}

.open-chat-btn:hover, .message-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.message-btn {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: white;
    height: 40px;
}

.message-btn:hover {
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

/* FAQ 섹션 */
.faq-section {
    margin-bottom: 3rem;
}

.faq-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.faq-card {
    background-color: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.faq-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.faq-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.faq-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 출연문의 */
.contact-section {
    margin-top: 3rem;
    margin-bottom: 0.5rem;
}

.contact-center {
    display: flex;
    justify-content: center;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1f2937;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(251, 191, 36, 0.4);
}

.contact-icon {
    width: 24px;
    height: 24px;
}

/* 푸터 */
.footer {
    background-color: #1f2937;
    color: #d1d5db;
    text-align: center;
    padding: 1.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 0;
    border-radius: 1.5rem;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.1);
}

@keyframes slideIn {
    from {
        transform: scale(0.95) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 50%, #7e22ce 100%);
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.required {
    color: #dc2626;
    margin-left: 0.25rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #cbd5e1;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1);
}

.char-count {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.modal-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-cancel, .btn-send {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-cancel {
    background-color: #f1f5f9;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-cancel:hover {
    background-color: #e2e8f0;
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-send {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    flex: 1;
}

.btn-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.error-message {
    color: #dc2626;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* 반응형 */
@media (max-width: 640px) {
    .container {
        padding: 1rem 0.75rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    .support-cards {
        grid-template-columns: 1fr;
    }

    .members-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .faq-cards {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
    }

    .youtube-btn {
        width: 100%;
        justify-content: center;
    }
}


/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--background);
    color: var(--text-primary);
}

.modal-form {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.required {
    color: #ef4444;
}

.form-group input,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.char-count {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: right;
}

.modal-actions {
    display: flex;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.btn-cancel,
.btn-send {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background-color: var(--background);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-cancel:hover {
    background-color: #f1f5f9;
}

.btn-send {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(168, 85, 247, 0.3);
}

.btn-send:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 16px;
    }
}

.opentalk-icon {
    width: 18px;
    height: 18px;
}

/* 모달 멤버 프로필 */
.modal-member-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-member-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

/* 읽지 않은 쪽지 알림 모달 (메인 페이지) */
.unread-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: unreadFadeIn 0.3s ease;
}
.unread-modal {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid #0f3460;
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    animation: unreadScaleIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.unread-modal-icon {
    font-size: 3.5rem;
    color: #e94560;
    margin-bottom: 20px;
    animation: unreadRing 1s ease;
}
.unread-modal h3 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 12px;
    font-weight: 700;
}
.unread-modal p {
    color: #bbb;
    font-size: 1rem;
    margin-bottom: 28px;
    line-height: 1.6;
}
.unread-modal p strong {
    color: #e94560;
    font-size: 1.3rem;
}
.unread-modal-btn {
    background: linear-gradient(135deg, #e94560, #c0392b);
    color: #fff;
    border: none;
    padding: 14px 36px;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(233, 69, 96, 0.4);
}
.unread-modal-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(233, 69, 96, 0.6);
}
@keyframes unreadFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes unreadScaleIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes unreadRing {
    0% { transform: rotate(0); }
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-15deg); }
    60% { transform: rotate(10deg); }
    80% { transform: rotate(-10deg); }
    100% { transform: rotate(0); }
}
