:root {
    --primary: #a259ff;
    --secondary: #6a82fb;
    --gradient: linear-gradient(90deg, #a259ff 0%, #6a82fb 100%);
    --bg: #f8f7fc;
    --card-bg: #fff;
    --text: #22223b;
    --muted: #6c6c80;
    --border-radius: 1.2rem;
    --shadow: 0 4px 24px rgba(162, 89, 255, 0.08);
    --font-main: 'Inter', Arial, sans-serif;
    --font-heading: 'Poppins', Arial, sans-serif;
    --footer-bg: #f3f0ff;
    --footer-border: #e0e0e0;
    --focus: #ffe066;
}

html {
    box-sizing: border-box;
    font-size: 16px;
    scroll-behavior: smooth;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    min-height: 100vh;
    line-height: 1.6;
}

.header {
    background: var(--gradient);
    color: #fff;
    padding: 1.2rem 0;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    /* justify-content: center; */
    position: sticky;
    top: 0;
    z-index: 1000;
}
header a.active {
    color: #ffffff; /* Blue highlight */
    font-weight: bold;
    border-bottom: 3px solid #ffe066;
}


.logo {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 700;
    margin-left: 2rem;
    gap: 0.7rem;
    letter-spacing: 0.5px;
}

.logo a {
    color: inherit;
    /* text ka color wahi jo parent ka hai */
    text-decoration: none;
    /* underline remove */
    display: flex;
    align-items: center;
    gap: 0.7rem;
    cursor: pointer;
    /* hover par pointer show karega */
}

.logo a:hover,
.logo a:focus,
.logo a:active,
.logo a:visited {
    color: inherit;
    text-decoration: none;
}


.site-name {
    letter-spacing: 0.5px;
    font-size: 1.2rem;
}

.nav {
    position: relative;
    margin-right: 2rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s, border-bottom 0.2s;
    font-size: 1.08rem;
    padding: 0.2rem 0.1rem;
    border-bottom: 2px solid transparent;
}

.nav-links a[aria-current="page"] {
    border-bottom: 2px solid var(--focus);
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--focus);
    outline: none;
}

.menu-toggle,
.hamburger {
    display: none;
}

@media (max-width: 900px) {
    .header {
        display: flex;
        justify-content: space-between; /* logo left, hamburger right */
        align-items: center;
    }

    .logo {
        margin-left: 1rem;
        font-size: 1.2rem;        
    }

    .nav {
        margin-right: 1rem;
    }

    .nav-links {
        flex-direction: column;
        background: var(--gradient);
        position: absolute;
        top: 3.5rem;
        right: 0;
        width: 180px;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);
        display: none;
        z-index: 100;
        padding: 1rem 0;
        align-items: center;
    }

    .menu-toggle:checked + .hamburger + .nav-links {
        display: flex;
    }

    .hamburger {
        display: inline-block;
        cursor: pointer;
        width: 32px;
        height: 32px;
        position: relative;
        margin-left: 1rem;
        z-index: 101;
    }

    .hamburger span {
        display: block;
        height: 4px;
        width: 100%;
        background: #fff;
        margin: 6px 0;
        border-radius: 2px;
        transition: 0.3s;
    }
}


@media (max-width: 700px) {
    .nav-links {
        flex-direction: column;
        background: var(--gradient);
        position: absolute;
        top: 3.5rem;
        right: 0;
        width: 180px;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);
        display: none;
        z-index: 100;
        padding: 1rem 0;
        align-items: center;
    }

    .menu-toggle:checked+.hamburger+.nav-links {
        display: flex;
    }

    .hamburger {
        display: inline-block;
        cursor: pointer;
        width: 32px;
        height: 32px;
        position: relative;
        margin-left: 1rem;
        z-index: 101;
    }

    .hamburger span {
        display: block;
        height: 4px;
        width: 100%;
        background: #fff;
        margin: 6px 0;
        border-radius: 2px;
        transition: 0.3s;
    }
}

.emoji-generator-section {
    max-width: 600px;
    margin: 2.5rem auto;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2.5rem 2rem 2rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.emoji-generator-section:before {
    content: "";
    position: absolute;
    top: -80px;
    left: -80px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, #a259ff33 60%, transparent 100%);
    z-index: 0;
}

.emoji-generator-section:after {
    content: "";
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, #6a82fb33 60%, transparent 100%);
    z-index: 0;
}

.emoji-generator-section>* {
    position: relative;
    z-index: 1;
}

.emoji-generator-section h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

#generator-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

#generator-form label {
    font-weight: 600;
    margin-right: 0.5rem;
    font-size: 1.05rem;
}

#generator-form select,
#generator-form input[type="number"] {
    padding: 0.5rem 1rem;
    border-radius: 0.7rem;
    border: 1px solid #e0e0e0;
    font-size: 1rem;
    outline: none;
    background: #f3f0ff;
    color: var(--text);
    transition: border 0.2s;
    margin-right: 0.5rem;
}

#generator-form select:focus,
#generator-form input[type="number"]:focus {
    border: 1.5px solid var(--primary);
}

.gradient-btn {
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 0.7rem;
    padding: 0.7rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(162, 89, 255, 0.12);
    transition: background 0.2s, transform 0.1s;
    margin-top: 0.2rem;
}

.gradient-btn:hover,
.gradient-btn:focus {
    background: linear-gradient(90deg, #6a82fb 0%, #a259ff 100%);
    transform: translateY(-2px) scale(1.04);
    outline: none;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
    justify-items: center;
}

.emoji-card {
    background: linear-gradient(135deg, #f3f0ff 60%, #e0c3fc 100%);
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(162, 89, 255, 0.07);
    padding: 1.2rem 0.7rem 0.8rem 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.18s, box-shadow 0.18s;
    animation: fadeIn 0.7s;
    position: relative;
    min-width: 90px;
    min-height: 120px;
}

.emoji-card:hover,
.emoji-card:focus-within {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 24px rgba(162, 89, 255, 0.13);
    outline: none;
}

.emoji-char {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    transition: transform 0.2s;
    user-select: all;
}

.emoji-card:hover .emoji-char,
.emoji-card:focus-within .emoji-char {
    transform: scale(1.18) rotate(-6deg);
}

.emoji-name {
    font-size: 0.98rem;
    color: var(--muted);
    margin-bottom: 0.7rem;
    text-align: center;
    min-height: 1.5em;
    font-family: var(--font-main);
}

.copy-btn {
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.3rem 0.8rem;
    font-size: 0.98rem;
    cursor: pointer;
    margin-top: 0.2rem;
    transition: background 0.2s;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.copy-btn:hover,
.copy-btn:focus {
    background: linear-gradient(90deg, #6a82fb 0%, #a259ff 100%);
    outline: none;
}

.footer {
    background: var(--footer-bg);
    color: var(--muted);
    padding: 2rem 0 1rem 0;
    text-align: center;
    font-size: 1rem;
    margin-top: 3rem;
    border-top: 1px solid var(--footer-border);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
    align-items: center;
    margin-bottom: 0.7rem;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    margin: 0 0.3rem;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-links a:hover,
.footer-links a:focus {
    text-decoration: underline;
    color: var(--secondary);
    outline: none;
}

.footer-social a {
    font-size: 1.3rem;
    margin: 0 0.3rem;
    color: var(--secondary);
    transition: color 0.2s;
}

.footer-social a:hover,
.footer-social a:focus {
    color: var(--primary);
    outline: none;
}

.footer-seo {
    font-size: 0.92rem;
    color: #8a8aab;
    margin-top: 0.5rem;
}

.after-emoji-content {
    margin: 3.5rem auto 0 auto;
    max-width: 1000px;
    padding: 0 1.5rem 2.5rem 1.5rem;
}

.content-container {
    background: #fff;
    border-radius: 1.2rem;
    box-shadow: 0 2px 16px rgba(162, 89, 255, 0.07);
    padding: 2rem 2rem 1.5rem 2rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

.content-container h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-container ul {
    margin: 1.2rem 0 0 1.2rem;
    padding: 0;
    color: var(--muted);
    font-size: 1.08rem;
}

.card-links-container {
    text-align: center;
}
#home-card-links-container {    
    margin-bottom: 2rem;
}

.card-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    background: linear-gradient(120deg, #f3f0ff 70%, #e0c3fc 100%);
    border-radius: 1.1rem;
    box-shadow: 0 2px 12px rgba(162, 89, 255, 0.07);
    padding: 1.2rem 1.2rem;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.16s, box-shadow 0.16s, background 0.18s;
    min-height: 90px;
    border: 2px solid transparent;
}

.feature-card:hover,
.feature-card:focus {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 6px 24px rgba(162, 89, 255, 0.13);
    background: linear-gradient(120deg, #e0c3fc 60%, #a259ff22 100%);
    border: 2px solid var(--primary);
    outline: none;
}

.feature-emoji {
    font-size: 2.2rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.13rem;
    margin: 0 0 0.2rem 0;
    color: var(--primary);
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

.emoji-page-card {
    border: none;
    background: #fff;
    box-shadow: 0 4px 24px rgba(162, 89, 255, 0.08), 0 1.5px 8px #e0c3fc55;
    border-radius: 1.3rem;
    padding: 1.6rem 1.3rem;
    transition: box-shadow 0.18s, transform 0.18s, background 0.18s;
    position: relative;
    overflow: hidden;
    min-height: 120px;
}

.emoji-page-card .feature-emoji {
    font-size: 2.6rem;
    border-radius: 50%;
    width: 3.7rem;
    height: 3.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.7rem;
    margin-left: 0.1rem;
    box-shadow: 0 2px 12px #a259ff22;
    border: 3px solid #fff;
}

.emoji-page-card h3 {
    font-size: 1.18rem;
    margin-bottom: 0.3rem;
    color: var(--primary);
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.emoji-page-card p {
    color: var(--muted);
    font-size: 1.04rem;
    margin: 0;
}

.emoji-page-card:hover,
.emoji-page-card:focus {
    background: linear-gradient(120deg, #f3f0ff 70%, #e0c3fc 100%);
    box-shadow: 0 8px 32px #a259ff22, 0 2px 12px #e0c3fc55;
    transform: translateY(-6px) scale(1.035);
    border: none;
    outline: none;
}

@media (max-width: 600px) {
    .emoji-generator-section {
        padding: 1.2rem 0.5rem 1.2rem 0.5rem;
        max-width: 98vw;
    }

    .emoji-generator-section h1 {
        font-size: 1.3rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .emoji-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 0.7rem;
    }

    .after-emoji-content {
        padding: 0 0.3rem 2rem 0.3rem;
    }

    .content-container {
        padding: 1.1rem 0.7rem 1rem 0.7rem;
    }

    .card-links-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card {
        padding: 1rem 0.7rem;
    }
}

@media (max-width: 377px) {
    html {
    box-sizing: border-box;
    scroll-behavior: smooth;
}
.site-name {
    font-size: 0.7rem;    
}
    
}

/* Increase emoji card width on large screens */
@media (min-width: 1000px) {
    .emoji-grid {
        gap: 3.5rem 2.5rem;
        /* More vertical and horizontal gap */
    }

    .emoji-card {
        min-width: 180px;
        min-height: 150px;
        font-size: 1.15rem;
        margin: 0;
        /* Remove any negative margin if present */
    }
}

@media (min-width: 1200px) {
    .emoji-generator-section {
        max-width: 1100px;
        padding-left: 3.5rem;
        padding-right: 3.5rem;
    }

    .emoji-grid {
        gap: 4rem 3rem;
        /* Even more gap for extra large screens */
    }
}

/* Style for emoji count box buttons */
.emoji-count-boxes {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    justify-content: center;
}

.emoji-count-btn {
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.4rem 1.1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 1px 4px rgba(162, 89, 255, 0.10);
    outline: none;
}

.emoji-count-btn.active,
.emoji-count-btn:focus {
    background: linear-gradient(90deg, #6a82fb 0%, #a259ff 100%);
    transform: scale(1.08);
    border: 2px solid var(--focus);
}

.emoji-count-btn:hover {
    background: linear-gradient(90deg, #6a82fb 0%, #a259ff 100%);
}

::-webkit-scrollbar {
    width: 8px;
    background: #e0c3fc;
}

::-webkit-scrollbar-thumb {
    background: #a259ff55;
    border-radius: 8px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}