@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
    color: #ffffff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 1;
}

.modal-content h2 {
    font-size: 2em;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.modal-content p {
    font-size: 1.1em;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #aaa;
    font-weight: 400;
}

.btn {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.btn:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.2);
}

/* Loading Styles */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading p {
    font-size: 1.1em;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: #ccc;
}

/* Stickers Grid */
.stickers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 2px;
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    padding: 2px;
}

.sticker-card {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.sticker-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sticker-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
    z-index: 10;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

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

.sticker-card:hover .sticker-info {
    opacity: 1;
}

.sticker-image {
    width: 80%;
    height: 80%;
    object-fit: contain;
    transition: filter 0.2s ease;
}

.sticker-placeholder {
    width: 80%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.15);
    transition: color 0.2s ease;
}

.sticker-card:hover .sticker-placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.sticker-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 10px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sticker-name {
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 3px;
    letter-spacing: -0.01em;
}

.guild-name {
    font-size: 0.75em;
    color: #999;
    font-weight: 400;
}

/* Error Styles */
.error {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 30px;
    text-align: center;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

/* Responsive */
@media (max-width: 768px) {
    .stickers-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .modal-content {
        margin: 20px;
        padding: 30px;
    }
}

@media (min-width: 1920px) {
    .stickers-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}
