/* ==========================================================================
   Base Styles - Consistent with Main Menu
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, 
        #2d4a7a 0%,
        #4682b4 40%,
        #5a9bd4 70%,
        #87ceeb 100%
    );
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    color: #ffffff;
}

/* ==========================================================================
   Background Animation (Simplified Bubbles)
   ========================================================================== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 25% 25%,
        rgba(135, 206, 235, 0.4),
        rgba(135, 206, 235, 0.1) 40%,
        rgba(135, 206, 235, 0.05) 70%,
        rgba(135, 206, 235, 0.1));
    border: 1px solid rgba(135, 206, 235, 0.2);
    animation: bubbleFloat 8s ease-in-out infinite;
}

.bubble-1 { width: 80px; height: 80px; top: 10%; left: 10%; animation-delay: 0s; }
.bubble-2 { width: 60px; height: 60px; top: 60%; right: 15%; animation-delay: 2s; }
.bubble-3 { width: 40px; height: 40px; top: 30%; left: 60%; animation-delay: 4s; }
.bubble-4 { width: 50px; height: 50px; bottom: 20%; left: 20%; animation-delay: 1s; }
.bubble-5 { width: 30px; height: 30px; top: 80%; right: 40%; animation-delay: 3s; }

@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.4; }
    50% { transform: translateY(-20px) scale(1.1); opacity: 0.7; }
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    text-align: center;
    padding: 2rem 1rem;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 
        0 0 10px rgba(135, 206, 235, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.5);
}

.header p {
    font-size: 1.1rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   Container and Layout
   ========================================================================== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 60px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* ==========================================================================
   Form Section
   ========================================================================== */
.form-section {
    background: rgba(248, 250, 252, 0.95);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    color: #2c3e50;
}

.form-section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.button-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid rgba(70, 130, 180, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4682b4;
    box-shadow: 0 0 0 3px rgba(70, 130, 180, 0.1);
}

.form-group small {
    color: #666;
    font-size: 0.8rem;
}

/* Emoji Picker */
.emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.emoji-option {
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 2px solid transparent;
}

.emoji-option:hover {
    background-color: rgba(70, 130, 180, 0.1);
}

.emoji-option.selected {
    background-color: rgba(70, 130, 180, 0.2);
    border-color: #4682b4;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #4682b4, #5a9bd4);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a9bd4, #87ceeb);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(108, 117, 125, 0.1);
    color: #2c3e50;
    border: 2px solid rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: rgba(108, 117, 125, 0.2);
}

/* ==========================================================================
   Preview Section
   ========================================================================== */
.preview-section {
    background: rgba(248, 250, 252, 0.95);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    color: #2c3e50;
}

.preview-section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.preview-container {
    background: rgba(135, 206, 235, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px dashed rgba(70, 130, 180, 0.3);
}

/* App Card Preview (Same as main menu) */
.app-card {
    background: rgba(248, 250, 252, 0.95);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.app-card.compact {
    padding: 14px 18px;
    border-radius: 12px;
    min-height: 60px;
}

.app-icon {
    font-size: 1.6rem;
    margin-right: 14px;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.app-content {
    flex: 1;
}

.app-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: #1a202c;
    line-height: 1.3;
}

.app-description {
    font-size: 0.85rem;
    color: #4a5568;
    line-height: 1.3;
    opacity: 0.9;
}

.app-arrow {
    font-size: 1.2rem;
    margin-left: 12px;
    color: #718096;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* ==========================================================================
   Result Section
   ========================================================================== */
.result-section {
    grid-column: 1 / -1;
    background: rgba(248, 250, 252, 0.95);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    color: #2c3e50;
    margin-top: 1rem;
}

.result-section h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.instruction {
    background: rgba(70, 130, 180, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #4682b4;
}

.code-container {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.code-header {
    background: #2d2d2d;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    font-size: 0.9rem;
}

.copy-btn {
    background: #4682b4;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
}

.copy-btn:hover {
    background: #5a9bd4;
}

.copy-btn.copied {
    background: #28a745;
}

.code-block {
    background: #1e1e1e;
    color: #f8f8f2;
    padding: 1.5rem;
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
}

.help-section {
    background: rgba(40, 167, 69, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.help-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.help-section ol {
    padding-left: 1.5rem;
}

.help-section li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.help-section code {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.footer a {
    color: #87ceeb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ffffff;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 15px 80px 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .form-section,
    .preview-section {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .form-section,
    .preview-section,
    .result-section {
        padding: 1rem;
    }
    
    .emoji-picker {
        justify-content: center;
    }
}
