:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-input: rgba(15, 23, 42, 0.6);
    
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-tertiary: #94a3b8;
    
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-shadow: rgba(59, 130, 246, 0.15);
    
    --border-primary: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    --accent: #8b5cf6;
    --accent-dark: #7c3aed;
    --accent-light: rgba(139, 92, 246, 0.1);
}

.claim-wrapper {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
    padding-top: 10px !important;
}

.claim-wrapper::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    pointer-events: none;
    animation: gradientMove 15s ease-in-out infinite alternate;
}

@keyframes gradientMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(5%, 5%);
    }
}

.claim-container {
    width: 100%;
    min-width:750px;
    margin-top: 1rem;
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.claim-container:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 12px -1px rgba(0, 0, 0, 0.15),
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.claim-header {
    width: 100%;
    padding: 1.25rem 2rem 0.75rem;
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--accent);
    background: linear-gradient(to right, var(--accent-light), transparent);
}

.claim-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    text-shadow: 0 0 20px var(--accent);
}

.claim-title::before {
    content: '💎';
    font-size: 1.875rem;
    line-height: 1;
    margin-right: 0.75rem;
}

.claim-description {
    color: var(--accent);
    font-size: 0.95rem;
    line-height: 1.2;
    margin-left: 1rem;
    padding-top: 0.5rem;
    font-weight: 600;
}

.claim-form {
    padding: 1.25rem 2rem;
    width: 100%;
}

.input-section {
    margin-bottom: 1rem;
    margin-top: 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.input-label-group {
    padding-top: 0;
}

.input-label {
    display: block;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-label::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

.input-field {
    position: relative;
    margin-bottom: 0;
    width: 100%;
}

.input-field i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 1rem;
    transition: color 0.2s ease;
}

.input-field input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--accent);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.input-field input:hover {
    border-color: var(--accent);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 0 1px var(--accent-light);
}

.input-field input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(30, 41, 59, 1);
    box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-light);
}

.input-field input:focus + i {
    color: var(--accent);
}

.input-field input::placeholder {
    color: var(--text-tertiary);
}

.input-help {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin: 0.75rem 0 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-help::before {
    content: 'ℹ️';
    font-size: 1rem;
}

.input-examples {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(17, 24, 39, 0.2);
    border-radius: 0.5rem;
    border: 1px solid var(--border-primary);
}

.example-text {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.example-item {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-family: monospace;
    margin: 0.25rem 0;
}

.action-buttons {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    width: 100%;
}

.btn-claim {
    width: 100%;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 
        0 4px 6px -1px rgba(139, 92, 246, 0.2),
        0 2px 4px -1px rgba(139, 92, 246, 0.1);
}

.btn-claim:hover {
    transform: translateY(-1px);
    background: var(--accent-dark);
    box-shadow: 
        0 6px 10px -1px rgba(139, 92, 246, 0.25),
        0 4px 6px -1px rgba(139, 92, 246, 0.15);
}

.btn-claim:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px -1px rgba(139, 92, 246, 0.2),
        0 1px 2px -1px rgba(139, 92, 246, 0.1);
}

.btn-icon {
    font-size: 1.125rem;
    transition: transform 0.2s ease;
}

.btn-claim:hover .btn-icon {
    transform: scale(1.1) rotate(-10deg);
}

@media (max-width: 1024px) {
    .claim-wrapper {
        padding: 2rem;
    }
    
    .claim-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .claim-wrapper {
        padding: 1rem;
        gap: 1rem;
    }
    
    .claim-header {
        padding: 1rem 1.5rem;
    }
    
    .claim-form {
        padding: 1.25rem 1.5rem;
    }
    
    .input-section {
        gap: 0.5rem;
    }
    
    .input-label-group {
        flex: none;
        padding-top: 0;
    }
    
    .input-examples {
        margin-top: 0.5rem;
        padding: 0.5rem;
    }
    
    .action-buttons {
        margin-top: 1.25rem;
    }
    
    .btn-claim {
        width: 100%;
        max-width: 280px;
        padding: 0.75rem 1.5rem;
    }
    
    .claim-title {
        font-size: 1.5rem;
    }
    
    .claim-title::before {
        font-size: 1.5rem;
    }
    
    .claim-description {
        font-size: 0.8125rem;
        margin-left: 0.75rem;
    }
}

@media (max-width: 480px) {
    .claim-wrapper {
        padding: 1rem;
    }
    
    .claim-header {
        padding: 1.5rem;
    }
    
    .claim-title {
        font-size: 1.5rem;
    }
    
    .claim-form {
        padding: 1.5rem;
    }
}

@media (max-width: 600px) {
    .claim-wrapper {
        padding-top: 140px !important;
    }
}

.token-section {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-primary);
    margin-top: 1rem;
    background: linear-gradient(to bottom, transparent, rgba(139, 92, 246, 0.05));
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap : 0.5rem;
}

.hidden {
    display: none !important;
}

.token-section.hidden {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.token-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
}

/* 로고·티커·수량·체크 열 너비 고정 → 행마다 수량 세로줄 정렬 */
.token-card {
    display: grid;
    grid-template-columns: 40px 5.5rem 7rem 1fr;
    align-items: center;
    column-gap: 0.75rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--accent);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.token-card.selected {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.token-checkbox {
    position: relative;
    width: 24px;
    height: 24px;
    cursor: pointer;
    justify-self: end;
    align-self: center;
}

.token-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid var(--accent);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.token-checkbox:hover .checkmark {
    background: rgba(139, 92, 246, 0.1);
}

.token-checkbox input:checked + .checkmark {
    background: var(--accent);
}

.token-checkbox input:checked + .checkmark:after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.token-image {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent);
    align-self: center;
    justify-self: start;
}

.token-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.token-info {
    display: contents;
}

.token-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25;
    margin: 0;
    width: 5.5rem;
    min-width: 5.5rem;
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    align-self: center;
}

.token-symbol {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.token-amount {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25;
    margin: 0;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    width: 7rem;
    min-width: 7rem;
    max-width: 7rem;
    text-align: right;
    align-self: center;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .token-section {
        margin-top: 1rem;
    }
    
    .token-card {
        padding: 0.35rem;
        grid-template-columns: 32px 4.5rem 6rem 1fr;
        column-gap: 0.5rem;
    }
    
    .token-image {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .token-name {
        font-size: 0.875rem;
        width: 4.5rem;
        min-width: 4.5rem;
        max-width: 4.5rem;
    }
    
    .token-amount {
        font-size: 0.75rem;
        width: 6rem;
        min-width: 6rem;
        max-width: 6rem;
    }
    
    .claim-wrapper {
        padding: 1rem;
    }
    
    .claim-header {
        padding: 1rem 1rem 0.5rem;
    }
    
    .claim-form {
        padding: 1rem;
    }
    
    .claim-action {
        margin-top: 1rem;
    }
    
    .btn-token-claim {
        width: 100%;
        padding: 0.75rem;
    }
    
    .claim-title {
        font-size: 1.5rem;
    }
    
    .claim-title::before {
        font-size: 1.5rem;
    }
    
    .claim-description {
        font-size: 0.75rem;
    }
}

.claim-action {
    display: flex;
    justify-content: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-primary);
}

.btn-token-claim {
    padding: 0.875rem 2.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    min-width: 200px;
    box-shadow: 
        0 4px 6px -1px rgba(16, 185, 129, 0.2),
        0 2px 4px -1px rgba(16, 185, 129, 0.1);
}

.btn-token-claim:not(:disabled):hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 
        0 6px 10px -1px rgba(16, 185, 129, 0.25),
        0 4px 6px -1px rgba(16, 185, 129, 0.15);
}

.btn-token-claim:not(:disabled):active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px -1px rgba(16, 185, 129, 0.2),
        0 1px 2px -1px rgba(16, 185, 129, 0.1);
}

.btn-token-claim:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-token-claim .btn-icon {
    font-size: 1.125rem;
    transition: transform 0.2s ease;
}

.btn-token-claim:not(:disabled):hover .btn-icon {
    transform: scale(1.1) rotate(-10deg);
}

/* 클레임 금액 섹션 스타일 */
.claim-fee-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--accent);
    border-radius: 0.5rem;
    position: relative;
}

.fee-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    min-width: 120px;
}

.fee-amount-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.fee-amount {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.125rem;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.fee-note {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    max-width: 300px;
}

.fee-note p {
    color: #f87171;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
    text-align: right;
    line-height: 1.2;
}

.copy-btn {
    background: var(--accent);
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
}

.copy-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.copy-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.copy-btn i {
    font-size: 0.875rem;
}

/* 지갑 주소 섹션 스타일 */
.wallet-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--accent);
    border-radius: 0.5rem;
}

.wallet-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    min-width: 120px;
}

.wallet-address-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.wallet-address {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    word-break: break-all;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .claim-fee-section,
    .wallet-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .fee-label,
    .wallet-label {
        min-width: auto;
    }
    
    .fee-amount-container,
    .wallet-address-container {
        width: 100%;
        justify-content: space-between;
    }
    
    .fee-amount {
        font-size: 1rem;
    }
    
    .wallet-address {
        font-size: 0.75rem;
    }
    
    .fee-note {
        position: static;
        transform: none;
        max-width: 100%;
        margin-top: 0.5rem;
    }
    
    .fee-note p {
        text-align: left;
        font-size: 0.7rem;
    }
}

/* 토큰 안내 문구 스타일 */
.token-instruction {
    text-align: center;
    margin-bottom: 0;
    padding: 0.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border: 2px solid var(--primary);
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
    font-size: 0.9rem;
}

.token-instruction p {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.8rem;
    margin: 0;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.highlight-text {
    color: #f87171;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(248, 113, 113, 0.5);
}

/* 통합된 구조 스타일 */
.token-claim-wrapper {
    width: 100%;
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
    padding-top: 10px !important;
}

.token-claim-header {
    width: 100%;
    padding: 1.25rem 2rem 0.75rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--accent);
    background: linear-gradient(to right, var(--accent-light), transparent);
    margin-bottom: 1.5rem;
}

.token-claim-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.token-claim-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* PC용 테이블 뷰 */
.ktop-status-table-view {
    width: 100%;
}

/* 에어드랍: KTOP 풀 두 표 — flex 2열이 좁은 폭에서 넘치며 겹쳐 보이는 문제 방지 */
.renew-token-claim .ktop-status-table-view .double-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: start;
}

.renew-token-claim .ktop-status-table-view .double-row > .grid-section {
    min-width: 0;
    min-height: auto;
    position: relative;
    z-index: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.renew-token-claim .ktop-status-table-view .double-row > .grid-section .token-table {
    min-width: 0;
}

/* 가로가 부족하면 세로로 쌓아 겹침 제거 (메인 .renew-main 밖이라 renewal 미적용 보완) */
@media (max-width: 1200px) {
    .renew-token-claim .ktop-status-table-view .double-row {
        grid-template-columns: 1fr;
    }
}

.renew-token-claim .ktop-status-table-view .double-row > .grid-section:hover {
    transform: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

/* 반응형: 모바일에서도 KTOP 풀 두 표는 표시(가로 스크롤로 전체 확인) */
@media (max-width: 767px) {
    .token-claim-wrapper {
        padding: 0 16px 16px 16px;
    }
    
    .token-claim-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .token-claim-title {
        font-size: 1.25rem;
    }

    .renew-token-claim .ktop-status-section {
        margin-bottom: 0.75rem;
    }

    .renew-token-claim .ktop-status-table-view {
        display: block;
        width: 100%;
    }

    .renew-token-claim .ktop-status-table-view .double-row > .grid-section {
        padding: 0.75rem 0.6rem;
    }

    .renew-token-claim .ktop-status-table-view .section-title {
        font-size: 0.92rem;
        gap: 0.4rem;
    }

    .renew-token-claim .ktop-status-table-view .token-table {
        font-size: 0.65rem;
    }

    .renew-token-claim .ktop-status-table-view .token-table th,
    .renew-token-claim .ktop-status-table-view .token-table td {
        padding: 0.35rem 0.25rem;
    }

    .renew-token-claim .ktop-status-table-view .token-icon {
        width: 20px;
        height: 20px;
    }
    
    /* 모바일에서는 입력 필드와 버튼 스타일 조정 */
    .input-field {
        width: 100%;
    }
    
    .input-field input {
        width: 100%;
        font-size: 0.9rem;
        padding: 12px 16px;
    }
    
    .btn-claim {
        width: 100%;
        padding: 16px;
        font-size: 0.9rem;
    }
    
    .token-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .token-card {
        padding: 0.75rem;
    }
    
    .claim-fee-section,
    .wallet-section {
        padding: 12px;
    }
}