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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
    color: #333;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

header {
    position: relative;
    text-align: center;
    margin: 0 auto 30px auto;
    background: white;
    padding: 20px 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 690px;
}

h1 {
    font-size: 1.8em;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.contract-link {
    font-size: 0.7em;
    color: #999;
    margin-bottom: 12px;
}

.contract-link a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contract-link a:hover {
    color: #333;
    text-decoration: underline;
}


.icon-btn {
    padding: 8px 14px;
    font-size: 0.72em;
    border: none;
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    z-index: 999;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    opacity: 0.95;
    gap: 6px;
    white-space: nowrap;
}

.icon-btn:hover:not(:disabled) {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
    opacity: 1;
}

.icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#connectWallet {
    top: 15px;
    right: 15px;
}

#refreshBtn {
    bottom: 15px;
    right: 15px;
}

.btn-regret {
    background: #ff6b6b;
    color: white;
    padding: 6px 16px;
    font-size: 0.8em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-regret:hover:not(:disabled) {
    background: #ff5252;
}

.btn-regret:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.warning {
    background: #fff3cd;
    color: #856404;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #ffeaa7;
    font-size: 0.85em;
}

.hidden {
    display: none;
}

.loading {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 0.75em;
    color: #333;
    padding: 10px 16px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-width: 250px;
    opacity: 0.95;
}

.nft-grid {
    display: grid;
    grid-template-columns: repeat(3, 220px);
    gap: 15px;
    padding: 15px;
    justify-content: center;
    max-width: 720px;
    margin: 0 auto;
}

.nft-card {
    transition: all 0.3s ease;
    width: 220px;
}

@keyframes cardUpdate {
    0% { opacity: 0.5; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

.nft-card.updating {
    animation: cardUpdate 0.4s ease;
}

.nft-image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.nft-card:hover .nft-image-container {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.nft-card.regret .nft-image-container {
    box-shadow: 0 0 0 2px #ff6b6b;
}

.nft-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.nft-info {
    padding: 10px 0 0 0;
    background: transparent;
}

.nft-title {
    display: none;
}

.nft-owner {
    font-size: 0.7em;
    color: #999;
    margin-bottom: 8px;
    line-height: 1.3;
    text-align: center;
}

.nft-owner a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nft-owner a:hover {
    color: #333;
    text-decoration: underline;
}

.nft-actions {
    margin-top: 0;
    display: flex;
    justify-content: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .nft-grid {
        grid-template-columns: repeat(2, 220px);
        max-width: 470px;
    }

    header {
        max-width: 470px;
        padding: 15px 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    .icon-btn {
        font-size: 0.65em;
        padding: 6px 10px;
    }

    #connectWallet {
        top: 10px;
        right: 10px;
    }

    #refreshBtn {
        bottom: 10px;
        right: 10px;
    }
}

@media (max-width: 520px) {
    .nft-grid {
        grid-template-columns: 220px;
        max-width: 240px;
    }

    header {
        max-width: 240px;
        padding: 12px 15px;
    }

    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.3em;
    }

    .contract-link {
        font-size: 0.6em;
    }

    .icon-btn {
        font-size: 0.6em;
        padding: 5px 8px;
    }
}
