* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Header */
header {
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5em;
    color: #ff6b6b;
    text-align: center;
    margin-bottom: 5px;
    text-shadow: 2px 2px 0 #ffd93d;
}

.tagline {
    text-align: center;
    color: #666;
    font-size: 1.1em;
    margin-bottom: 15px;
}

nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

nav a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
}

nav a:hover,
nav a.active {
    background: #667eea;
    color: white;
}

/* Main Content */
main {
    background: white;
    border-radius: 30px;
    padding: 40px;
    margin-bottom: 60px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    box-sizing: border-box;
}

.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero h2 {
    font-size: 2.5em;
    color: #ff6b6b;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2em;
    color: #666;
}

/* Generator Section */
.generator {
    margin-bottom: 50px;
}

.generator h3 {
    text-align: center;
    font-size: 1.8em;
    color: #764ba2;
    margin-bottom: 25px;
}

.occasion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.occasion-btn {
    background: linear-gradient(135deg, #ffd93d 0%, #ffb347 100%);
    border: none;
    padding: 20px;
    font-size: 1.2em;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    color: #333;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.occasion-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.occasion-btn:active {
    transform: translateY(-2px);
}

/* Card Preview */
.card-preview {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 25px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-content {
    text-align: center;
}

.card-emoji {
    font-size: 5em;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

#cardTitle {
    font-size: 2em;
    color: #333;
    margin-bottom: 15px;
}

#cardPun {
    font-size: 1.5em;
    color: #555;
    font-style: italic;
}

/* Actions */
.actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    font-size: 1.1em;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(-1px);
}

/* Tips Section */
.tips-section {
    margin: 50px 0;
    padding: 30px;
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    border-radius: 20px;
    width: 100%;
    box-sizing: border-box;
}

.tips-section h3 {
    text-align: center;
    font-size: 2em;
    color: #333;
    margin-bottom: 25px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

.tip-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tip-icon {
    font-size: 2.5em;
    display: block;
    margin-bottom: 10px;
}

.tip-card p {
    color: #666;
    font-size: 1em;
    line-height: 1.6;
}

.tip-card strong {
    color: #667eea;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* Features Section */
.features {
    margin-top: 60px;
    margin-bottom: 60px;
}

.features h3 {
    text-align: center;
    font-size: 2em;
    color: #764ba2;
    margin-bottom: 30px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    width: 100%;
}

.feature-card {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    margin-bottom: 20px;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.feature-card h4 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 10px;
}

.feature-card p {
    color: #666;
    font-size: 1.1em;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 0;
    text-align: center;
    margin-top: 60px;
    width: 100%;
}

footer .container {
    width: 100%;
    max-width: 1200px;
}

footer p {
    color: #666;
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #ff6b6b;
}

/* Gallery Page */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h2 {
    font-size: 2.5em;
    color: #ff6b6b;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.2em;
    color: #666;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.gallery-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery-card .card-content {
    padding: 30px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.birthday-theme {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.holiday-theme {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.congrats-theme {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
}

.apology-theme {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.thankyou-theme {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.love-theme {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.gallery-card h4 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.gallery-card p {
    font-size: 1.2em;
    color: #555;
    font-style: italic;
}

/* About Page */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 40px;
}

.about-section h3 {
    font-size: 1.8em;
    color: #764ba2;
    margin-bottom: 15px;
}

.about-section p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #666;
    margin-bottom: 15px;
}

.feature-list,
.steps-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li,
.steps-list li {
    font-size: 1.1em;
    line-height: 1.8;
    color: #666;
    margin-bottom: 15px;
    padding-left: 10px;
}

.steps-list {
    counter-reset: step-counter;
}

.steps-list li {
    counter-increment: step-counter;
}

.about-section a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

.about-section a:hover {
    color: #ff6b6b;
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin-top: 60px;
    padding: 40px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 20px;
}

.cta-section h3 {
    font-size: 2em;
    color: #333;
    margin-bottom: 20px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    z-index: 1000;
    transition: bottom 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast.show {
    bottom: 30px;
}

/* Card animations */
.card-emoji,
#cardTitle,
#cardPun {
    transition: opacity 0.3s ease;
}

/* Hover effects for occasion buttons */
.occasion-btn {
    position: relative;
    overflow: hidden;
}

.occasion-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.occasion-btn:hover::before {
    width: 300px;
    height: 300px;
}

.occasion-btn.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    transform: scale(1.05);
}

/* Pulse animation for generate button */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
    }
    100% {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
}

.btn-primary {
    animation: pulse 2s infinite;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .hero h2 {
        font-size: 1.8em;
    }

    .occasion-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-emoji {
        font-size: 3em;
    }

    #cardTitle {
        font-size: 1.5em;
    }

    #cardPun {
        font-size: 1.2em;
    }

    .actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    nav {
        flex-direction: column;
        gap: 10px;
    }

    main {
        padding: 20px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .tip-card {
        min-width: 0;
    }
    
    .feature-card {
        min-width: 0;
    }
}

/* 404 Error Page */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-content {
    max-width: 600px;
}

.error-emoji {
    font-size: 8em;
    margin-bottom: 20px;
    animation: shake 2s infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.error-page h2 {
    font-size: 3em;
    color: #ff6b6b;
    margin-bottom: 20px;
}

.error-pun {
    font-size: 1.5em;
    color: #764ba2;
    font-style: italic;
    margin-bottom: 20px;
}

.error-message {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 30px;
}

.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: #f0f0f0;
    border: 2px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    transition: all 0.3s;
    font-size: 1em;
}

.filter-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.gallery-card {
    cursor: pointer;
}

.gallery-card.hidden {
    display: none;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 20px;
}

.stat-card {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 3em;
    font-weight: bold;
    color: #ff6b6b;
    display: block;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1em;
    color: #666;
    font-weight: bold;
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Print styles */
@media print {
    header, footer, nav, .actions, .btn {
        display: none;
    }
    
    .card-preview {
        box-shadow: none;
        border: 2px solid #333;
    }
    
    body {
        background: white;
    }
    
    main {
        box-shadow: none;
    }
}
