* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', 'Pretendard', sans-serif;
    overflow-x: hidden;
    color: #333;
    background: #f0f0f0;
}

/* 배너 영역 */
.banner {
    position: relative;
    width: 100%;
    height: 280px;
    margin-top: 75px;
    background-image: url('https://pub-d718cdf579084d1e9010ce7fe6e98919.r2.dev/iris/img/donate_background.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.55) 100%);
}

.banner-content {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 30px 40px;
}

.banner-content h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.banner-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* 콘텐츠 영역 */
.content-area {
    display: flex;
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 30px;
    gap: 28px;
    align-items: flex-start;
}

/* 왼쪽: 결제 방식 */
.sidebar {
    flex: 0 0 260px;
}

.sidebar-title {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.method-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    color: #555;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.method-btn:hover {
    border-color: #0D85FD;
    background: #f0f7ff;
}

.method-btn.active {
    border-color: #0D85FD;
    background: #0D85FD;
    color: #fff;
}

.method-btn .method-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.method-btn .method-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.sidebar-info {
    font-size: 0.78rem;
    color: #aaa;
    line-height: 1.7;
    padding: 14px;
    background: #fff;
    border-radius: 10px;
    border: 1.5px solid #e8e8e8;
}

/* 오른쪽: 폼 */
.form-area {
    flex: 1;
    min-width: 0;
}

.form-card {
    display: none;
    background: #fff;
    border-radius: 14px;
    padding: 36px;
    border: 1.5px solid #e8e8e8;
}

.form-card.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1.5px solid #f0f0f0;
}

/* 폼 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #555;
    font-weight: 600;
    margin-bottom: 7px;
    font-size: 0.88rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #fff;
    color: #333;
    font-family: 'Noto Sans KR', sans-serif;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0D85FD;
    box-shadow: 0 0 0 3px rgba(13, 133, 253, 0.12);
}

.form-group input::placeholder {
    color: #bbb;
}

.submit-button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: #0D85FD;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 6px;
    font-family: 'Noto Sans KR', sans-serif;
}

.submit-button:hover {
    background: #0a6ed4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 133, 253, 0.3);
}

.info-box {
    background: #fafafa;
    border-left: 3px solid #0D85FD;
    padding: 14px 16px;
    border-radius: 6px;
    margin-top: 18px;
}

.info-box p {
    color: #888;
    font-size: 0.82rem;
    line-height: 1.7;
    margin: 0;
}

/* 상품권 */
.giftcard-section-label {
    color: #555;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    font-size: 0.88rem;
}

.giftcard-item {
    background: #fafafa;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
}

.giftcard-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.giftcard-item-title {
    font-size: 0.82rem;
    color: #0D85FD;
    font-weight: 700;
}

.giftcard-remove-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.giftcard-remove-btn:hover {
    color: #ff4444;
}

.giftcard-inputs {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 8px;
}

.giftcard-inputs input {
    padding: 10px 12px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 0.88rem;
}

.giftcard-inputs input:focus {
    outline: none;
    border-color: #0D85FD;
}

.giftcard-inputs input::placeholder {
    color: #bbb;
}

.add-giftcard-btn {
    width: 100%;
    padding: 10px;
    border: 1.5px dashed #ccc;
    border-radius: 8px;
    background: none;
    color: #999;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 14px;
}

.add-giftcard-btn:hover {
    border-color: #0D85FD;
    color: #0D85FD;
    background: #f0f7ff;
}

.giftcard-total {
    background: #fafafa;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    margin-bottom: 14px;
}

.giftcard-total-label {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 4px;
    font-weight: 600;
}

.giftcard-total-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #222;
}

/* 예상 결제 금액 */
.price-preview {
    background: #fafafa;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    margin-bottom: 14px;
}

.price-preview-label {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 4px;
    font-weight: 600;
}

.price-preview-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0D85FD;
}

.price-preview-desc {
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 4px;
}

/* 모달 주문 요약 */
.order-summary {
    background: #fafafa;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: #777;
    padding: 4px 0;
}

.order-summary-row strong {
    color: #222;
    font-weight: 700;
}

/* 이용약관 동의 */
.terms-agree {
    margin: 16px 0 6px;
}

.terms-agree-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    color: #555;
    font-weight: 500;
}

.terms-agree-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0D85FD;
    cursor: pointer;
    flex-shrink: 0;
}

.terms-agree-label a {
    color: #0D85FD;
    text-decoration: none;
    font-weight: 600;
}

.terms-agree-label a:hover {
    text-decoration: underline;
}

/* ========== 랭크 상품 카드 ========== */
.rank-notice {
    background: #f8f6ff;
    border-left: 3px solid #764ba2;
    padding: 14px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.rank-notice p {
    color: #555;
    font-size: 0.82rem;
    line-height: 1.7;
    margin: 0;
}

/* Step 2 헤더 */
.rank-step2-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f6ff;
    border: 1.5px solid #e8e0f5;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
}

.rank-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rank-user-nick {
    font-size: 1rem;
    font-weight: 700;
    color: #222;
}

.rank-user-current {
    font-size: 0.82rem;
    font-weight: 600;
    color: #764ba2;
}

.rank-back-btn {
    padding: 8px 16px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #666;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans KR', sans-serif;
}

.rank-back-btn:hover {
    border-color: #764ba2;
    color: #764ba2;
    background: #faf7ff;
}

.rank-max-message {
    text-align: center;
    padding: 40px 20px;
}

.rank-max-message p {
    font-size: 0.95rem;
    color: #999;
    font-weight: 600;
}

/* 상품 카드 목록 */
.rank-product-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rank-product {
    border: 1.5px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.rank-product:hover {
    border-color: #ccc;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

.rank-product-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
}

.rank-product-badge {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}

.rank-product-info {
    flex: 1;
    min-width: 0;
}

.rank-product-name {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.rank-product-price-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-product-original {
    font-size: 0.82rem;
    color: #bbb;
    text-decoration: line-through;
    font-weight: 500;
}

.rank-product-upgrade-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #222;
}

.rank-product-buy {
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: 'Noto Sans KR', sans-serif;
}

.rank-product-buy:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* 혜택 (항상 표시) */
.rank-product-benefits {
    border-top: 1px solid #f0f0f0;
}

.rank-product-benefits ul {
    list-style: none;
    padding: 14px 20px 16px;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
}

.rank-product-benefits ul li {
    font-size: 0.8rem;
    color: #666;
    padding: 3px 0;
    padding-left: 14px;
    position: relative;
    line-height: 1.5;
    width: 100%;
}

.rank-product-benefits ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

/* 랭크별 색상 */
.rank-silver .rank-product-badge { background: linear-gradient(135deg, #a8b4c0, #8896a5); }
.rank-silver .rank-product-name { color: #7a8a9a; }
.rank-silver .rank-product-buy { background: #8896a5; }
.rank-silver .rank-product-buy:hover { background: #7a8a9a; }
.rank-silver .rank-product-benefits ul li::before { background: #a8b4c0; }

.rank-gold .rank-product-badge { background: linear-gradient(135deg, #f0c040, #d4a020); }
.rank-gold .rank-product-name { color: #c49b1a; }
.rank-gold .rank-product-buy { background: #d4a020; }
.rank-gold .rank-product-buy:hover { background: #c49b1a; }
.rank-gold .rank-product-benefits ul li::before { background: #f0c040; }

.rank-lunaria .rank-product-badge { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.rank-lunaria .rank-product-name { color: #7c3aed; }
.rank-lunaria .rank-product-buy { background: #7c3aed; }
.rank-lunaria .rank-product-buy:hover { background: #6d28d9; }
.rank-lunaria .rank-product-benefits ul li::before { background: #a78bfa; }

.rank-phantom .rank-product-badge { background: linear-gradient(135deg, #f87171, #dc2626); }
.rank-phantom .rank-product-name { color: #dc2626; }
.rank-phantom .rank-product-buy { background: #dc2626; }
.rank-phantom .rank-product-buy:hover { background: #b91c1c; }
.rank-phantom .rank-product-benefits ul li::before { background: #f87171; }

.rank-master .rank-product-badge { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.rank-master .rank-product-name { color: #d97706; }
.rank-master .rank-product-buy { background: #f59e0b; }
.rank-master .rank-product-buy:hover { background: #d97706; }
.rank-master .rank-product-benefits ul li::before { background: #fbbf24; }

/* 랭크 구매 모달 */
.rank-modal-content {
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

.rank-modal-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.rank-price-box {
    background: #f8f8f8;
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.rank-price-label {
    font-size: 0.78rem;
    color: #999;
    font-weight: 600;
    margin-bottom: 4px;
}

.rank-price-original {
    font-size: 0.85rem;
    color: #bbb;
    text-decoration: line-through;
    margin-bottom: 2px;
}

.rank-price-final {
    font-size: 1.5rem;
    font-weight: 800;
    color: #222;
}

.rank-price-discount {
    font-size: 0.78rem;
    color: #7c3aed;
    font-weight: 600;
    margin-top: 4px;
}

.rank-pay-methods {
    display: flex;
    gap: 8px;
}

.rank-pay-btn {
    flex: 1;
    padding: 12px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #555;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-family: 'Noto Sans KR', sans-serif;
}

.rank-pay-btn:hover {
    border-color: #0D85FD;
    background: #f0f7ff;
}

.rank-pay-btn.active {
    border-color: #0D85FD;
    background: #0D85FD;
    color: #fff;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 36px;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: translate(-50%, -45%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.modal-content .form-group label {
    color: #555;
}

.modal-content .form-group input {
    background: #fff;
    border: 1.5px solid #ddd;
    color: #333;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    color: #222;
    font-size: 1.3rem;
    margin: 0;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 0;
}

.close-button:hover {
    color: #333;
}

.modal-button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: #0D85FD;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.modal-button:hover {
    background: #0a6ed4;
}

/* 알림 모달 */
.alert-modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
}

.alert-modal-content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalIn 0.3s ease-out;
    text-align: center;
}

.alert-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
}

.alert-modal-icon.error {
    background: #fff3f3;
    color: #ff4444;
}

.alert-modal-icon.warning {
    background: #f0f7ff;
    color: #0D85FD;
}

.alert-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
}

.alert-modal-message {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
}

.alert-modal-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 8px;
    background: #0D85FD;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-modal-btn:hover {
    background: #0a6ed4;
}

/* donate 푸터 margin */
footer {
    margin-top: 40px;
}

/* 반응형 */
@media (max-width: 860px) {
    .content-area {
        flex-direction: column;
        padding: 0 20px;
    }

    .sidebar {
        flex: none;
        width: 100%;
    }

    .payment-methods {
        flex-direction: row;
    }

    .method-btn {
        flex: 1;
        justify-content: center;
        font-size: 0.85rem;
        padding: 12px 10px;
        gap: 6px;
    }

    .sidebar-info {
        display: none;
    }
}

@media (max-width: 768px) {
    .banner {
        height: 200px;
        padding: 0 30px;
    }

    .banner-content h1 {
        font-size: 1.7rem;
    }

    .banner-content p {
        font-size: 0.9rem;
    }

    .form-card {
        padding: 24px 20px;
    }

    .rank-product-top {
        flex-wrap: wrap;
    }

    .rank-product-buy {
        width: 100%;
        text-align: center;
        margin-top: 4px;
    }

    .rank-pay-methods {
        flex-direction: column;
    }

    .rank-step2-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .rank-back-btn {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .payment-methods {
        flex-direction: column;
    }

    .giftcard-inputs {
        grid-template-columns: 1fr;
    }

    .banner {
        height: 180px;
        padding: 0 20px;
    }

    .banner-content h1 {
        font-size: 1.4rem;
    }
}
