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

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: url('images/back.png') center/cover no-repeat;
    overflow: hidden;
}

/* Oiseau */
.bird-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    animation: birdFloat 3s ease-in-out infinite;
}

.bird-image {
    width: 150px;
    height: auto;
    max-width: 150px;
}

/* Titre SOMINI */
.title-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
}

.main-title {
    font-size: 6rem;
    font-weight: 700;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

/* Container boutons et liens sociaux */
.buttons-social-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Deuxième page - Chart Page */
.chart-page {
    min-height: 100vh;
    background: url('images/back.png') center/cover no-repeat;
    padding: 40px 20px;
    position: relative;
}

.chart-page .chart-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.chart-page .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.chart-page .chart-header h2 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.chart-page .chart-controls {
    display: flex;
    gap: 10px;
}

.chart-page .chart-period-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.chart-page .chart-period-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.chart-page .chart-period-btn.active {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    border-color: #4CAF50;
}

.chart-page .gecko-widget {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-page .gecko-widget iframe {
    border-radius: 10px;
    background: transparent;
    transition: all 0.3s ease;
}

.chart-page .gecko-widget iframe:hover {
    transform: scale(1.01);
}

.chart-page .chart-actions {
    margin-top: 20px;
    text-align: center;
}

.chart-page .chart-actions .btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.chart-page .chart-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.4);
}


/* Boutons */
.buttons-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.4);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

/* Mobile touch states */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    .btn:active {
        transform: scale(0.95);
        box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    }
}

.btn-primary {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.btn-secondary {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.btn-tertiary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
}

.btn-meme {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    position: relative;
    overflow: hidden;
}

.btn-meme::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;
}

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

.btn-meme:hover {
    box-shadow: 0 10px 25px rgba(155, 89, 182, 0.4);
    transform: translateY(-3px) scale(1.05);
}


.btn-secondary:hover {
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Liens sociaux */
.social-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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


/* Animations */
@keyframes birdFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}


/* Page Chart */
.chart-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
}

.chart-page .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.chart-page .chart-header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Section Chart */
.chart-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

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

.chart-header h2 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.chart-controls {
    display: flex;
    gap: 10px;
}

.chart-period-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.chart-period-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.chart-period-btn.active {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    border-color: #4CAF50;
}

.chart-widget {
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 20px;
    min-height: 400px;
}

.chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
    border-radius: 15px;
}

.chart-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.chart-content {
    position: relative;
    height: 400px;
}

.chart-actions {
    margin-top: 20px;
    text-align: center;
}

.chart-actions .btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.chart-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.4);
}

/* GeckoTerminal Widget */
.gecko-widget {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gecko-widget iframe {
    border-radius: 10px;
    background: transparent;
    transition: all 0.3s ease;
}

.gecko-widget iframe:hover {
    transform: scale(1.01);
}

/* Responsive Design - Mobile First Approach */

/* Tablets and small laptops */
@media (max-width: 1024px) {
    .main-title {
        font-size: 5rem;
    }
    
    .buttons-container {
        gap: 15px;
    }
    
    .btn {
        padding: 14px 28px;
        font-size: 1.05rem;
    }
    
    .bird-image {
        width: 130px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .main-title {
        font-size: 4rem;
        letter-spacing: 1px;
        margin-bottom: 15px;
    }
    
    .title-container {
        top: 45%;
    }
    
    .buttons-container {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 300px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
        width: 100%;
        text-align: center;
    }
    
    .bird-image {
        width: 120px;
    }
    
    .bird-container {
        bottom: 15px;
        right: 15px;
    }
    
    .buttons-social-container {
        bottom: 15px;
        gap: 15px;
    }
    
    .social-links {
        gap: 15px;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
    }
    
    .social-icon {
        width: 22px;
        height: 22px;
    }
    
    .chart-page {
        padding: 20px 10px;
    }
    
    .chart-page .chart-container {
        padding: 20px;
    }
    
    .chart-page .chart-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .chart-page .chart-header h2 {
        font-size: 1.5rem;
    }
    
    .chart-page .chart-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .chart-page .gecko-widget iframe {
        height: 400px;
    }
    
    .chart-page .chart-actions .btn {
        margin: 5px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .main-title {
        font-size: 3rem;
        letter-spacing: 0.5px;
        margin-bottom: 10px;
    }
    
    .title-container {
        top: 40%;
        padding: 0 20px;
    }
    
    .buttons-container {
        gap: 10px;
        max-width: 280px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-height: 44px; /* Touch target minimum */
    }
    
    .bird-image {
        width: 100px;
    }
    
    .bird-container {
        bottom: 10px;
        right: 10px;
    }
    
    .buttons-social-container {
        bottom: 10px;
        gap: 12px;
    }
    
    .social-links {
        gap: 12px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .social-icon {
        width: 20px;
        height: 20px;
    }
    
    .chart-page {
        padding: 15px 5px;
    }
    
    .chart-page .chart-container {
        padding: 15px;
        border-radius: 15px;
    }
    
    .chart-page .chart-header h2 {
        font-size: 1.3rem;
    }
    
    .chart-page .gecko-widget iframe {
        height: 350px;
    }
    
    .chart-page .chart-actions .btn {
        display: block;
        margin: 10px auto;
        width: fit-content;
        min-width: 200px;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .buttons-container {
        max-width: 250px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .bird-image {
        width: 80px;
    }
    
    .chart-page .chart-container {
        padding: 10px;
    }
    
    .chart-page .chart-header h2 {
        font-size: 1.2rem;
    }
    
    .chart-page .gecko-widget iframe {
        height: 300px;
    }
}

/* PFP Generator Page */
.pfp-generator-page {
    min-height: 100vh;
    background: url('images/back.png') center/cover no-repeat;
    padding: 40px 20px;
    position: relative;
}

.pfp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.pfp-header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.pfp-container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.upload-section {
    text-align: center;
    margin-bottom: 40px;
}

.upload-area {
    border: 3px dashed rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 60px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.upload-area:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

.upload-area.drag-over {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.upload-content h3 {
    color: white;
    font-size: 1.5rem;
    margin: 20px 0 10px 0;
}

.upload-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-btn {
    padding: 15px 30px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.4);
}

.preview-section {
    text-align: center;
}

.preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.original-preview, .filtered-preview {
    text-align: center;
}

.original-preview h3, .filtered-preview h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.original-preview canvas, .filtered-preview canvas {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    background: white;
}

.arrow {
    font-size: 2rem;
    color: white;
    font-weight: bold;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.controls .btn {
    margin: 0;
}

/* Responsive PFP Generator */
@media (max-width: 1024px) {
    .pfp-container {
        padding: 30px;
    }
    
    .upload-area {
        padding: 50px 30px;
    }
    
    .preview-container {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .pfp-generator-page {
        padding: 20px 10px;
    }
    
    .pfp-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .pfp-header h1 {
        font-size: 2rem;
    }
    
    .pfp-container {
        padding: 20px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-content h3 {
        font-size: 1.3rem;
    }
    
    .upload-content p {
        font-size: 0.9rem;
    }
    
    .preview-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .arrow {
        transform: rotate(90deg);
        font-size: 1.5rem;
    }
    
    .original-preview canvas, .filtered-preview canvas {
        max-width: 200px;
        height: auto;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .controls .btn {
        width: 200px;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .pfp-generator-page {
        padding: 15px 5px;
    }
    
    .pfp-header h1 {
        font-size: 1.8rem;
    }
    
    .pfp-container {
        padding: 15px;
        border-radius: 15px;
    }
    
    .upload-area {
        padding: 30px 15px;
        border-radius: 15px;
    }
    
    .upload-content h3 {
        font-size: 1.2rem;
    }
    
    .upload-content p {
        font-size: 0.85rem;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .original-preview canvas, .filtered-preview canvas {
        max-width: 150px;
    }
    
    .original-preview h3, .filtered-preview h3 {
        font-size: 1rem;
    }
    
    .controls .btn {
        width: 180px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .pfp-header h1 {
        font-size: 1.6rem;
    }
    
    .pfp-container {
        padding: 10px;
    }
    
    .upload-area {
        padding: 25px 10px;
    }
    
    .original-preview canvas, .filtered-preview canvas {
        max-width: 120px;
    }
    
    .controls .btn {
        width: 160px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* Main Canvas Container */
.main-canvas-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: 20px 0;
}

.canvas-header {
    text-align: center;
    color: white;
}

.canvas-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.canvas-header p {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Canvas Workspace */
.canvas-workspace {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* Interactive Hoodie Controls */
.interactive-canvas-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid #ff6b6b;
    border-radius: 20px;
    padding: 20px;
    background: rgba(255, 107, 107, 0.15);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.4);
    backdrop-filter: blur(10px);
    width: calc(100vw - 360px);
    max-width: 1000px;
    height: 80vh;
    margin: 20px auto;
    margin-right: 340px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #ff6b6b rgba(255, 107, 107, 0.3);
}

.interactive-canvas-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.interactive-canvas-container::-webkit-scrollbar-track {
    background: rgba(255, 107, 107, 0.1);
    border-radius: 6px;
}

.interactive-canvas-container::-webkit-scrollbar-thumb {
    background: #ff6b6b;
    border-radius: 6px;
}

.interactive-canvas-container::-webkit-scrollbar-thumb:hover {
    background: #ee5a24;
}

.interactive-canvas-container canvas {
    border-radius: 15px;
    cursor: grab;
    display: block;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin: 0 auto;
}

.interactive-canvas-container canvas:active {
    cursor: grabbing;
}

/* Hoodie Selection */
.hoodie-selection {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #ff6b6b;
}

.hoodie-selection h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.hoodie-options {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.hoodie-option {
    cursor: pointer;
    padding: 15px;
    border-radius: 10px;
    background: rgba(255, 107, 107, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
}

.hoodie-option:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
    transform: translateY(-5px);
}

.hoodie-option.selected {
    background: rgba(255, 107, 107, 0.3);
    border-color: #ff6b6b;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

.hoodie-option img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.hoodie-option span {
    display: block;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Size Controls */
.size-controls {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #ff6b6b;
    min-width: 250px;
    height: fit-content;
}

.size-slider-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.size-slider-container label {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
}

.size-slider {
    width: 200px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 107, 107, 0.3);
    outline: none;
    -webkit-appearance: none;
}

.size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff6b6b;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    transition: all 0.3s ease;
}

.size-slider::-webkit-slider-thumb:hover {
    background: #ee5a24;
    transform: scale(1.1);
}

.size-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff6b6b;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

#sizeValue {
    color: #ff6b6b;
    font-weight: 700;
    font-size: 1.2rem;
    background: rgba(255, 107, 107, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #ff6b6b;
}

/* AI Controls */
.ai-controls {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 107, 107, 0.3);
    text-align: center;
}

.btn-ai {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    margin-bottom: 10px;
}

.btn-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

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

.btn-ai:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ai-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.api-key-input {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.api-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ff6b6b;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.9rem;
}

.api-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#setupApiBtn {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#setupApiBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* Simple Control Panel */
.simple-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    max-height: calc(100vh - 40px);
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95), rgba(15, 52, 96, 0.95));
    border: 3px solid #ff6b6b;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(255, 107, 107, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 1000;
    backdrop-filter: blur(15px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ff6b6b rgba(255, 107, 107, 0.3);
}

.simple-controls h3 {
    color: #ff6b6b;
    text-align: center;
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    font-weight: 800;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.control-group {
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 142, 83, 0.1));
    border-radius: 12px;
    border: 2px solid rgba(255, 107, 107, 0.3);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.control-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b6b, #ff8e53, #ff6b6b);
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group h4 {
    color: #ff8e53;
    margin: 0 0 18px 0;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.btn-control {
    background: linear-gradient(145deg, #ff6b6b, #ee5a24, #ff8e53);
    border: none;
    color: white;
    padding: 18px;
    border-radius: 12px;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 800;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

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

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

.btn-control:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-control:active {
    transform: translateY(-1px) scale(1.02);
}

.size-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.size-presets {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-preset {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
}

.btn-preset:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
}

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

.btn-size {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    color: white;
    padding: 8px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.8rem;
}

.btn-size:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 107, 107, 0.3);
    outline: none;
    -webkit-appearance: none;
    margin: 10px 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff6b6b;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff6b6b;
    cursor: pointer;
    border: none;
}

#sizeDisplay {
    color: #ff6b6b;
    font-weight: bold;
    text-align: center;
    display: block;
    margin-top: 5px;
}

.hoodie-buttons {
    display: flex;
    gap: 10px;
}

.btn-hoodie {
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid rgba(255, 107, 107, 0.5);
    color: white;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    font-size: 18px;
    font-weight: bold;
}

.btn-hoodie:hover {
    background: rgba(255, 107, 107, 0.3);
    border-color: #ff6b6b;
    transform: translateY(-2px);
}

.btn-hoodie.selected {
    background: rgba(255, 107, 107, 0.5);
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-action {
    background: linear-gradient(45deg, #28a745, #20c997);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

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

/* Scrollbar for simple controls */
.simple-controls::-webkit-scrollbar {
    width: 8px;
}

.simple-controls::-webkit-scrollbar-track {
    background: rgba(255, 107, 107, 0.1);
    border-radius: 4px;
}

.simple-controls::-webkit-scrollbar-thumb {
    background: #ff6b6b;
    border-radius: 4px;
}

.simple-controls::-webkit-scrollbar-thumb:hover {
    background: #ee5a24;
}

/* Responsive adjustments for PFP Generator Controls */
@media (max-width: 1200px) {
    .simple-controls {
        width: 280px;
        right: 10px;
    }
    
    .interactive-canvas-container {
        width: calc(100vw - 320px);
        margin-right: 300px;
    }
}

@media (max-width: 768px) {
    .simple-controls {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 50vh;
        border-radius: 20px 20px 0 0;
        border-right: none;
        border-top: 3px solid #ff6b6b;
        max-height: 50vh;
        overflow-y: auto;
    }
    
    .interactive-canvas-container {
        width: 90vw;
        height: 50vh;
        margin: 20px auto;
        margin-right: auto;
        margin-bottom: 50vh;
    }
    
    .size-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .control-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .control-group {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .control-group h4 {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .btn-control {
        padding: 14px;
        font-size: 18px;
    }
    
    .btn-preset {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .btn-size {
        padding: 6px 4px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .simple-controls {
        height: 60vh;
        max-height: 60vh;
    }
    
    .interactive-canvas-container {
        width: 95vw;
        height: 40vh;
        margin-bottom: 60vh;
    }
    
    .size-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
    
    .control-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .control-group {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .control-group h4 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .btn-control {
        padding: 12px;
        font-size: 16px;
    }
    
    .btn-preset {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
    
    .btn-size {
        padding: 5px 3px;
        font-size: 0.7rem;
    }
    
    .slider {
        height: 6px;
    }
    
    .slider::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
    }
    
    .slider::-moz-range-thumb {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 360px) {
    .simple-controls {
        height: 65vh;
        max-height: 65vh;
    }
    
    .interactive-canvas-container {
        width: 98vw;
        height: 35vh;
        margin-bottom: 65vh;
    }
    
    .size-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .control-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .btn-control {
        padding: 10px;
        font-size: 14px;
    }
    
    .btn-preset {
        padding: 4px 6px;
        font-size: 0.65rem;
    }
    
    .btn-size {
        padding: 4px 2px;
        font-size: 0.65rem;
    }
}

.fixed-control-panel::-webkit-scrollbar {
    width: 8px;
}

.fixed-control-panel::-webkit-scrollbar-track {
    background: rgba(255, 107, 107, 0.1);
    border-radius: 4px;
}

.fixed-control-panel::-webkit-scrollbar-thumb {
    background: #ff6b6b;
    border-radius: 4px;
}

.fixed-control-panel::-webkit-scrollbar-thumb:hover {
    background: #ee5a24;
}

.control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid rgba(255, 107, 107, 0.3);
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border-radius: 18px 18px 0 0;
}

.control-header h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.control-sections {
    padding: 20px;
}

.control-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 107, 107, 0.2);
}

.control-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.control-section h4 {
    color: #ff6b6b;
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.control-row label {
    color: white;
    font-weight: 500;
    min-width: 60px;
    font-size: 0.9rem;
}

.control-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.control-input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.control-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.control-btn-large {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 8px;
}

.control-btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

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

.control-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 107, 107, 0.3);
    outline: none;
    -webkit-appearance: none;
    margin: 0 10px;
}

.control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff6b6b;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.5);
    transition: all 0.3s ease;
}

.control-slider::-webkit-slider-thumb:hover {
    background: #ee5a24;
    transform: scale(1.1);
}

.control-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff6b6b;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.5);
}

.control-row span {
    color: #ff6b6b;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 50px;
    text-align: center;
}

.control-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff6b6b;
    cursor: pointer;
}

.control-row input[type="checkbox"] + span {
    color: white;
    font-size: 0.9rem;
    margin-left: 8px;
}

/* Direction buttons */
.direction-buttons {
    display: flex;
    gap: 5px;
}

/* Quick move controls */
.quick-move {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.quick-resize {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.rotation-controls {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.control-btn-small {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.control-btn-small:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.control-btn-small:active {
    transform: translateY(0) scale(0.95);
}

/* Enhanced control sections */
.control-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 107, 107, 0.2);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    padding: 15px;
}

.control-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Improved sliders */
.control-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 107, 107, 0.3);
    outline: none;
    -webkit-appearance: none;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.control-slider:hover {
    background: rgba(255, 107, 107, 0.5);
}

.control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    transition: all 0.3s ease;
}

.control-slider::-webkit-slider-thumb:hover {
    background: linear-gradient(45deg, #ee5a24, #ff6b6b);
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.7);
}

.control-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

/* Enhanced inputs */
.control-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.control-input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.4);
    background: rgba(0, 0, 0, 0.7);
}

.control-input:hover {
    border-color: rgba(255, 107, 107, 0.6);
}

/* Hoodie Switch Controls */
.hoodie-switch {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.hoodie-switch-btn {
    background: rgba(255, 107, 107, 0.1);
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 80px;
}

.hoodie-switch-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.hoodie-switch-btn.selected {
    background: rgba(255, 107, 107, 0.3);
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.hoodie-switch-btn img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.hoodie-switch-btn span {
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .fixed-control-panel {
        width: 300px;
        right: 10px;
    }
}

@media (max-width: 768px) {
    .fixed-control-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 50vh;
        transform: none;
        border-radius: 20px 20px 0 0;
    }
    
    .control-sections {
        padding: 15px;
    }
    
    .control-section {
        margin-bottom: 20px;
    }
    
    .control-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .control-row label {
        min-width: auto;
        font-size: 0.85rem;
    }
    
    .control-input {
        width: 100%;
        font-size: 0.85rem;
    }
    
    .control-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .control-btn-large {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .control-slider {
        margin: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .fixed-control-panel {
        max-height: 60vh;
    }
    
    .control-sections {
        padding: 12px;
    }
    
    .control-section {
        margin-bottom: 15px;
        padding: 12px;
    }
    
    .control-section h4 {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .control-row {
        gap: 6px;
    }
    
    .control-row label {
        font-size: 0.8rem;
    }
    
    .control-input {
        font-size: 0.8rem;
        padding: 8px 10px;
    }
    
    .control-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .control-btn-large {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .control-slider {
        height: 6px;
    }
    
    .control-slider::-webkit-slider-thumb {
        width: 16px;
        height: 16px;
    }
    
    .control-slider::-moz-range-thumb {
        width: 16px;
        height: 16px;
    }
    
    .control-row span {
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .fixed-control-panel {
        max-height: 65vh;
    }
    
    .control-sections {
        padding: 10px;
    }
    
    .control-section {
        margin-bottom: 12px;
        padding: 10px;
    }
    
    .control-section h4 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .control-row {
        gap: 5px;
    }
    
    .control-row label {
        font-size: 0.75rem;
    }
    
    .control-input {
        font-size: 0.75rem;
        padding: 6px 8px;
    }
    
    .control-btn {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
    
    .control-btn-large {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .control-row span {
        font-size: 0.75rem;
    }
}

.hoodie-controls {
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    z-index: 100;
}

.control-info {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.control-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-small {
    padding: 6px 12px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Hoodie Selection Box */
.hoodie-selection-box {
    position: absolute;
    border: 2px dashed #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    pointer-events: none;
    z-index: 50;
}

.hoodie-resize-handles {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ff6b6b;
    border: 2px solid white;
    border-radius: 50%;
    pointer-events: all;
    cursor: pointer;
}

.hoodie-resize-handles.nw { top: -4px; left: -4px; cursor: nw-resize; }
.hoodie-resize-handles.ne { top: -4px; right: -4px; cursor: ne-resize; }
.hoodie-resize-handles.sw { bottom: -4px; left: -4px; cursor: sw-resize; }
.hoodie-resize-handles.se { bottom: -4px; right: -4px; cursor: se-resize; }

/* ========================================
   MEME PAGE - DYNAMIC & STYLISH
   ======================================== */

.meme-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ff6b6b 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.meme-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    animation: grainMove 20s linear infinite;
}

@keyframes grainMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100px, -100px); }
}

.meme-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.meme-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.meme-title {
    font-size: 4rem;
    font-weight: 900;
    margin: 0;
    position: relative;
    display: inline-block;
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.meme-text {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53, #ff6b6b, #ff8e53);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255, 107, 107, 0.5);
}

@keyframes textShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.meme-subtitle {
    display: block;
    font-size: 1.5rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 10px;
    letter-spacing: 8px;
    animation: subtitleFloat 3s ease-in-out infinite;
}

@keyframes subtitleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.meme-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-top: 20px;
    font-weight: 300;
}

.meme-gallery {
    margin-bottom: 60px;
}

.meme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.meme-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
    animation: itemFloat 6s ease-in-out infinite;
}

.meme-item:nth-child(odd) {
    animation-delay: -2s;
}

.meme-item:nth-child(even) {
    animation-delay: -4s;
}

@keyframes itemFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(1deg); }
    50% { transform: translateY(-5px) rotate(-1deg); }
    75% { transform: translateY(-15px) rotate(0.5deg); }
}

.meme-item:hover {
    transform: translateY(-20px) scale(1.05) rotate(2deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 107, 107, 0.6);
}

.meme-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.meme-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
    filter: brightness(0.9) contrast(1.1);
}

.meme-item:hover .meme-image img {
    transform: scale(1.1);
    filter: brightness(1) contrast(1.2);
}

.meme-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.8), rgba(255, 142, 83, 0.8));
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meme-item:hover .meme-overlay {
    opacity: 1;
}

.meme-actions {
    display: flex;
    gap: 15px;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.meme-item:hover .meme-actions {
    transform: translateY(0);
}

.meme-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.meme-btn:hover {
    transform: scale(1.2) rotate(10deg);
    background: #ff6b6b;
    color: white;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

.meme-btn:active {
    transform: scale(0.9);
}

.meme-info {
    padding: 20px;
    color: white;
}

.meme-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.meme-info p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 15px 0;
    font-size: 0.9rem;
}

.meme-stats {
    display: flex;
    gap: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.meme-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meme-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

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

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

.filter-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: rgba(255, 107, 107, 0.3);
    border-color: #ff6b6b;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

.filter-btn.active {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    border-color: #ff6b6b;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
    transform: scale(1.1);
}


/* Responsive Meme Page */
@media (max-width: 1024px) {
    .meme-page {
        padding: 30px 15px;
    }
    
    .meme-title {
        font-size: 3.5rem;
    }
    
    .meme-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }
    
    .meme-item {
        animation-duration: 8s;
    }
}

@media (max-width: 768px) {
    .meme-page {
        padding: 20px 10px;
    }
    
    .meme-title {
        font-size: 2.5rem;
    }
    
    .meme-subtitle {
        font-size: 1rem;
        letter-spacing: 4px;
    }
    
    .meme-description {
        font-size: 1rem;
    }
    
    .meme-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .meme-item {
        animation: none;
    }
    
    .meme-item:hover {
        transform: translateY(-10px) scale(1.02);
    }
    
    .meme-filters {
        gap: 10px;
        margin-bottom: 40px;
    }
    
    .filter-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .meme-image {
        height: 200px;
    }
    
    .meme-info {
        padding: 15px;
    }
    
    .meme-info h3 {
        font-size: 1.1rem;
    }
    
    .meme-info p {
        font-size: 0.8rem;
    }
    
    .meme-stats {
        gap: 15px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .meme-page {
        padding: 15px 5px;
    }
    
    .meme-title {
        font-size: 2rem;
    }
    
    .meme-subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
    
    .meme-description {
        font-size: 0.9rem;
    }
    
    .meme-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .meme-item {
        border-radius: 15px;
    }
    
    .meme-image {
        height: 180px;
    }
    
    .meme-info {
        padding: 12px;
    }
    
    .meme-info h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .meme-info p {
        font-size: 0.75rem;
        margin-bottom: 10px;
    }
    
    .meme-stats {
        gap: 12px;
        font-size: 0.7rem;
    }
    
    .meme-filters {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-bottom: 30px;
    }
    
    .filter-btn {
        width: 200px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .meme-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .meme-actions {
        gap: 10px;
    }
}

@media (max-width: 360px) {
    .meme-page {
        padding: 10px 5px;
    }
    
    .meme-title {
        font-size: 1.8rem;
    }
    
    .meme-subtitle {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
    
    .meme-description {
        font-size: 0.8rem;
    }
    
    .meme-grid {
        gap: 12px;
    }
    
    .meme-image {
        height: 160px;
    }
    
    .meme-info {
        padding: 10px;
    }
    
    .meme-info h3 {
        font-size: 0.9rem;
    }
    
    .meme-info p {
        font-size: 0.7rem;
    }
    
    .meme-stats {
        gap: 10px;
        font-size: 0.65rem;
    }
    
    .filter-btn {
        width: 180px;
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .meme-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Leaderboard Button */
.btn-leaderboard {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    position: relative;
    overflow: hidden;
}

.btn-leaderboard::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;
}

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

.btn-leaderboard:hover {
    box-shadow: 0 10px 25px rgba(243, 156, 18, 0.4);
    transform: translateY(-3px) scale(1.05);
}

/* Leaderboard Section */
.leaderboard-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ff6b6b 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    padding: 60px 20px;
}

.leaderboard-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.leaderboard-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.leaderboard-text {
    background: linear-gradient(45deg, #667eea, #764ba2, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.leaderboard-subtitle {
    color: #666;
    font-size: 1.2rem;
    font-weight: normal;
    margin-left: 10px;
}

.leaderboard-description {
    color: #666;
    font-size: 1.1rem;
    margin-top: 10px;
}

.leaderboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.leaderboard-list {
    margin-bottom: 40px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.leaderboard-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.leaderboard-item.first::before {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
}

.leaderboard-item.second::before {
    background: linear-gradient(45deg, #c0c0c0, #e5e5e5);
}

.leaderboard-item.third::before {
    background: linear-gradient(45deg, #cd7f32, #daa520);
}

.leaderboard-item .rank {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-right: 20px;
    min-width: 60px;
    text-align: center;
}

.leaderboard-item.first .rank {
    color: #ffd700;
}

.leaderboard-item.second .rank {
    color: #c0c0c0;
}

.leaderboard-item.third .rank {
    color: #cd7f32;
}

.leaderboard-item .user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 20px;
    border: 3px solid #667eea;
    object-fit: cover;
}

.leaderboard-item .user-info {
    flex: 1;
}

.leaderboard-item .username {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.leaderboard-item .display-name {
    color: #666;
    font-size: 1rem;
    margin-bottom: 10px;
}

.leaderboard-item .user-stats {
    color: #888;
    font-size: 0.9rem;
}

.leaderboard-item .points {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff6b6b;
    margin-left: auto;
}

.leaderboard-cta {
    text-align: center;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 40px;
    border-radius: 15px;
}

.leaderboard-cta h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.leaderboard-cta p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cta-buttons .btn-primary {
    background: white;
    color: #667eea;
}

.cta-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

.cta-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.cta-buttons .btn-secondary:hover {
    background: white;
    color: #667eea;
}

@media (max-width: 768px) {
    .leaderboard-container {
        padding: 20px;
    }
    
    .leaderboard-title {
        font-size: 2rem;
    }
    
    .leaderboard-item {
        flex-direction: column;
        text-align: center;
    }
    
    .leaderboard-item .points {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}
