* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #f4f7fb;
    margin: 0;
    padding: 0;
}


.container {
    max-width: 900px;
    margin: auto;
    text-align: center;
}


.brand {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: bold;
}


h1 {
    font-size: 40px;
    color: #222;
}


p {
    color: #666;
}


textarea {
    width: 100%;
    height: 250px;
    padding: 20px;
    font-size: 18px;
    border-radius: 12px;
    border: 1px solid #ccc;
    margin-top: 20px;
    resize: none;
}


textarea:focus {
    outline: none;
}


.buttons {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}


button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    background: black;
    color: white;
}


button:hover {
    opacity: 0.8;
}


.limit-checker {
    background: white;
    margin-top: 25px;
    padding: 20px;
    border-radius: 15px;
}


.limit-checker input {
    padding: 10px;
    width: 250px;
    font-size: 16px;
}


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


.card {
    background: white;
    padding: 20px;
    border-radius: 15px;
}


.card h2 {
    margin: 0;
    font-size: 30px;
}


.how-it-works {

    background: white;

    margin-top: 40px;

    padding: 25px;

    border-radius: 15px;

    text-align: left;

}


.how-it-works h2 {

    text-align: center;

}


.how-it-works li {

    margin: 10px 0;

}


footer {

    margin-top: 40px;

    padding: 20px;

    text-align: center;

    color: #777;

}

/* =====================================
   Navigation
====================================== */

nav{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:20px 40px;

    background:white;

    border-bottom:1px solid #e5e7eb;

    position:sticky;

    top:0;

    z-index:1000;

}


.logo a{

    color:#1f2937;

    text-decoration:none;

    font-size:22px;

    font-weight:bold;

}


.nav-links{

    display:flex;

    gap:25px;

}


.nav-links a{

    color:#4b5563;

    text-decoration:none;

    font-weight:600;

    transition:.2s;

}


.nav-links a:hover{

    color:#2563eb;

}


/* =====================================
   Back to Top - Word Counter Override
====================================== */

#backToTop{

    position:fixed;

    bottom:30px;

    right:30px;

    width:52px;

    height:52px;

    border:none;

    border-radius:50%;

    background:#2563eb;

    color:white;

    font-size:24px;

    font-weight:bold;

    cursor:pointer;

    display:none;

    align-items:center;

    justify-content:center;

    box-shadow:0 6px 18px rgba(0,0,0,.18);

    transition:.2s;

    z-index:999;

}


#backToTop:hover{

    background:#1d4ed8;

    transform:translateY(-3px);

}


#backToTop:active{

    transform:scale(.95);

}

@media(max-width:700px){

    button#backToTop{

        width:46px;

        height:46px;

        right:20px;

        bottom:20px;

        line-height:46px;

        font-size:21px;

    }

}
/* =====================================
   Mobile Navigation
====================================== */

@media(max-width:700px){

    nav{

        padding:18px 20px;

    }


    .nav-links{

        gap:14px;

        font-size:14px;

    }


    #backToTop{

        width:46px;

        height:46px;

        right:20px;

        bottom:20px;

        font-size:21px;

    }

}

/* =====================================
   Tools Dropdown Navigation
====================================== */

.tools-dropdown {

    position: relative;

    display: inline-block;

}


.tools-dropdown-button {

    background: none;

    border: none;

    color: #4b5563;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 16px;

    font-weight: 600;

    cursor: pointer;

    padding: 0;

    margin: 0;

}


.tools-dropdown-button:hover {

    background: none;

    color: #4b5563;

}


/* Dropdown menu */

.tools-dropdown-menu {

    display: none;

    position: absolute;

    right: 0;

    top: 100%;

    width: 240px;

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 12px;

    box-shadow: 0 10px 30px rgba(0,0,0,0.12);

    padding: 8px;

    z-index: 2000;

}


/* Keep dropdown open while hovering */

.tools-dropdown:hover .tools-dropdown-menu {

    display: block;

}


/* Dropdown links */

.tools-dropdown-menu a {

    display: block;

    padding: 11px 14px;

    color: #374151;

    text-decoration: none;

    border-radius: 8px;

    font-size: 15px;

}


.tools-dropdown-menu a:hover {

    background: #f3f4f6;

    color: #2563eb;

}


/* Current tool */

.tools-dropdown-menu a.current-tool {

    background: #eff6ff;

    color: #2563eb;

    font-weight: bold;

}


.tools-dropdown-menu a.current-tool:hover {

    background: #dbeafe;

    color: #1d4ed8;

}

/* =====================================
   Word Counter - Mobile Layout
====================================== */

@media(max-width:700px){

    .container{
        margin:15px;
        padding:20px;
    }

    h1{
        font-size:32px;
        margin-bottom:10px;
    }

    .brand{
        font-size:21px;
    }

    p{
        font-size:15px;
        line-height:1.5;
    }

    textarea{
        height:200px;
        padding:15px;
        font-size:16px;
        margin-top:15px;
    }

    .buttons{
        flex-direction:column;
        gap:10px;
    }

    .buttons button{
        width:100%;
    }

    .limit-checker{
        margin-top:20px;
        padding:18px;
    }

    .limit-checker input{
        width:100%;
        margin-top:10px;
    }

    .stats{
        grid-template-columns:1fr 1fr;
        gap:10px;
        margin-top:20px;
    }

    .card{
        padding:15px 10px;
    }

    .card h2{
        font-size:24px;
    }

    .how-it-works{
        margin-top:25px;
        padding:20px;
    }

    .how-it-works h2{
        font-size:22px;
    }

}

/* =====================================
   Share This Tool
====================================== */

.share-section {

    width: 100%;

    max-width: 700px;

    margin: 60px auto 40px auto;

    padding: 35px 25px;

    text-align: center;

    background: #f3f4f6;

    border-radius: 16px;

}


.share-section h2 {

    margin: 0 0 10px 0;

    text-align: center;

}


.share-section p {

    color: #6b7280;

    margin: 0 auto 20px auto;

    text-align: center;

}


#shareButton {

    display: block;

    margin: 0 auto;

    background: #2563eb;

    color: white;

    border: none;

    padding: 12px 24px;

    border-radius: 10px;

    font-size: 16px;

    cursor: pointer;

    transition: 0.2s;

}


#shareButton:hover {

    background: #1d4ed8;

}