/* General Reset and Layout */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #ec8f8f, #93b4e2);
    color: #333;
    scroll-behavior: smooth;
}

/* Header */
header {
    background: linear-gradient(135deg, #1d45a1, #b94dbb);
    color: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
    list-style: none;
}

header.sticky {
    background-color: rgba(30, 30, 30, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Logo */
.logo {
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #ffaa00;
}

/* Menu Icon */
.menu-icon {
    display: none;
    font-size: 32px;
    cursor: pointer;
    color: #fff;
}

/* Navigation Links */
.nav-links {
    display:  inline-flex;
    list-style: none;
    margin-left: 5rem;
    padding: 0;
    gap: 30px;
    text-align: center;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-size: 16px;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links a:hover {
    background-color: #ffaa00;
    color: #000;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown .dropbtn {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.dropdown .dropbtn:hover {
    background-color: #ffaa00;
    color: #000;
}

.dropdown-content {
    display: none;
    position: absolute;
    font-size: medium;
    top: 100%;
    left: 0;
    padding-left: 0px;
    background: #333;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    z-index: 999;
}

.dropdown-content a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    padding: 0;
    display: block;
    transition: background-color 0.3s ease;
    list-style: none;
    width: 120px;
}

.dropdown-content a:hover {
    background-color: #ffaa00;
    color: #000;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Dark Mode Toggle Button */
.theme-toggle-btn {
    background: none;
    border: 2px solid #00aaff;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background-color: #ffaa00;
    color: #000;
}

/* Mobile Menu */
@media (max-width: 768px) {
    header {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .menu-icon {
        display: block;
        font-size: 20px;
        margin: 5px;
    }

    .nav-links {
        position: fixed;
        top: 55px;
        left: -300px;
        flex-direction: column;
        width: 125px;
        margin-left: 0;
        height: 750px;
        background-color: rgba(30, 30, 30, 0.95);
        padding: 0;
        gap: 10px;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5);
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .nav-links.show {
        left: 0;
        font-size: 15px;
    }

    .nav-links a {
        text-align: left;
        padding: 12px 20px;
        font-size: 15px;
        margin-top: 5px;
    }

    .dropdown-content {
        padding: 0;
        width: 125px;
        font-size: 12px;
        background-color: rgba(30, 30, 30, 0.95);
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5);
        transition: left 0.3s ease;
    }
}


/* Main Content */
main {
    padding: 2rem;
    text-align: center;
}

main h1 {
    font-size: 2.5rem;
    color: #452727;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

main .welcometext h3 {
    color: #842401;
}

main p {
    font-size: 1.2rem;
    color: #0d0d0d;
    margin-bottom: 2rem;
}

/* Responsive Styles */
@media only screen and (max-width: 768px) {
    main h1 {
        margin: 0;
        font-size: 1rem;
    }

    .welcometext h3 {
        display: none;
    }
}

/* Caption Categories Section */
#caption-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.category {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.category h3 {
    font-size: 1.5rem;
    color: #fa4635;
    margin-bottom: 1rem;
}

.category ul {
    list-style: none;
    padding: 0;
    color: #666;
}

.category li {
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

/* Random Caption Section Container */
#random-caption-section {
    margin: 2rem auto;
    text-align: center;
    padding: 20px;
    background: linear-gradient(to right, #4a2fc0, #d470df);
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    max-width: 700px;
}

/* Caption Textarea */
#random-caption {
    width: 90%;
    height: 80px;
    margin: 1rem auto;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid #000000;
    border-radius: 8px;
    background: #ffffff;
    color: #0c0c0c;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    resize: none;
    cursor: default;
    display: block;
}

/* Button Group Container */
.button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
}

#random-caption-section button {
    background: linear-gradient(135deg, #ed5446, #ff8c40);
    color: #fff;
    font-size: 1rem;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    font-weight: 600;
    position: relative;
}

/* Button Hover Effects */
#random-caption-section button:hover {
    background: linear-gradient(135deg, rgb(235, 44, 139), rgb(220, 204, 24));
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(235, 44, 139, 0.5);
}

/* Tooltip Styling */
.copy-tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    font-size: 0.9rem;
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10;
}

/* Make Tooltip Visible */
.copy-tooltip.opacity-100 {
    opacity: 1;
    visibility: visible;
}

/* Make Tooltip Invisible */
.copy-tooltip.opacity-0 {
    opacity: 0;
    visibility: hidden;
}

/* Responsive Design for Buttons */
@media screen and (max-width: 768px) {
    .button-group {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    #random-caption-section button {
        width: 90%;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
        margin: 0 auto;
    }
}

/* Extra Small Screens */
@media screen and (max-width: 480px) {
    #random-caption-section button {
        width: 100%;
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }

    .button-group {
        gap: 10px;
    }
}


/* Footer */
#footer {
    background: #0d0d0d;
    color: #ffffff;
    padding: 3rem 2rem;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    flex: 1;
}

.footer-logo a.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #4caf50;
    text-decoration: none;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin: 0.5rem 0;
}

.footer-links ul li a {
    color: #f2f2f2;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: #4caf50;
}

.footer-social {
    flex: 1;
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: #f2f2f2;
    font-size: 1.5rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: #4caf50;
}

.footer-contact p {
    margin: 0.5rem 0;
}

.footer-contact a {
    color: #f2f2f2;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: #4caf50;
}

.footer-bottom {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid #333;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #888;
}

.footer-bottom p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
    }

    .footer-social {
        justify-content: center;
    }
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #2b2a2a;
    color: #ffffff;
}

body.dark-mode header {
    background-color: #262424;
}

body.dark-mode header nav .logo,
body.dark-mode header nav ul li a,
body.dark-mode .category ul,
body.dark-mode .category li {
    color: #f4f4f9;
}

body.dark-mode header nav ul li a:hover {
    background-color: #fdc830;
    color: #333;
}

body.dark-mode #random-caption-section button {
    background-color: #ff6b6b;
    color: #f4f4f9;
}

body.dark-mode #random-caption-section button:hover {
    background-color: #fdc830;
    color: #333;
}

body.dark-mode .category {
    background-color: #444;
}

body.dark-mode .category h3 {
    color: #f37335;
}
body.dark-mode .category p {
    color: #ffffff;
}

body.dark-mode #dark-mode-toggle button {
    background-color: rgb(243, 98, 98);
    color: #333;
}

#dark-mode-toggle button {
    font-size: 1em;
}

#dark-mode-toggle button::before {
    font-family: "Font Awesome 5 Free";
    content: "\f186";
}

body.dark-mode #dark-mode-toggle button::before {
    content: "\f185";
}

body.dark-mode h2 {
    color: black;
}

body.dark-mode main {
    background-color: #0f0202;
}
body.dark-mode main h1{
    color: #ffffff;
}
body.dark-mode main h2{
    color: #ffffff;
}
body.dark-mode main h3{
    color: #ffffff;
}
body.dark-mode main p{
    color: #ffffff;
}



/* Responsive Design */
@media screen and (max-width: 768px) {
    header nav ul {
        display: none;
    }

    #caption-categories {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    #random-caption-section button {
        width: 100%;
        font-size: 1rem;
    }
}