* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --bg: #F9FAFB;
    --card-bg: #FFFFFF;
    --text: #1F2937;
    --text-light: #6B7280;
    --border: #E5E7EB;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.98) 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    padding: 10px;
    margin: 0;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

header h1 {
    font-size: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    margin: 0;
    flex: 1;
    min-width: 200px;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.lang-switch {
    display: flex;
    gap: 4px;
    background: rgba(243, 244, 246, 0.8);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.lang-btn {
    padding: 6px 14px;
    background: transparent;
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.lang-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.connect-btn, .disconnect-btn {
    padding: 12px 28px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.connect-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.connect-btn:hover::before {
    left: 100%;
}

.connect-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.connect-btn:active {
    transform: translateY(-1px);
}

.disconnect-btn {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    padding: 8px 18px;
    font-size: 13px;
    margin-left: 10px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.disconnect-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

.disconnect-btn:active {
    transform: translateY(-1px);
}

.account-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#accountAddress {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    border-radius: 10px;
    color: var(--text);
    border: 2px solid rgba(102, 126, 234, 0.2);
    font-weight: 600;
}

main {
    display: grid;
    gap: 20px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);
}

.card:hover::before {
    opacity: 1;
}

.card h2 {
    font-size: 20px;
    margin-bottom: 24px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h2 {
    margin-bottom: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    min-width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.15);
    border-left-width: 6px;
}

.contract-address-item {
    position: relative;
    padding-right: 50px;
}

.copy-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.copy-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.copy-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.copy-btn svg {
    display: block;
}

.label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 13px;
    flex-shrink: 0;
    margin-right: 8px;
}

.value {
    font-weight: 700;
    color: var(--text);
    font-size: 15px;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.value.highlight {
    color: var(--primary);
    font-size: 16px;
}

.value.small {
    font-size: 11px;
    font-family: 'Courier New', monospace;
}

.action-btn {
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

.action-btn:disabled {
    background: linear-gradient(135deg, #9CA3AF 0%, #6B7280 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-btn:disabled::before {
    display: none;
}

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

.claim-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.claim-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

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

.claim-card h2 {
    color: white;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.claim-tip {
    margin-bottom: 24px;
    opacity: 0.95;
    font-size: 15px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.claim-btn {
    width: 100%;
    padding: 18px 36px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.claim-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    transition: left 0.5s;
}

.claim-btn:hover::before {
    left: 100%;
}

.claim-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.claim-btn:active {
    transform: translateY(-1px) scale(1.01);
}

.claim-btn:disabled {
    background: rgba(255, 255, 255, 0.6);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.claim-btn:disabled::before {
    display: none;
}

.claim-info {
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-size: 14px;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    max-width: 400px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95) 0%, rgba(5, 150, 105, 0.95) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(217, 119, 6, 0.95) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    body {
        padding: 8px;
    }

    .container {
        max-width: 100%;
    }

    header {
        padding: 12px;
        margin-bottom: 16px;
    }

    header h1 {
        font-size: 18px;
        width: 100%;
        text-align: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .lang-switch {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }

    .connect-btn {
        width: 100%;
        padding: 10px 20px;
        font-size: 14px;
    }

    .account-info {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    #accountAddress {
        font-size: 12px;
        padding: 6px 12px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 150px;
    }

    .disconnect-btn {
        padding: 6px 12px;
        font-size: 12px;
        margin-left: 8px;
    }

    .card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .card h2 {
        font-size: 18px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .info-item {
        padding: 10px;
    }

    .label {
        font-size: 12px;
    }

    .value {
        font-size: 14px;
    }

    .value.highlight {
        font-size: 15px;
    }

    .value.small {
        font-size: 10px;
    }

    .card-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 14px;
    }

    .claim-btn {
        font-size: 16px;
        padding: 14px 24px;
    }

    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 16px;
    }

    .card h2 {
        font-size: 16px;
    }

    .label {
        font-size: 11px;
    }

    .value {
        font-size: 13px;
    }
}

.loading {
    animation: pulse 2s ease-in-out infinite, shimmer 2s linear infinite;
    position: relative;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

