/* 결제 화면 스타일 */
.payment-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, #ADD8E6 0%, #87CEEB 100%);
    display: flex;
    flex-direction: column;
}

/* 헤더 */
.payment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.payment-title {
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(40, 167, 69, 0.2);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.security-icon {
    font-size: 14px;
}

.security-text {
    color: #90EE90;
    font-size: 12px;
    font-weight: 600;
}

/* 주문 정보 */
.order-info {
    padding: 20px;
}

.order-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.order-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.order-icon {
    font-size: 32px;
    min-width: 40px;
    text-align: center;
}

.order-details {
    flex: 1;
}

.order-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.order-subtitle {
    font-size: 14px;
    color: #666;
}

.order-price {
    text-align: right;
}

.price-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-gradient-end);
}

.price-unit {
    font-size: 16px;
    color: #666;
    margin-left: 2px;
}

.order-benefits {
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

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

.benefit-icon {
    font-size: 16px;
}

.benefit-text {
    font-weight: 500;
}

/* 결제 단계 */
.payment-step {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    text-align: center;
    margin-bottom: 24px;
}

/* 결제 방법 */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.payment-method {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.payment-method:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.payment-method.selected {
    border-color: var(--primary-gradient-end);
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.2);
}

.method-icon {
    font-size: 24px;
    min-width: 32px;
    text-align: center;
}

.method-info {
    flex: 1;
}

.method-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 2px;
}

.method-description {
    font-size: 13px;
    color: #666;
}

.method-radio {
    position: relative;
}

.method-radio input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.method-radio input[type="radio"]:checked {
    border-color: var(--primary-gradient-end);
    background: var(--primary-gradient-end);
}

.method-radio input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--white);
}

/* 약관 동의 */
.payment-terms {
    margin-bottom: 24px;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    color: var(--dark-color);
    font-size: 14px;
    line-height: 1.4;
    background: #fff5f5;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid #ffeb3b;
    box-shadow: 0 4px 12px rgba(255, 235, 59, 0.3);
    transition: all 0.3s ease;
}

.terms-checkbox:hover {
    background: #fff3e0;
    border-color: #ff9800;
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
    transform: translateY(-2px);
}

.terms-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    min-width: 24px;
    height: 24px;
    border: 3px solid #ff9800;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: 1px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
}

.terms-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, #4caf50, #8bc34a);
    border-color: #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    transform: scale(1.1);
}

.terms-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.terms-text {
    flex: 1;
}

.terms-link {
    color: var(--primary-gradient-end);
    text-decoration: underline;
    font-weight: 500;
}

.terms-link:hover {
    color: #7FDD7F;
}

/* 결제 액션 */
.payment-actions {
    text-align: center;
}

.payment-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ADD8E6, #87CEEB);
    transition: all 0.3s ease;
}

.payment-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.payment-btn.ready {
    background: linear-gradient(135deg, #10b981, #059669, #047857);
    background-size: 200% 200%;
    animation: payment-ready 2s infinite, gradientShift 3s ease infinite;
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

@keyframes payment-ready {
    0%, 100% { box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3); }
    50% { box-shadow: 0 6px 25px rgba(40, 167, 69, 0.5); }
}

.payment-info {
    margin-top: 12px;
}

.info-text {
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

/* 결제 진행 */
.processing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 400px;
    gap: 32px;
}

.processing-animation {
    position: relative;
    width: 120px;
    height: 120px;
}

.processing-spinner {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.processing-cards {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 4px;
}

.processing-card {
    width: 12px;
    height: 16px;
    background: var(--white);
    border-radius: 2px;
    animation: processing-wave 1.5s infinite;
}

.processing-card:nth-child(2) {
    animation-delay: 0.2s;
}

.processing-card:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes processing-wave {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.7; }
}

.processing-info {
    color: var(--white);
}

.processing-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

.processing-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
}

.processing-step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.5;
    transition: opacity 0.5s ease;
}

.processing-step-item.active {
    opacity: 1;
}

.step-number {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.processing-step-item.active .step-number {
    background: var(--white);
    color: var(--primary-gradient-end);
}

.step-text {
    font-size: 14px;
}

.processing-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FFE135;
    font-size: 14px;
    font-weight: 500;
}

.warning-icon {
    font-size: 18px;
}

/* 결제 결과 */
.result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 400px;
    justify-content: center;
    gap: 32px;
}

.result-icon {
    width: 80px;
    height: 80px;
}

.success-icon,
.error-icon {
    width: 100%;
    height: 100%;
    position: relative;
}

.success-circle,
.error-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    animation: result-appear 0.6s ease-out;
}

.success-circle {
    background: #28a745;
    color: var(--white);
}

.error-circle {
    background: #dc3545;
    color: var(--white);
}

@keyframes result-appear {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.result-info {
    color: var(--white);
    max-width: 400px;
}

.result-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.result-title.success {
    color: #90EE90;
}

.result-title.error {
    color: #FFB6C1;
}

.result-details {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.detail-label {
    font-size: 14px;
    opacity: 0.8;
}

.detail-value {
    font-weight: 600;
}

.error-message {
    font-size: 16px;
    color: #FFB6C1;
    margin-bottom: 20px;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 300px;
}

.result-btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.result-btn.btn-primary {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: var(--white);
}

.result-btn.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.result-btn:hover {
    transform: translateY(-1px);
}

/* 보안 정보 */
.security-info {
    background: var(--white);
    margin-top: auto;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    padding: 20px;
}

.security-items {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

.security-badge-icon {
    font-size: 14px;
}

.security-badge-text {
    font-weight: 600;
}

.payment-notice {
    border-top: 1px solid #eee;
    padding-top: 16px;
}

.notice-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

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

.notice-list li {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    padding-left: 12px;
    position: relative;
}

.notice-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-gradient-end);
}

/* 약관 모달 내용 */
.terms-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin: 20px 0 12px 0;
    color: var(--dark-color);
}

.terms-content h4:first-child {
    margin-top: 0;
}

.terms-text {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 16px;
}

.terms-text p {
    margin-bottom: 8px;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .payment-header {
        padding: 16px;
    }
    
    .payment-title {
        font-size: 18px;
    }
    
    .order-info {
        padding: 16px;
    }
    
    .order-card {
        padding: 20px;
    }
    
    .order-header {
        gap: 12px;
    }
    
    .order-icon {
        font-size: 28px;
        min-width: 32px;
    }
    
    .order-title {
        font-size: 18px;
    }
    
    .price-amount {
        font-size: 20px;
    }
    
    .payment-step {
        padding: 16px;
    }
    
    .step-title {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .payment-method {
        padding: 12px;
        gap: 12px;
    }
    
    .method-icon {
        font-size: 20px;
        min-width: 28px;
    }
    
    .method-name {
        font-size: 15px;
    }
    
    .method-description {
        font-size: 12px;
    }
    
    .terms-checkbox {
        font-size: 13px;
    }
    
    .processing-container {
        min-height: 300px;
        gap: 24px;
    }
    
    .processing-animation {
        width: 80px;
        height: 80px;
    }
    
    .processing-title {
        font-size: 20px;
    }
    
    .result-container {
        min-height: 300px;
        gap: 24px;
    }
    
    .result-icon {
        width: 60px;
        height: 60px;
    }
    
    .result-title {
        font-size: 20px;
    }
    
    .security-info {
        padding: 16px;
    }
    
    .security-items {
        gap: 16px;
    }
}

@media (max-width: 375px) {
    .order-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .order-price {
        text-align: center;
    }
    
    .processing-steps {
        align-items: center;
    }
    
    .security-items {
        flex-direction: column;
        gap: 8px;
    }
}

/* 접근성 */
@media (prefers-reduced-motion: reduce) {
    .processing-spinner,
    .processing-card,
    .payment-btn,
    .success-circle,
    .error-circle {
        animation: none !important;
    }
}

/* 다크 모드 */
@media (prefers-color-scheme: dark) {
    .order-card {
        background: rgba(52, 73, 94, 0.95);
        color: var(--white);
    }
    
    .order-title {
        color: var(--white);
    }
    
    .payment-method {
        background: rgba(52, 73, 94, 0.95);
        color: var(--white);
    }
    
    .payment-method:hover {
        background: rgba(52, 73, 94, 1);
    }
    
    .method-name {
        color: var(--white);
    }
    
    .security-info {
        background: #2c3e50;
        color: var(--white);
    }
    
    .notice-title {
        color: var(--white);
    }
    
    .result-details {
        background: rgba(52, 73, 94, 0.3);
    }
}