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

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #1A1A2E 0%, #2A2A4A 100%);
    color: #E0E0E0;
    min-height: 100vh;
    padding: 20px;
}

#app {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-family: 'Bungee', cursive;
    font-size: 2.5em;
    color: #FFDA44;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    color: #E0E0E0;
    opacity: 0.9;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.tab {
    background: #2A2A4A;
    border: 2px solid #555588;
    color: #E0E0E0;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tab:hover {
    background: #3E3E6B;
    transform: translateY(-2px);
}

.tab.active {
    background: linear-gradient(135deg, #FFDA44, #FF9900);
    color: #1A1A2E;
    border-color: #FFDA44;
}

.main-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
}

.controls-panel {
    background: #2A2A4A;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #555588;
}

.tab-content {
    display: none;
}

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

.upload-zone {
    background: #1A1A2E;
    border: 3px dashed #FFDA44;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-zone:hover {
    background: #2A2A4A;
    border-color: #FF9900;
}

.upload-text p {
    margin: 10px 0;
    font-size: 1.1em;
}

.upload-text .small {
    font-size: 0.9em;
    opacity: 0.7;
}

.nano-banana-section {
    background: linear-gradient(135deg, #FFDA44, #FF9900);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.nano-header h3 {
    color: #1A1A2E;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.nano-header p {
    color: #2A2A4A;
    font-size: 0.95em;
    margin-bottom: 15px;
}

.banana-button {
    width: 100%;
    background: #1A1A2E;
    color: #FFDA44;
    border: none;
    padding: 15px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.banana-button:hover {
    background: #000000;
    transform: scale(1.05);
}

.banana-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    display: none;
}

.banana-status.loading {
    background: #2A2A4A;
    color: #FFDA44;
}

.banana-status.success {
    background: #4CAF50;
    color: white;
}

.banana-status.error {
    background: #FF4D4D;
    color: white;
}

.control-group {
    margin-bottom: 25px;
}

.control-group h3 {
    color: #FFDA44;
    font-size: 1.1em;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.slider-control {
    display: grid;
    grid-template-columns: 120px 1fr 60px;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.slider-control label {
    font-weight: bold;
    font-size: 0.9em;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #3E3E6B;
    border-radius: 4px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #FFDA44;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #FF9900;
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #FFDA44;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.value {
    text-align: right;
    font-weight: bold;
    color: #FFDA44;
}

.text-input {
    width: 100%;
    background: #3E3E6B;
    border: 2px solid #555588;
    color: #E0E0E0;
    padding: 12px;
    font-size: 1em;
    border-radius: 8px;
    margin-bottom: 15px;
}

.text-input:focus {
    outline: none;
    border-color: #FFDA44;
}

.color-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

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

.color-control label {
    font-weight: bold;
    font-size: 0.9em;
}

input[type="color"] {
    width: 100%;
    height: 50px;
    border: 2px solid #555588;
    border-radius: 8px;
    cursor: pointer;
    background: #3E3E6B;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.emoji-btn {
    background: #3E3E6B;
    border: 2px solid #555588;
    font-size: 2em;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.emoji-btn:hover {
    background: #FFDA44;
    transform: scale(1.1);
}

.remove-btn {
    width: 100%;
    background: linear-gradient(135deg, #FF4D4D, #CC0000);
    color: white;
    border: none;
    padding: 12px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
}

.remove-btn:hover {
    background: linear-gradient(135deg, #CC0000, #990000);
}

.preview-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.download-button {
    background: linear-gradient(135deg, #FFDA44, #FF4D4D);
    color: #1A1A2E;
    border: none;
    padding: 20px 40px;
    font-size: 1.5em;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 218, 68, 0.4);
}

.download-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 218, 68, 0.6);
}

.canvas-container {
    background: #1A1A2E;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #555588;
    display: flex;
    justify-content: center;
    align-items: center;
}

#canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.pro-tips {
    background: #2A2A4A;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #555588;
}

.pro-tips h3 {
    color: #FFDA44;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.pro-tips p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.pro-tips strong {
    color: #FFDA44;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #E0E0E0;
    opacity: 0.7;
}

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

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

/* Responsive design */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .controls-panel {
        order: 2;
    }
    
    .preview-panel {
        order: 1;
    }
    
    h1 {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.5em;
    }
    
    .tabs {
        gap: 5px;
    }
    
    .tab {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    
    .slider-control {
        grid-template-columns: 100px 1fr 50px;
        gap: 8px;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .emoji-btn {
        font-size: 1.5em;
        padding: 10px;
    }
    
    .download-button {
        padding: 15px 30px;
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.3em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 5px;
    }
    
    .emoji-btn {
        font-size: 1.2em;
        padding: 8px;
    }
}