/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Purple and White Activist Branding */
    --primary-purple: #8B5CF6;
    --secondary-purple: #A855F7;
    --accent-purple: #C084FC;
    --gradient-primary: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%);
    --gradient-secondary: linear-gradient(45deg, var(--primary-purple) 0%, var(--accent-purple) 100%);
    
    /* Supporting Colors */
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --dark-gray: #1F2937;
    --text-gray: #6B7280;
    --accent-yellow: #F59E0B;
    --accent-pink: #EC4899;
    --success-green: #10B981;
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Comic Neue', cursive;
    
    /* Spacing */
    --container-padding: 1rem;
    --section-padding: 4rem 0;
    
    /* Shadows */
    --shadow-soft: 0 4px 20px rgba(139, 92, 246, 0.1);
    --shadow-medium: 0 8px 30px rgba(139, 92, 246, 0.15);
    --shadow-strong: 0 12px 40px rgba(139, 92, 246, 0.2);
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--dark-gray);
    background: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 2px solid var(--primary-purple);
    box-shadow: var(--shadow-medium);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-logo-img {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary-purple);
}

.cta-button {
    background: var(--gradient-primary);
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-gray);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.hero-content {
    text-align: center;
    color: white;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Generator Section */
.generator-section {
    padding: var(--section-padding);
    background: var(--light-gray);
}

.generator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.upload-area, .badge-preview {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border: 2px solid rgba(139, 92, 246, 0.1);
}

.upload-area h2, .badge-preview h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--dark-gray);
    font-weight: 700;
    text-align: center;
}

.upload-zone {
    border: 3px dashed var(--primary-purple);
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(139, 92, 246, 0.05);
}

.upload-zone:hover {
    border-color: var(--secondary-purple);
    background: rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.upload-zone.dragover {
    border-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.15);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
    font-weight: 600;
}

.upload-content p {
    color: var(--text-gray);
    font-size: 1rem;
}

.upload-tips {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 10px;
    border-left: 4px solid var(--primary-purple);
}

.upload-tips p {
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin: 0;
}



/* Badge Preview */
.badge-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.badge-frame {
    width: 300px;
    height: 300px;
    background: transparent;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.badge-frame svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.badge-frame text {
    font-family: 'Inter', Arial, sans-serif;
    font-weight: bold;
    fill: white;
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.badge-frame::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.badge-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-logo {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: none;
    position: relative;
    z-index: 3;
}

.user-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: transparent;
}

.placeholder-logo {
    color: transparent;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Badge text is now handled by SVG */
.badge-text {
    display: none;
}

/* Remove duplicate .badge-text p rule */

.badge-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    background: #ccc !important;
    color: #666 !important;
    box-shadow: none !important;
}

.btn:not(:disabled):hover {
    transform: translateY(-3px);
}

.btn-download {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-soft);
}

.btn-download:not(:disabled):hover {
    box-shadow: var(--shadow-medium);
}

.btn-share {
    background: var(--accent-pink);
    color: white;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.3);
}

.btn-share:not(:disabled):hover {
    box-shadow: 0 8px 30px rgba(236, 72, 153, 0.4);
}

.btn-retry {
    background: var(--accent-yellow);
    color: white;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.btn-retry:not(:disabled):hover {
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.4);
}

.btn-emoji {
    font-size: 1.2rem;
}

/* Sharing Section */
.sharing-section {
    padding: var(--section-padding);
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    font-family: var(--font-display);
}

.section-header p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.share-btn.twitter {
    background: #000000;
}

.share-btn.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.share-btn.telegram {
    background: #0088cc;
}

.hashtags {
    text-align: center;
    padding: 1.5rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(139, 92, 246, 0.2);
}

.hashtags p {
    color: var(--dark-gray);
    font-size: 1.1rem;
    margin: 0;
}

.hashtags strong {
    color: var(--primary-purple);
    font-weight: 700;
}

/* Community Section */
.community-section {
    padding: var(--section-padding);
    background: var(--light-gray);
}

.community-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.community-badge {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    cursor: pointer;
}

.community-badge:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.community-badge img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.community-badge-info {
    padding: 1rem;
    text-align: center;
}

.community-badge-info h4 {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.community-badge-info p {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin: 0;
}

.gallery-load-more {
    text-align: center;
}

.btn-load-more {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-soft);
}

.btn-load-more:hover {
    box-shadow: var(--shadow-medium);
}

/* Donate Section */
.donate-section {
    padding: var(--section-padding);
    background: white;
}

.donate-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.donate-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 2px solid rgba(139, 92, 246, 0.1);
    text-decoration: none;
    color: var(--dark-gray);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.donate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.5s;
}

.donate-card:hover::before {
    left: 100%;
}

.donate-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-purple);
}

.donate-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.donate-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-gray);
    font-weight: 700;
}

.donate-card p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.donate-amount {
    display: block;
    color: var(--primary-purple);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 700;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 600;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-purple);
}

.footer-social {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.footer-social .social-link {
    color: #ccc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-social .social-link:hover {
    color: var(--primary-purple);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #999;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-strong);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 2rem;
}

.share-preview {
    text-align: center;
    margin-bottom: 2rem;
}

.share-preview .badge-frame {
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    border: 2px solid var(--primary-purple);
    border-radius: 10px;
    background: white;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.share-option:hover {
    background: var(--primary-purple);
    color: white;
    transform: translateY(-2px);
}

.share-icon {
    font-size: 1.5rem;
}

/* Animations */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .generator-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .upload-area, .badge-preview {
        padding: 2rem;
    }
    
    .badge-frame {
        width: 250px;
        height: 250px;
    }
    
    .badge-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    

    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .donate-options {
        grid-template-columns: 1fr;
    }
    
    .share-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .upload-area, .badge-preview, .loading-state {
        padding: 1.5rem;
    }
    
    .badge-frame {
        width: 200px;
        height: 200px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.btn:focus,
.share-btn:focus,
.share-option:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-purple);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
