

/*------------ VARIABLES --------------*/

[data-theme="light-mode"] {
    --body-bg-color: rgb(255, 255, 255);
    --navbar-box-shadow: rgba(0, 0, 0, 0.152);
    --text-color: rgba(0, 0, 0, 0.93);
    --faded-text-color: rgb(116, 112, 130);
    --toggle-bg-color: rgba(204, 204, 204, 0.314);
    --all-border-color: rgba(0, 0, 0, 0.136);
    --container-bg-color: rgba(233, 228, 228, 0.471);
    --container-border: 1px solid rgba(190, 188, 188, 0.349);
    --box-shadow-value: 0 4px 8px rgba(0, 0, 0, 0.119);
    --read-time-display-color: rgb(17, 0, 255);
    --input-bg-color: rgba(6, 101, 218, 0.053);
    --input-text-color: rgba(0, 0, 0, 0.862);
    --input-border-value: 1px solid rgba(0, 0, 0, 0.627); 
    --button-border: 1px solid rgba(206, 203, 203, 0.796);
    --reset-btn-bg-color: rgba(144, 140, 140, 0.327);
    --reset-btn-text-color: rgba(0, 0, 0, 0.862);
    --reset-btn-bg-hover-color: rgba(177, 176, 176, 0.407);
}

[data-theme="dark-mode"] {
    --body-bg-color: rgb(2, 2, 18);
    --navbar-box-shadow: rgba(234, 225, 225, 0.136);
    --text-color: rgba(255, 255, 255, 0.925);
    --faded-text-color: rgb(149, 149, 158);
    --toggle-bg-color: rgba(204, 204, 204, 0.105);
    --all-border-color: rgba(201, 198, 198, 0.227);
    --container-bg-color: rgba(147, 143, 143, 0.247);
    --container-border: rgba(190, 188, 188, 0.086);
    --box-shadow-value: 0 4px 8px rgba(186, 183, 183, 0.26);
    --read-time-display-color: rgb(0, 251, 255);
    --input-bg-color: rgb(18, 18, 42);
    --input-text-color: rgba(255, 255, 255, 0.704);
    --input-border-color: rgba(11, 11, 11, 0.87); 
    --button-border: rgba(206, 203, 203, 0.796);
    --reset-btn-bg-color: rgb(197, 193, 193);
    --reset-btn-text-color: rgba(0, 0, 0, 0.862);
    --reset-btn-bg-hover-color: rgba(177, 176, 176, 0.097);
}

/*------------ Styles --------------*/
body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    background-color: var(--body-bg-color);
    transition: all .3s ease-in-out;
}

nav {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--body-bg-color);
    box-shadow: 0 4px 6px var(--navbar-box-shadow);
}

.logo-container {
    width: auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
}

.logo-container img {
    width: 80px;
    height: 80px;
    padding: 0;
    margin: 0;
}

.logo-container h2 {
    font-size: 1.8rem;
    color: var(--text-color);
}

#theme-toggle-wrapper {
    width: 65px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border: 2px solid var(--all-border-color);
    border-radius: 50px;
    background-color: var(--toggle-bg-color);
    margin-right: 20px;
    cursor: pointer;
}

.path {
    width: 30px;
    height: 30px;
    margin: 3px;
    border-radius: 50%;
    background-color: rgb(0, 0, 0);
    transition: 0.3s ease-in-out;
}

#theme-toggle-wrapper.active .path {
    background-color: rgb(7, 210, 7);
    transform: translateX(30px);
}

main {
    width: 60%;
    height: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* justify-content: flex-start; */
    background-color: transparent;
    border: 1px solid white;
}

.title-container{
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

h1 {
    color: var(--text-color);
    width: 60%;
    font-size: 4rem;
    margin-bottom: 0;
    margin-top: 10px;
}

#text-input {
    min-width: 60%;
    max-width: 60%;
    min-height: 150px;
    max-height: 150px;
    overflow: hidden;
    padding: 15px;
    color: var(--input-text-color);
    border: 2px solid var(--all-border-color);
    outline: none;
    border-radius: 10px;
    font-size: 18px;
    margin-bottom: 2px;
    margin-top: 20px;
    background-color: var(--input-bg-color);
}

.checkbox-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 75%;
    padding: 0;
    margin-top: 10px;
}

#checkbox-with-space,
#checkbox-without-space {
    width: 14px;
    height: 14px;
    margin: 0;
    padding: 30px;
    font-size: 40px;
    margin-right: 0;
}

label {
    margin-left: 0;
    font-size: 14px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: var(--faded-text-color);
}

#read-time-display {
    width: 150px;
    padding: 4px;
    color: red;
    font-weight: bold;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: rgb(255, 0, 0);
    color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(20, 20, 20, 0.278);
    text-align: center;
    opacity: 0;
    transition: all .4s ease;
    z-index: 9999;
    display: none;
    padding: 20px;
    font-size: 18px;
}

.modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.button-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 40%;
    margin-top: 40px;
    margin-right: 310px;
}

#counter-btn {
    margin: 5px;
    padding: 8px;
    width: 50%;
    height: 50px;
    padding: 10px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    background-color:#ff00f2;
    color: white;
    transition: all 0.5s ease;
}

#counter-btn:hover {
    color: white;
    cursor: pointer;
    background-color: rgb(251, 153, 6);
}

#counter-reset-btn {
    margin: 5px;
    padding: 8px;
    width: 40%;
    height: 50px;
    padding: 10px;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid var(--all-border-color);
    border-radius: 50px;
    background-color: var(--reset-bg-color);
    color: var(--text-color);
    transition: all 0.5s ease;
    cursor: pointer;
}

#counter-reset-btn:hover {
    background-color: var(--reset-btn-bg-hover-color);
}

.div-container {
    /* display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr); */
    display: flex;
    gap: 20px;
    width: 100%;
    height: auto;
    padding: 10px;
    margin-top: 20px;
    border-radius: 3px;
}

.div-container div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 10rem;
    height: 10rem;
    padding: 10px;
    margin: 5px;
    border: var(--container-border);
    border-radius: 5px;
    box-shadow: var(--box-shadow-value);
    background-color: var(--container-bg-color);
}

.read-time-container {
    display: flex;
    align-items: center;
}

#reading-time-display {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    width: 80px;
    height: 20px;
    padding: 5px;
    border-radius: 5px;
    color: var(--read-time-display-color);
    background-color: rgba(151, 151, 151, 0.159);
    margin-left: 5px;
    margin-right: 5px;
}

span {
    font-size: 4rem;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: var(--text-color);
}

.sub-container p {
    font-size: 1.2rem;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: var(--faded-text-color);
}

/*------------------RESPONSIVENESS-------------------*/
@media (max-width: 768px) {
    main {
        width: 90%;
    }

    #text-input {
        min-width: 100%;
        max-width: 100%;
        min-height: 80px;
        font-size: 14px;
    }

    .checkbox-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 110%;
    }

    .read-time-container {
        margin-left: 8px;
    }

    label,
    .sub-container-one p,
    .sub-container-two p,
    .sub-container-three p,
    .sub-container-four p {
        font-size: 14px;
    }

    .button-container {
        display: flex;
        flex-direction: column;
        width: 110%;
        margin-top: 20px;
    }

    #counter-btn {
        width: 100%;
        height: 40px;
        font-size: 16px;
    }

    #counter-reset-btn {
        width: 100%;
        height: 40px;
        font-size: 16px;
    }

    .div-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 105%;
    }
    
    .div-container div {
        width: 100%;
    }

    #reading-time-display {
        font-size: 14px;
        width: 60px;
    }

    span {
        font-size: 36px;
    }
}