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

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.header::before {
    content: '⚡⚡⚡';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    color: #FFD700;
    animation: lightning 2s infinite alternate;
}

@keyframes lightning {
    0% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    100% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.title {
    font-family: 'Bangers', cursive;
    font-size: 3.5rem;
    background: linear-gradient(45deg, #DC143C, #FFD700, #DC143C);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

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

.subtitle {
    font-size: 1.2rem;
    color: #cccccc;
    margin-top: 10px;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Logo Selection */
.logo-selection h2 {
    color: #FFD700;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.logo-grid {
    display: grid;
    gap: 15px;
}

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

.logo-card:hover {
    border-color: #FFD700;
    background: rgba(255,215,0,0.1);
    transform: translateY(-3px);
}

.logo-card.selected {
    border-color: #DC143C;
    background: rgba(220,20,60,0.2);
    box-shadow: 0 0 15px rgba(220,20,60,0.5);
}

.logo-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.logo-name {
    font-size: 0.9rem;
    font-weight: bold;
    color: #ffffff;
}

/* Canvas Area */
.canvas-area {
    text-align: center;
}

.canvas-container {
    position: relative;
    display: inline-block;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

#canvas {
    border: 2px solid #FFD700;
    border-radius: 5px;
    background: #000000;
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.canvas-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    pointer-events: none;
    display: none;
}

.grid-cell {
    border: 1px solid rgba(255,215,0,0.3);
    display: inline-block;
}

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

.control-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid #FFD700;
    color: #ffffff;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255,215,0,0.2);
    border-color: #DC143C;
}

.regenerate-btn {
    background: linear-gradient(45deg, #DC143C, #FF6B6B);
}

.regenerate-btn:hover {
    background: linear-gradient(45deg, #FF6B6B, #DC143C);
    transform: scale(1.05);
}

/* Customization Panel */
.customization-panel h3 {
    color: #FFD700;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.controls-grid {
    display: grid;
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: bold;
    color: #ffffff;
    font-size: 0.9rem;
}

.control-input {
    background: rgba(255,255,255,0.1);
    border: 1px solid #FFD700;
    color: #ffffff;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.control-input:focus {
    outline: none;
    border-color: #DC143C;
    background: rgba(220,20,60,0.1);
}

/* Generation Panel */
.generation-panel {
    grid-column: 1 / -1;
    text-align: center;
    margin: 30px 0;
}

.generate-btn {
    background: linear-gradient(45deg, #DC143C, #FFD700);
    border: none;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 15px 40px;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.generate-btn::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.6s;
}

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

.generate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(220,20,60,0.4);
}

.generate-btn.generating {
    background: #666666;
    cursor: not-allowed;
}

.loading-spinner {
    display: none;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.progress-bar {
    width: 300px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    margin: 15px auto 0;
    overflow: hidden;
    display: none;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #DC143C, #FFD700);
    width: 0%;
    transition: width 3s ease-in-out;
}

/* Export Panel */
.export-panel {
    grid-column: 1 / -1;
    text-align: center;
}

.export-panel h3 {
    color: #FFD700;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

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

.export-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid #FFD700;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.export-btn:hover {
    background: rgba(255,215,0,0.2);
    border-color: #DC143C;
    transform: translateY(-2px);
}

.twitter-btn {
    background: linear-gradient(45deg, #1DA1F2, #0077b3);
    border-color: #1DA1F2;
}

.twitter-btn:hover {
    background: linear-gradient(45deg, #0077b3, #1DA1F2);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px 0;
    border-top: 1px solid rgba(255,215,0,0.3);
    color: #cccccc;
    font-size: 0.9rem;
}

.footer a {
    color: #FFD700;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .canvas-container {
        max-width: 100%;
    }
    
    #canvas {
        max-width: 90vw;
        max-height: 90vw;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .export-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .export-btn {
        width: 250px;
    }
    
    .canvas-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .generate-btn {
        padding: 12px 25px;
        font-size: 1.1rem;
    }
    
    .logo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .logo-preview {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .logo-name {
        font-size: 0.8rem;
    }
}