/* 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* 헤더 */
header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

header h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

/* 섹션 */
section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 15px;
}

section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* 버튼 */
.btn-primary, .btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* 지갑 정보 */
.wallet-section {
    text-align: center;
}

.wallet-info {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    text-align: left;
}

.wallet-info p {
    margin: 10px 0;
    font-size: 1.1em;
}

.wallet-info strong {
    color: #667eea;
}

#walletAddress {
    font-family: monospace;
    font-size: 0.9em;
    color: #666;
}

/* 토큰 정보 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-grid div {
    padding: 15px;
    background: white;
    border-radius: 10px;
    font-weight: 500;
}

.info-grid span {
    color: #667eea;
    font-weight: 700;
}

/* 폼 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* 결과 메시지 */
.result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

.result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 거래 내역 */
.transactions-list {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.tx-item {
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.tx-item p {
    margin: 5px 0;
    font-size: 0.95em;
}

.tx-hash {
    font-family: monospace;
    color: #667eea;
    word-break: break-all;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 40px;
}

/* 푸터 */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    color: #666;
}

footer a {
    color: #667eea;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* === 고급 기능 스타일 === */

/* 배지 */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-secondary {
    background: #6c757d;
    color: white;
}

.auth-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

/* 스왑 섹션 */
.swap-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: end;
    margin-bottom: 20px;
}

.swap-arrow {
    font-size: 2em;
    color: #667eea;
    margin-bottom: 10px;
}

.swap-info {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 0.95em;
}

select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

/* 스왑 내역 */
.swap-list {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.swap-item {
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.swap-item p {
    margin: 5px 0;
    font-size: 0.95em;
}

.status-completed {
    color: #28a745;
    font-weight: 600;
}

.status-pending {
    color: #ffc107;
    font-weight: 600;
}

.status-failed {
    color: #dc3545;
    font-weight: 600;
}

/* 반응형 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .swap-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .swap-arrow {
        display: none;
    }
}
