* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: #e0e0e0;
    background: linear-gradient(135deg, #0a0a23, #1e3c72);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s;
    line-height: 1.6;
}

body.light-mode {
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.sticky-header {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 35, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

body.light-mode .sticky-header {
    background: rgba(255, 255, 255, 0.9);
}

.sticky-header h1 {
    font-size: 1.8rem;
    background: linear-gradient(to right, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
    font-weight: 500;
}

body.light-mode .nav-links a {
    color: #333;
}

.nav-links a:hover {
    color: #4facfe;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #e0e0e0;
    transition: transform 0.3s;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.light-mode .theme-toggle {
    color: #333;
}

.theme-toggle:hover {
    transform: rotate(30deg);
}

.search-bar {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    position: relative;
    flex-direction: column;
    align-items: center;
}

#search-input {
    padding: 12px 20px;
    width: 100%;
    max-width: 600px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

body.light-mode #search-input {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

#search-input:focus {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

body.light-mode #search-input::placeholder {
    color: rgba(0, 0, 0, 0.7);
}

.search-filters {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.search-filters select {
    padding: 8px 15px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: none;
    outline: none;
    cursor: pointer;
    min-width: 150px;
}

body.light-mode .search-filters select {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.trending-section {
    margin-bottom: 3rem;
    position: relative;
}

.trending-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.carousel {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 10px;
    perspective: 1000px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.carousel::-webkit-scrollbar {
    height: 8px;
}

.carousel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.carousel::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    border-radius: 10px;
}

.carousel-item {
    flex: 0 0 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
    transform-style: preserve-3d;
    scroll-snap-align: start;
}

body.light-mode .carousel-item {
    background: rgba(0, 0, 0, 0.1);
}

.carousel-item:hover {
    transform: translateY(-5px) translateZ(10px);
}

.carousel-item p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.carousel-item .hindi {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 1.1rem;
    color: #4facfe;
}

body.light-mode .carousel-item .hindi {
    color: #2a5298;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.carousel-controls button {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #e0e0e0;
    font-size: 1.5rem;
    padding: 12px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

body.light-mode .carousel-controls button {
    background: rgba(255, 255, 255, 0.5);
    color: #333;
}

.carousel-controls button:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    font-weight: 600;
}

body.light-mode .tab-btn {
    background: linear-gradient(45deg, #2a5298, #1e3c72);
}

.tab-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.tab-btn.active {
    background: linear-gradient(45deg, #ff6f61, #ff8a80);
    transform: scale(1.05);
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.tab-btn:hover::before {
    left: 100%;
}

.quote-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

body.light-mode .quote-section {
    background: rgba(0, 0, 0, 0.1);
}

#quote-image {
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: none;
    transition: opacity 0.5s;
}

#quote-text {
    font-size: 1.8rem;
    text-align: center;
    font-weight: 600;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#quote-text .hindi {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 1.5rem;
    color: #4facfe;
    margin-top: 0.8rem;
    display: block;
}

body.light-mode #quote-text .hindi {
    color: #2a5298;
}

.personalize-form {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.personalize-form input {
    padding: 10px 15px;
    width: 200px;
    border: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    font-size: 1rem;
    outline: none;
}

body.light-mode .personalize-form input {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #fff;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

button:active:not(:disabled) {
    transform: scale(0.95);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.generate-btn {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: #fff;
}

.download-btn {
    background: linear-gradient(45deg, #4caf50, #8bc34a);
    color: #fff;
}

.favorite-btn {
    background: linear-gradient(45deg, #ff6f61, #ff8a80);
    color: #fff;
}

.favorite-btn.favorited {
    background: linear-gradient(45deg, #ffd700, #ffa500);
}

.voice-btn {
    background: linear-gradient(45deg, #9c27b0, #ce93d8);
    color: #fff;
}

.social-btn {
    padding: 10px;
    font-size: 1.2rem;
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
}

.whatsapp-btn {
    background: #25d366;
    color: #fff;
}

.twitter-btn {
    background: #1da1f2;
    color: #fff;
}

.facebook-btn {
    background: #4267b2;
    color: #fff;
}

.personalize-btn {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: #fff;
}

.ai-btn {
    background: linear-gradient(45deg, #9e9e9e, #757575);
    color: #fff;
    position: relative;
}

.ai-btn::after {
    content: 'Coming Soon';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.ai-btn:hover::after {
    opacity: 1;
}

.rate-btn {
    background: linear-gradient(45deg, #ffd700, #ffa500);
    color: #fff;
}

.history-sidebar {
    position: fixed;
    right: -300px;
    top: 0;
    width: 300px;
    height: 100%;
    background: rgba(10, 10, 35, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    transition: right 0.3s;
    z-index: 999;
    overflow-y: auto;
}

body.light-mode .history-sidebar {
    background: rgba(255, 255, 255, 0.95);
}

.history-sidebar.active {
    right: 0;
}

.history-toggle {
    position: fixed;
    right: 20px;
    top: 100px;
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: #fff;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.history-toggle:hover {
    transform: scale(1.1);
}

.history-sidebar h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #4facfe;
}

.history-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

body.light-mode .history-item {
    background: rgba(0, 0, 0, 0.1);
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.history-item p {
    margin-bottom: 0.5rem;
}

.history-item .hindi {
    font-family: 'Noto Sans Devanagari', sans-serif;
    color: #4facfe;
}

.quotes-list {
    margin-bottom: 3rem;
}

.quotes-list h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.quote-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 15px;
    transition: transform 0.3s;
}

body.light-mode .quote-item {
    background: rgba(0, 0, 0, 0.1);
}

.quote-item:hover {
    transform: scale(1.03);
}

.quote-item p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.quote-item .hindi {
    font-family: 'Noto Sans Devanagari', sans-serif;
    font-size: 1.1rem;
    color: #4facfe;
}

body.light-mode .quote-item .hindi {
    color: #2a5298;
}

.rating {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.star {
    font-size: 1.5rem;
    cursor: pointer;
    color: #ccc;
    transition: color 0.3s;
}

.star.filled {
    color: #ffd700;
}

.newsletter-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 3rem;
}

body.light-mode .newsletter-section {
    background: rgba(0, 0, 0, 0.1);
}

.newsletter-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.newsletter-section p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.newsletter-form input {
    padding: 12px 20px;
    width: 100%;
    max-width: 300px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    font-size: 1rem;
    outline: none;
}

body.light-mode .newsletter-form input {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.newsletter-form button {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: #fff;
    padding: 12px 30px;
}

.analytics-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 3rem;
}

body.light-mode .analytics-section {
    background: rgba(0, 0, 0, 0.1);
}

.analytics-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.analytics-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
}

body.light-mode .analytics-card {
    background: rgba(0, 0, 0, 0.1);
}

.analytics-card:hover {
    transform: translateY(-5px);
}

.analytics-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #4facfe;
}

.analytics-card p {
    font-size: 1.8rem;
    font-weight: 700;
}

.gamification-bar {
    margin-bottom: 2rem;
    text-align: center;
}

.gamification-bar h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #4facfe;
}

.progress-bar {
    width: 100%;
    max-width: 600px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem auto;
}

body.light-mode .progress-bar {
    background: rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    transition: width 0.5s;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.1) 0%, 
        rgba(255,255,255,0.3) 50%, 
        rgba(255,255,255,0.1) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.points-display {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4facfe;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pagination button {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: #fff;
    min-width: 100px;
}

body.light-mode .pagination button {
    background: linear-gradient(45deg, #2a5298, #1e3c72);
}

footer {
    text-align: center;
    padding: 2.5rem;
    background: rgba(10, 10, 35, 0.9);
    border-radius: 15px;
}

body.light-mode footer {
    background: rgba(255, 255, 255, 0.9);
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: #4facfe;
    text-decoration: none;
    font-weight: 600;
}

body.light-mode footer a {
    color: #2a5298;
}

footer a:hover {
    text-decoration: underline;
}

.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(45deg, #00c4b4, #26a69a);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-icon {
    font-size: 1.2rem;
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #f00;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    animation: fall 5s linear forwards;
}

@keyframes fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.breadcrumb {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.breadcrumb a {
    color: #4facfe;
    text-decoration: none;
    font-size: 0.9rem;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #e0e0e0;
    font-size: 0.9rem;
}

body.light-mode .breadcrumb span {
    color: #333;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Media Queries for Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }

    .sticky-header {
        flex-direction: column;
        gap: 1rem;
        padding: 10px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .carousel-item {
        flex: 0 0 280px;
    }

    .analytics-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .sticky-header h1 {
        font-size: 1.5rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .trending-section h2, .quotes-list h2, .newsletter-section h2, .analytics-section h2 {
        font-size: 2rem;
    }

    .carousel-item {
        flex: 0 0 250px;
    }

    #quote-text {
        font-size: 1.5rem;
        min-height: 120px;
    }

    #quote-text .hindi {
        font-size: 1.3rem;
    }

    .history-sidebar {
        width: 250px;
        padding: 1.5rem;
    }

    .history-toggle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .button-group {
        gap: 1rem;
    }

    button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .social-btn {
        padding: 8px;
        font-size: 1rem;
        min-width: 36px;
        min-height: 36px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .carousel-item {
        flex: 0 0 200px;
        padding: 1rem;
    }

    #quote-text {
        font-size: 1.2rem;
        min-height: 100px;
    }

    #quote-text .hindi {
        font-size: 1rem;
    }

    .tabs {
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .quote-section {
        padding: 1.5rem;
    }

    .history-sidebar {
        width: 200px;
        padding: 1rem;
    }

    .personalize-form {
        flex-direction: column;
        align-items: center;
    }

    .personalize-form input {
        width: 100%;
    }

    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }

    .newsletter-form input {
        max-width: 100%;
    }

    .newsletter-form button {
        width: 100%;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }
}