/* 커피 버튼 스타일 (좌측 하단 고정) */
.coffee-button {
    position: fixed;
    bottom: 15px;
    left: 15px;
    z-index: 999;

    background: linear-gradient(135deg, #d4a574 0%, #9c6644 100%);
    color: white;
    border: none;
    outline: none;
    border-radius: 25px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Noto Sans KR', sans-serif;
    cursor: pointer;

    box-shadow: 0 4px 15px rgba(156, 102, 68, 0.4);
    transition: all 0.3s ease;

    display: flex;
    align-items: center;
    gap: 6px;

    /* 버튼임을 더 명확히 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.coffee-button::before {
    content: "☕ ";
}

.coffee-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 102, 68, 0.5);
}

.coffee-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(156, 102, 68, 0.4);
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .coffee-button {
        bottom: 10px;
        left: 10px;
        padding: 6px 12px;
        font-size: 13px;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .coffee-button {
        bottom: 8px;
        left: 8px;
        padding: 5px 10px;
        font-size: 12px;
        gap: 4px;
    }
}

/* 결제 모달 스타일 */
.payment-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.payment-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.payment-modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    max-height: 90vh;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow-y: auto;
}

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

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

.payment-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.payment-modal-close:hover {
    color: #333;
}

.payment-modal-content h2 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
}

.payment-modal-content p {
    text-align: center;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.payment-amount {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
}

.payment-amount strong {
    font-size: 24px;
    color: #d4a574;
    font-weight: 700;
}

#payment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#payment-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#payment-form label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

#payment-form input {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Noto Sans KR', sans-serif;
    transition: all 0.2s ease;
}

#payment-form input:focus {
    outline: none;
    border-color: #d4a574;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

/* 카카오페이 버튼 컨테이너 */
.kakaopay-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

/* 카카오페이 버튼 스타일 */
.kakaopay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Noto Sans KR', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.kakaopay-btn.qr-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.kakaopay-btn.link-btn {
    background: #FEE500;
    color: #3C1E1E;
}

.kakaopay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

.kakaopay-btn .btn-icon {
    font-size: 20px;
}

.kakaopay-btn .btn-text {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-only-badge {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8;
}

/* QR 코드 컨테이너 */
.qr-code-container {
    margin-top: 15px;
    text-align: center;
    padding: 15px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #d1d5db;
}

.qr-code-image {
    max-width: 250px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-code-description {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* 데스크탑 대응 - QR 코드 영역 더 컴팩트하게 */
@media (min-width: 769px) {
    .qr-code-container {
        margin-top: 10px;
        padding: 8px;
    }

    .qr-code-image {
        max-width: 320px;
    }

    .qr-code-description {
        margin-top: 5px;
        margin-bottom: 0;
        font-size: 13px;
    }
}

.payment-notice {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 0;
}

.payment-notice small {
    color: #999;
    font-size: 13px;
}

/* 모바일 대응 - 모달 */
@media (max-width: 768px) {
    .payment-modal-content {
        padding: 30px 25px;
        max-width: 95%;
    }

    .payment-modal-content h2 {
        font-size: 24px;
    }

    .payment-amount strong {
        font-size: 20px;
    }

    .payment-btn {
        font-size: 16px;
        padding: 13px;
    }

    /* 모바일에서 제목 - 괄호 부분만 줄바꿈 허용 */
    .donation-header-compact h1 {
        font-size: 14px;
        word-break: keep-all;
        line-height: 1.3;
    }

    .donation-header-compact .subtitle {
        font-size: 13px;
        white-space: nowrap;
    }

    /* 금액 표시 줄바꿈 방지 */
    .amount-display {
        font-size: 26px;
        white-space: nowrap;
    }

    /* QR 코드 설명 줄바꿈 방지 */
    .qr-code-description {
        font-size: 12px;
        white-space: nowrap;
    }

    /* 버튼 텍스트 줄바꿈 방지 */
    .kakaopay-btn .btn-text {
        font-size: 14px;
        white-space: nowrap;
    }

    .mobile-only-badge {
        font-size: 11px;
        white-space: nowrap;
    }

    /* 감사 메시지 폰트 크기 조정 */
    .payment-modal-content p {
        font-size: 12px;
    }
}

/* 더 작은 모바일 화면 대응 */
@media (max-width: 480px) {
    .donation-header-compact h1 {
        font-size: 13px;
        word-break: keep-all;
        line-height: 1.3;
    }

    .donation-header-compact .subtitle {
        font-size: 12px;
    }

    .amount-display {
        font-size: 24px;
    }

    .kakaopay-btn .btn-text {
        font-size: 13px;
    }

    .mobile-only-badge {
        font-size: 10px;
    }
}

/* 로딩 스피너 */
.payment-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 버튼 비활성화 상태 */
.payment-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.payment-btn:disabled:hover {
    box-shadow: none;
}

/* Donation 페이지/모달 전용 스타일 */
.donation-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(103, 126, 234, 0.2);
}

.donation-header h1 {
    font-size: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.donation-header .subtitle {
    font-size: 18px;
    color: #6b7280;
    margin-top: 5px;
}

/* 컴팩트 헤더 스타일 (모달용) */
.donation-header-compact {
    text-align: center;
    margin-bottom: 5px;
    padding-bottom: 10px;
}

.donation-header-compact h1 {
    font-size: 24px;
    color: #333;
    margin: 0 0 8px 0;
}

.donation-header-compact .subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* 컴팩트 섹션 스타일 */
.donation-section-compact {
    margin-bottom: 20px;
}

/* 상세 정보 접기/펴기 스타일 */
.donation-details {
    margin: 20px 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    background: #f9fafb;
}

.donation-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #667eea;
    font-size: 15px;
    user-select: none;
}

.donation-details summary::before {
    content: "💰 ";
}

.donation-details summary:hover {
    color: #764ba2;
}

.donation-details p {
    margin: 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

.hero-image {
    text-align: center;
    font-size: 80px;
    margin: 20px 0;
}

.donation-section {
    margin-bottom: 40px;
}

.donation-section h2 {
    font-size: 24px;
    color: #667eea;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.donation-section p {
    line-height: 1.8;
    color: #374151;
    margin: 15px 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background: #f9fafb;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(103, 126, 234, 0.2);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

.usage-list {
    background: #f0f4ff;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    margin: 20px 0;
}

.usage-list h3 {
    font-size: 18px;
    color: #667eea;
    margin-bottom: 15px;
}

.usage-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.usage-list li {
    padding: 8px 0;
    color: #374151;
    display: flex;
    align-items: center;
}

.usage-list li:before {
    content: "✓";
    color: #667eea;
    font-weight: bold;
    margin-right: 10px;
    font-size: 18px;
}

.donation-amount-section {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin: 15px 0;
}

.amount-label {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 10px;
}

.amount-display {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 10px 0;
}

.amount-description {
    font-size: 14px;
    color: #6b7280;
    margin-top: 10px;
}

.payment-methods {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.payment-method-badge {
    background: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.testimonial {
    background: #fffbeb;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
    margin: 30px 0;
}

.testimonial-text {
    font-style: italic;
    color: #374151;
    line-height: 1.8;
    margin-bottom: 15px;
}

.testimonial-author {
    text-align: right;
    color: #6b7280;
    font-size: 14px;
}

.faq-section {
    margin-top: 40px;
}

.faq-item {
    background: white;
    padding: 20px;
    margin: 15px 0;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.faq-question {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
}

.faq-answer {
    color: #6b7280;
    line-height: 1.6;
}

/* 모바일 대응 - Donation 스타일 */
@media (max-width: 768px) {
    .donation-header h1 {
        font-size: 28px;
    }

    .amount-display {
        font-size: 36px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .payment-modal-content {
        padding: 25px;
    }
}
