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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    overflow-x: hidden;
}

/* Header Section with Grid Background */
.header {
    padding: 60px 40px 40px;
    text-align: center;
    background-color: #ffffff;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 120px 120px;
    position: relative;
}

.title {
    font-size: 200px;
    font-weight: 900;
    letter-spacing: -8px;
    color: #000000;
    text-transform: uppercase;
    margin-bottom: 30px;
    line-height: 1;
}

/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-top: 30px;
}

.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: #333333;
    transform: translateY(-3px);
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

.social-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* Gallery Sections with Grid Background */
.gallery-section {
    width: 100%;
    overflow: hidden;
    background-color: #ffffff;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 120px 120px;
    padding: 30px 0;
}

.gallery-container {
    width: 100%;
    overflow: hidden;
}

.gallery-track {
    display: flex;
    gap: 10px;
    animation: scroll 20s linear infinite;
    will-change: transform;
}

.gallery-track.reverse {
    animation: scrollReverse 20s linear infinite;
}

.gallery-image {
    height: 250px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.33%);
    }
}

@keyframes scrollReverse {
    0% {
        transform: translateX(-33.33%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Subtitle Section with Grid Background */
.subtitle-section {
    background-color: #ffffff;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 120px 120px;
    padding: 50px 40px 50px;
    text-align: center;
    margin-bottom: 0;
}

.subtitle {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #000000;
    margin-bottom: 25px;
}

.dots {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 25px;
}

.dot {
    width: 14px;
    height: 14px;
    background-color: #000000;
    border-radius: 50%;
}

/* Quote Section - Full Width */
.quote-section {
    background-color: #1a1a1a;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
}

.quote-image {
    width: 100%;
    height: 100vh;
    object-fit: contain;
    object-position: center;
}

/* PFP Generator Section */
.pfp-generator-section {
    background-color: #1a1a1a;
    padding: 80px 40px;
    min-height: 100vh;
}

.pfp-title {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: 60px;
    color: #ffffff;
}

.pfp-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Left Side: Canvas Preview */
.pfp-preview {
    background-color: #2a2a2a;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 20px;
}

#pfpCanvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background-color: #ffffff;
}

/* Right Side: Trait Selection */
.pfp-controls {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #333333;
}

.tab-btn {
    flex: 1;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: transparent;
    color: #666666;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.tab-btn:hover {
    color: #aaaaaa;
}

.tab-btn.active {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Trait Grid */
.trait-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    max-height: 600px;
    overflow-y: auto;
    padding: 20px 10px;
}

.trait-grid::-webkit-scrollbar {
    width: 8px;
}

.trait-grid::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

.trait-grid::-webkit-scrollbar-thumb {
    background: #444444;
    border-radius: 4px;
}

.trait-grid::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* Trait Item */
.trait-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background-color: #2a2a2a;
    position: relative;
}

.trait-item:hover {
    border-color: #666666;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.trait-item.selected {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px #1a1a1a, 0 0 0 5px #ffffff;
}

.trait-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.trait-item .trait-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    font-size: 11px;
    padding: 8px 6px 6px;
    text-align: center;
    font-weight: 600;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    flex: 1;
    padding: 18px 28px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-random {
    background-color: #4a4a4a;
    color: #ffffff;
}

.btn-random:hover {
    background-color: #5a5a5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.btn-download {
    background-color: #ffffff;
    color: #000000;
}

.btn-download:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .pfp-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .pfp-preview {
        position: static;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 120px;
        letter-spacing: -5px;
    }
    
    .subtitle {
        font-size: 28px;
    }
    
    .pfp-title {
        font-size: 40px;
    }
    
    .gallery-image {
        height: 150px;
    }
    
    .social-icons {
        gap: 15px;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
    }
    
    .social-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .trait-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        max-height: 400px;
    }
    
    .button-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 80px;
        letter-spacing: -3px;
    }
    
    .subtitle {
        font-size: 20px;
        letter-spacing: 1px;
    }
    
    .pfp-title {
        font-size: 32px;
    }
    
    .gallery-image {
        height: 120px;
    }
    
    .trait-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }
}
