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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease-out;
}

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

.subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    font-weight: 300;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.excuse-generator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.excuse-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 600px;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.excuse-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.excuse-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.excuse-card h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #4a5568;
}

.excuse-text {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #2d3748;
    margin-bottom: 15px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.excuse-category {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 10px;
}

.generate-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(255,107,107,0.3);
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255,107,107,0.4);
    background: linear-gradient(135deg, #ff5252, #d63031);
}

.generate-btn:active {
    transform: translateY(-1px);
}

.excuse-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.action-btn {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.category-selection {
    text-align: center;
    margin: 20px 0;
}

.category-selection h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.category-btn {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.category-btn.active {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-color: #ff6b6b;
    box-shadow: 0 5px 20px rgba(255,107,107,0.4);
}

.category-btn.active:hover {
    background: linear-gradient(135deg, #ff5252, #d63031);
}

.extra-ideas {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.extra-ideas h3 {
    text-align: center;
    color: white;
    font-size: 2.2rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.scroll-navigation {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.scroll-btn {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 10;
    flex-shrink: 0;
}

.scroll-btn:hover {
    background: rgba(255,255,255,1);
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    color: #ff6b6b;
}

.scroll-btn:active {
    transform: scale(0.95);
}

.scroll-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.scroll-btn:disabled:hover {
    background: rgba(255,255,255,0.9);
    color: #667eea;
    transform: none;
}

.ideas-scroll-container {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0 20px 0;
    scroll-behavior: smooth;
    margin: 0 -20px;
}

.ideas-grid {
    display: flex;
    gap: 25px;
    padding: 0 20px;
    min-width: max-content;
}

.idea-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
}

.idea-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Custom scrollbar for ideas section */
.ideas-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.ideas-scroll-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.ideas-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.ideas-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

.stats-section {
    animation: fadeInUp 1s ease-out 0.9s both;
}

.stats-section h3 {
    text-align: center;
    color: white;
    font-size: 2.2rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

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

.stat-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-label {
    color: #718096;
    font-weight: 500;
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.history-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.favorite-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #ff6b6b;
    position: relative;
}

.favorite-item .remove-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.favorite-item .remove-favorite:hover {
    background: #d63031;
    transform: scale(1.1);
}

.empty-favorites {
    text-align: center;
    color: #a0aec0;
    font-style: italic;
    padding: 40px;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 15px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #a0aec0;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #4a5568;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.empty-history {
    text-align: center;
    color: #a0aec0;
    font-style: italic;
    padding: 40px;
}

.footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px;
    color: rgba(255,255,255,0.8);
    animation: fadeIn 1s ease-out 1.2s both;
}

.disclaimer {
    font-size: 0.9rem;
    margin-top: 10px;
    font-style: italic;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .scroll-navigation {
        gap: 10px;
    }
    
    .scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .excuse-card {
        padding: 25px;
        margin: 0 10px;
    }
    
    .excuse-text {
        font-size: 1.1rem;
    }
    
    .generate-btn {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
    
    .excuse-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 200px;
    }

    .category-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .category-btn {
        width: 200px;
    }

    .ideas-scroll-container {
        margin: 0 -15px;
    }

    .ideas-grid {
        padding: 0 15px;
    }

    .idea-card {
        min-width: 250px;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .scroll-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .excuse-card {
        padding: 20px;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
    }
}
