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

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background-color: #f8f8f8;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    width: 100%;
}

.meme-section {
    text-align: center;
    margin-bottom: 20px;
}

.meme-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.search-title {
    text-align: center;
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.grid-item {
    aspect-ratio: 1;
    background-color: #e0e0e0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.grid-item:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.grid-item.empty {
    background-color: #d0d0d0;
}

.item-image {
    width: 70%;
    height: 50%;
    object-fit: contain;
    margin-bottom: 4px;
}

.item-value {
    font-size: 11px;
    font-weight: bold;
    color: #333;
}

.item-name {
    font-size: 10px;
    color: #666;
    text-align: center;
    margin-top: 2px;
}

.quality-green { background-color: #90EE90; }
.quality-blue { background-color: #87CEEB; }
.quality-purple { background-color: #DDA0DD; }
.quality-gold { background-color: #FFD700; }
.quality-red { background-color: #FFB6C1; }

.total-value {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-pink {
    background: linear-gradient(135deg, #FF69B4, #FF1493);
}

.btn-blue {
    background: linear-gradient(135deg, #87CEEB, #4682B4);
}

.btn-green {
    background: linear-gradient(135deg, #90EE90, #32CD32);
}

.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.records-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.records-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.records-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.records-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.search-count {
    color: #666;
    font-size: 16px;
}

.records-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.record-item {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.record-item.quality-green {
    background: linear-gradient(135deg, #90EE90, #7CFC00);
}

.record-item.quality-blue {
    background: linear-gradient(135deg, #87CEEB, #00BFFF);
}

.record-item.quality-purple {
    background: linear-gradient(135deg, #DDA0DD, #9370DB);
}

.record-item.quality-gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.record-item.quality-red {
    background: linear-gradient(135deg, #FFB6C1, #FF6347);
}

.record-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.item-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.item-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.item-quantity {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    min-width: 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.records-footer {
    text-align: center;
    border-top: 2px solid #f0f0f0;
    padding-top: 15px;
}

.total-value-display {
    font-size: 20px;
    font-weight: bold;
    color: #333;
} 