:root {
    --primary-slate: #2A2D6E;
    --secondary-light-slate: #A7A9D6;
    --neutral-blue: #E6ECEF;
    --section-alt: #E8EAF6;
    --accent-dark-slate: #1A1B4A;
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.1);
    --border-subtle: 1px solid rgba(167, 169, 214, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--neutral-blue);
    color: var(--primary-slate);
    overflow-x: hidden;
}

/* Accessibility: Skip Link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: -1;
}

.skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--accent-dark-slate);
    color: white;
    padding: 1rem;
    margin: 1rem;
    z-index: 1000;
    border-radius: 8px;
}

/* Ad Placeholder */
.ad-placeholder {
    display: none;
}

/* Breadcrumbs */
.breadcrumbs {
    background: var(--neutral-blue);
    padding: 0.5rem 0;
    width: 100%;
    border-bottom: var(--border-subtle);
}

.breadcrumbs .container {
    max-width: 80%;
}

.breadcrumbs a {
    color: var(--primary-slate);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--secondary-light-slate);
}

.breadcrumbs span {
    color: var(--accent-dark-slate);
    font-size: 0.9rem;
    margin: 0 0.5rem;
}

.breadcrumbs .active {
    color: var(--primary-slate);
    font-weight: 600;
}

/* Navbar */
header {
    background: var(--accent-dark-slate);
    padding: 0.8rem 0;
    box-shadow: var(--shadow-soft);
}

.navbar-brand {
    font-family: 'Bangers', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-light-slate) !important;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    text-shadow: 0 0 5px rgba(167, 169, 214, 0.5);
}

.navbar-brand:hover {
    color: var(--neutral-blue) !important;
    text-shadow: 0 0 10px rgba(167, 169, 214, 0.8);
}

.navbar-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.navbar-nav .nav-item {
    margin: 0 0.8rem;
}

.navbar-nav .nav-link {
    color: var(--secondary-light-slate) !important;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    border-radius: 6px;
}

.navbar-nav .nav-link i {
    font-size: 0.85rem;
    margin-right: 0.5rem;
    color: var(--secondary-light-slate);
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background: var(--secondary-light-slate);
    color: var(--accent-dark-slate) !important;
    transform: scale(1.05);
}

.navbar-nav .nav-link:hover i {
    color: var(--accent-dark-slate);
}

/* Dropdown Menu Styles */
/* Let Bootstrap's JS handle the display property. We just style it. */
.dropdown-menu {
    background: var(--accent-dark-slate);
    border: var(--border-subtle);
}

.dropdown-item {
    color: var(--secondary-light-slate);
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: var(--secondary-light-slate);
    color: var(--accent-dark-slate);
}

/* Header Section */
.header-section {
    background: var(--section-alt);
    padding: 3rem 0;
    text-align: center;
    width: 100%;
}

.header-section h1 {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    color: var(--primary-slate);
    margin-bottom: 1rem;
}

.header-section p {
    font-size: 1.2rem;
    color: var(--accent-dark-slate);
    max-width: 600px;
    margin: 0 auto;
}

/* Tool Section */
.tool-section {
    background: var(--section-alt);
    padding: 3rem 0;
    width: 100%;
}

.tool-section h2 {
    font-family: 'Inter', sans-serif;
    font-size: 2.2rem;
    color: var(--primary-slate);
    text-align: center;
    margin-bottom: 2rem;
}

.tool-container {
    background: white;
    border: var(--border-subtle);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.tool-container label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-slate);
    margin-bottom: 0.5rem;
    display: block;
}

.tool-container input,
.tool-container select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.tool-container input:focus,
.tool-container select:focus {
    outline: none;
    border-color: var(--primary-slate);
    box-shadow: 0 0 5px rgba(42, 45, 110, 0.2);
}

.tool-container .checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.tool-container .checkbox-container input {
    width: auto;
    margin-right: 0.5rem;
}

.tool-container .checkbox-container label {
    font-size: 1rem;
}

.tool-container .btn-generate {
    background: linear-gradient(90deg, var(--primary-slate), var(--secondary-light-slate));
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 2px 10px rgba(42, 45, 110, 0.2);
}

.tool-container .btn-generate:hover {
    background: var(--secondary-light-slate);
    color: var(--accent-dark-slate);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(167, 169, 214, 0.3);
}

.tool-container .btn-generate:active {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.tool-container .output {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--neutral-blue);
    border-radius: 8px;
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-slate);
    text-align: center;
    min-height: 80px;
}

.tool-container .output.burst {
    animation: bombBurst 0.5s ease-in-out;
}

@keyframes bombBurst {
    0% {
        transform: scale(0.5) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.5) rotate(10deg);
        opacity: 0.7;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.tool-container .emoji {
    font-size: 1.5rem;
    margin-left: 0.5rem;
    display: inline-block;
    animation: fadeInEmoji 0.5s ease-out;
}

@keyframes fadeInEmoji {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    80% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.tool-container .available-chars {
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-slate);
    text-align: center;
}

/* Frequency Section */
.frequency-section {
    background: var(--section-alt);
    padding: 2rem 0;
    width: 100%;
}

.frequency-section .container {
    background: white;
    border: var(--border-subtle);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    padding: 2rem;
    max-width: 80%;
}

.frequency-section h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    color: var(--primary-slate);
    margin-bottom: 1rem;
}

.frequency-section p {
    font-size: 1rem;
    color: var(--accent-dark-slate);
    margin-bottom: 1rem;
}

.frequency-section table {
    width: 100%;
    border-collapse: collapse;
}

.frequency-section th,
.frequency-section td {
    padding: 0.5rem;
    text-align: left;
    border: var(--border-subtle);
    font-size: 1rem;
    color: var(--accent-dark-slate);
}

.frequency-section th {
    font-weight: 600;
    background: var(--neutral-blue);
}

.frequency-section tr:hover {
    background: rgba(167, 169, 214, 0.1);
}

/* Content Section */
.content-section {
    background: var(--section-alt);
    padding: 3rem 0;
    width: 100%;
}

.content-section .content-container {
    background: white;
    border: var(--border-subtle);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    padding: 2rem;
    max-width: 80%;
    margin: 0 auto;
}

.content-section .content-card {
    background: linear-gradient(180deg, #ffffff, #f9faff);
    border: var(--border-subtle);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-section .content-card:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.content-section .content-card h2,
.content-section .content-card h3 {
    font-family: 'Inter', sans-serif;
    color: var(--primary-slate);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.content-section .content-card h2 {
    font-size: 1.8rem;
}

.content-section .content-card h2 i {
    margin-right: 0.5rem;
    color: var(--secondary-light-slate);
}

.content-section .content-card h3 {
    font-size: 1.5rem;
}

.content-section .content-card h3 i {
    margin-right: 0.5rem;
    color: var(--secondary-light-slate);
}

.content-section .content-card h3:hover {
    color: var(--secondary-light-slate);
}

.content-section .content-card p,
.content-section .content-card ul {
    font-size: 1rem;
    color: var(--accent-dark-slate);
    margin-bottom: 1rem;
}

.content-section .content-card ul {
    padding-left: 1.5rem;
}

.content-section .content-card ul li {
    display: flex;
    align-items: center;
}

.content-section .content-card ul li i {
    margin-right: 0.5rem;
    color: var(--primary-slate);
}

.content-section .content-card strong {
    font-weight: 600;
}

/* Footer */
footer {
    background: var(--accent-dark-slate);
    color: var(--secondary-light-slate);
    padding: 3rem 0 1rem;
    border-radius: 20px 20px 0 0;
    width: 100%;
}

footer .col-md-4 {
    padding: 1.5rem;
    text-align: center;
}

footer h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    color: var(--secondary-light-slate);
    margin-bottom: 1rem;
}

footer p,
footer a {
    color: var(--neutral-blue);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--secondary-light-slate);
}

footer .social-icons a {
    font-size: 1.3rem;
    margin: 0 0.5rem;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    font-size: 0.85rem;
    color: var(--neutral-blue);
    border-top: 1px solid rgba(167, 169, 214, 0.2);
    margin-top: 1rem;
}

.footer-logo {
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-light-slate) !important;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    text-shadow: 0 0 5px rgba(167, 169, 214, 0.5);
    display: block;
    margin-bottom: 1rem;
}

.footer-logo:hover {
    color: var(--secondary-light-slate) !important;
    text-shadow: 0 0 10px rgba(167, 169, 214, 0.8);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .breadcrumbs .container,
    .header-section .container,
    .tool-section .container,
    .frequency-section .container,
    .content-section .content-container {
        max-width: 90%;
    }
    .header-section h1 {
        font-size: 2.2rem;
    }
    .header-section p {
        font-size: 1.1rem;
    }
    .tool-section h2 {
        font-size: 2rem;
    }
    .tool-container {
        max-width: 700px;
    }
    .tool-container .output {
        font-size: 1.8rem;
    }
    .content-section .content-card h2 {
        font-size: 1.6rem;
    }
    .content-section .content-card h3 {
        font-size: 1.4rem;
    }
    .frequency-section .container {
        max-width: 700px;
    }
}

@media (max-width: 992px) {
    .navbar-brand {
        font-size: 1.8rem;
    }
    .navbar-nav {
        gap: 0.5rem;
    }
    .navbar-nav .nav-item {
        margin: 0 0.5rem;
    }
    .navbar-nav .nav-link {
        font-size: 0.9rem;
        padding: 0.3rem 0.8rem;
    }
    .header-section h1 {
        font-size: 2rem;
    }
    .header-section p {
        font-size: 1rem;
    }
    .tool-container {
        padding: 1.5rem;
        max-width: 600px;
    }
    .tool-container label,
    .tool-container input,
    .tool-container select {
        font-size: 1rem;
    }
    .tool-container .btn-generate {
        font-size: 0.95rem;
    }
    .tool-container .output {
        font-size: 1.6rem;
        min-height: 70px;
    }
    .tool-container .emoji {
        font-size: 1.3rem;
    }
    .tool-container .available-chars {
        font-size: 1rem;
    }
    .content-section .content-card {
        padding: 1rem;
    }
    .frequency-section .container {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .breadcrumbs .container {
        max-width: 100%;
    }
    .navbar-brand {
        font-size: 1.6rem;
    }
    .navbar-nav {
        flex-direction: column;
        gap: 0.3rem;
        align-items: center;
    }
    .navbar-nav .nav-item {
        margin: 0.2rem 0;
    }
    .navbar-nav .nav-link {
        font-size: 0.9rem;
        padding: 0.3rem 0.8rem;
        justify-content: center;
    }
    .header-section {
        padding: 2rem 0;
    }
    .header-section h1 {
        font-size: 1.8rem;
    }
    .header-section p {
        font-size: 0.95rem;
        max-width: 90%;
    }
    .tool-section {
        padding: 2rem 0;
    }
    .tool-container {
        padding: 1rem;
    }
    .tool-container input,
    .tool-container select {
        padding: 0.5rem;
        font-size: 0.95rem;
    }
    .tool-container .btn-generate {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    .tool-container .output {
        font-size: 1.4rem;
        padding: 1rem;
        min-height: 60px;
    }
    .tool-container .emoji {
        font-size: 1.2rem;
    }
    .tool-container .available-chars {
        font-size: 0.9rem;
    }
    .content-section {
        padding: 2rem 0;
    }
    .content-section .content-container {
        padding: 1rem;
    }
    .content-section .content-card {
        padding: 1rem;
    }
    .content-section .content-card h2 {
        font-size: 1.4rem;
    }
    .content-section .content-card h3 {
        font-size: 1.3rem;
    }
    .frequency-section {
        padding: 1.5rem 0;
    }
    .frequency-section .container {
        padding: 1rem;
    }
    footer .col-md-4 {
        padding: 1rem;
    }
    footer h3 {
        font-size: 1.3rem;
    }
    footer p,
    footer a {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .breadcrumbs a,
    .breadcrumbs .active {
        font-size: 0.8rem;
    }
    .header-section h1 {
        font-size: 1.6rem;
    }
    .header-section p {
        font-size: 0.9rem;
    }
    .tool-section h2 {
        font-size: 1.8rem;
    }
    .tool-container .output {
        font-size: 1.3rem;
    }
    .tool-container .emoji {
        font-size: 1.1rem;
    }
    .tool-container .available-chars {
        font-size: 0.85rem;
    }
    .content-section .content-card h2 {
        font-size: 1.3rem;
    }
    .content-section .content-card h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 320px) {
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .navbar-brand {
        font-size: 1.4rem;
    }
    .navbar-nav .nav-link {
        font-size: 0.85rem;
        padding: 0.2rem 0.6rem;
    }
    .header-section h1 {
        font-size: 1.4rem;
    }
    .header-section p {
        font-size: 0.85rem;
    }
    .tool-section h2 {
        font-size: 1.6rem;
    }
    .tool-container label,
    .tool-container input,
    .tool-container select {
        font-size: 0.9rem;
    }
    .tool-container .btn-generate {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    .tool-container .output {
        font-size: 1.2rem;
    }
    .tool-container .emoji {
        font-size: 1rem;
    }
    .tool-container .available-chars {
        font-size: 0.8rem;
    }
    .content-section .content-card h2 {
        font-size: 1.2rem;
    }
    .content-section .content-card h3 {
        font-size: 1.1rem;
    }
    footer h3 {
        font-size: 1.1rem;
    }
    footer p,
    footer a {
        font-size: 0.8rem;
    }
    .copyright {
        font-size: 0.75rem;
    }
    .footer-logo {
        font-size: 1.8rem;
    }
}