:root {
    --primary-color: #8bc34a;
    --secondary-color: #e91e63;
    --accent-color: #ff6b9d;
    --text-color: #333;
    --bg-color: #fff;
    --panel-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

[data-theme="dark"] {
    --primary-color: #8bc34a;
    --secondary-color: #e91e63;
    --accent-color: #ff6b9d;
    --text-color: #e0e0e0;
    --bg-color: #1a1a1a;
    --panel-bg: #2a2a2a;
    --border-color: #404040;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: all 0.3s ease;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header::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"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: sparkle 3s linear infinite;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.header-brand {
    text-align: left;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.theme-toggle, .reset-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle:hover, .reset-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Language Dropdown */
.language-dropdown {
    position: relative;
}

.language-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 130px;
}

.language-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.language-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    min-width: 200px;
    max-width: 90vw;
}

.language-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.language-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: var(--primary-color);
    color: white;
}

.language-option.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.contact-link {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: white;
}

.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.controls-panel {
    background: var(--panel-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    max-height: 80vh;
    overflow-y: auto;
}

.preview-panel {
    background: var(--panel-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.canvas-container {
    position: relative;
    display: inline-block;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#previewCanvas {
    display: block;
    max-width: 100%;
    max-height: 60vh;
    border-radius: 15px;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.control-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.control-label i {
    color: var(--primary-color);
}

.text-input, .color-picker, .font-select, .select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.text-input:focus, .select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.1);
}

.color-picker {
    height: 50px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.checkbox {
    margin-right: 0.5rem;
    transform: scale(1.2);
    accent-color: var(--primary-color);
}

.slider-group {
    background: rgba(139, 195, 74, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(139, 195, 74, 0.2);
}

.slider-control {
    margin-bottom: 1rem;
}

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

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin-top: 0.5rem;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    justify-content: center;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 195, 74, 0.4);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--panel-bg);
    transform: translateY(-2px);
}

.download-section {
    background: linear-gradient(135deg, rgba(139, 195, 74, 0.1), rgba(233, 30, 99, 0.1));
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(139, 195, 74, 0.2);
}

.download-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.download-buttons .btn {
    flex: 1;
    min-width: 140px;
}

/* Custom scrollbar */
.controls-panel::-webkit-scrollbar {
    width: 8px;
}

.controls-panel::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 4px;
}

.controls-panel::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.controls-panel::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .controls-panel {
        max-height: none;
        order: 2;
    }
    
    .preview-panel {
        order: 1;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .control-row {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .header-controls {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .language-dropdown {
        order: 1;
    }
    
    .header-actions {
        order: 2;
    }
    
    .theme-toggle {
        order: 3;
    }
    
    .reset-btn {
        order: 4;
    }
    
    .language-menu {
        left: 0;
        transform: translateX(0);
        margin-left: 0;
        margin-right: 0;
        right: 0;
        width: auto;
    }
    
    .language-menu.show {
        transform: translateX(0) translateY(0);
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1.5rem 1rem;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .controls-panel, .preview-panel {
        padding: 1rem;
    }
    
    .main-content {
        padding: 0.5rem;
    }
}

/* Loading animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Glitter effect */
.glitter {
    position: relative;
    overflow: hidden;
}

.glitter::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"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.8)"/><circle cx="90" cy="20" r="0.5" fill="rgba(255,255,255,0.6)"/><circle cx="30" cy="80" r="1.5" fill="rgba(255,255,255,0.7)"/><circle cx="70" cy="60" r="0.8" fill="rgba(255,255,255,0.5)"/></svg>');
    animation: glitter 2s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes glitter {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Neon glow effect */
.neon-glow {
    box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
    animation: neon-pulse 2s ease-in-out infinite alternate;
}

@keyframes neon-pulse {
    0% {
        box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
    }
    100% {
        box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color), 0 0 40px var(--primary-color);
    }
}

/* Contact Page Styles */
.contact-main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.contact-content {
    display: grid;
    gap: 3rem;
}

.contact-section, .contact-info, .social-section, .feedback-section {
    background: var(--panel-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.section-title i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.about-text:last-child {
    margin-bottom: 0;
}

.contact-details {
    display: grid;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-text h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.contact-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-text a:hover {
    color: var(--secondary-color);
}

.contact-text p {
    color: var(--text-color);
    margin: 0;
}

.social-text {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    text-align: center;
}

.social-icons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.social-link.facebook {
    background: linear-gradient(135deg, #1877f2, #4267b2);
}

.social-link.twitter {
    background: linear-gradient(135deg, #1da1f2, #0d95e8);
}

.social-link.instagram {
    background: linear-gradient(135deg, #e1306c, #fd1d1d, #fcb045);
}

.social-link.tiktok {
    background: linear-gradient(135deg, #ff0050, #000000);
}

.social-link.pinterest {
    background: linear-gradient(135deg, #bd081c, #e60023);
}

.social-link i {
    font-size: 1.5rem;
}

.feedback-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.feedback-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.feedback-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
    min-width: 180px;
}

.feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 195, 74, 0.4);
    color: white;
}

.back-link {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: white;
}

/* Responsive header styles */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .header-brand {
        text-align: center;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .language-toggle {
        min-width: 100px;
    }
    
    .language-menu {
        min-width: 180px;
        max-width: 80vw;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.75rem;
    }
    
    .title {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .header-nav {
        gap: 0.25rem;
    }
    
    .theme-toggle, .reset-btn, .contact-link, .language-toggle {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .language-toggle {
        min-width: 90px;
    }
    
    .language-menu {
        min-width: 150px;
        max-width: 90vw;
    }
    
    .language-option {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Responsive contact page */
@media (max-width: 768px) {
    .contact-main {
        padding: 1rem;
    }
    
    .contact-content {
        gap: 2rem;
    }
    
    .contact-section, .contact-info, .social-section, .feedback-section {
        padding: 1.5rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .social-icons {
        grid-template-columns: 1fr;
    }
    
    .feedback-buttons {
        flex-direction: column;
    }
    
    .feedback-btn {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.3rem;
        flex-direction: column;
        text-align: center;
    }
    
    .about-text, .social-text, .feedback-text {
        font-size: 1rem;
    }
    
    .contact-item {
        padding: 1rem;
    }
    
    .social-link {
        padding: 0.75rem 1rem;
    }
}
