/* Font Definition */
@font-face {
    font-family: 'Kruti Dev 010';
    src: url('../fonts/Krutidev010.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    width: 50px;
    height: 50px;
    background: #ccc;
    margin-right: 10px;
}

.logo-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav {
    display: flex;
    align-items: center;
}

/* Hamburger Icon Styles */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 4px 0;
    transition: 0.4s;
}

/* Navigation Links Styles */
.nav-links {
    list-style: none;
    display: flex;
    gap: 15px;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: #f8f9fa;
    text-decoration: underline;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        background-color: #007bff;
        width: 100%;
        text-align: center;
        padding: 20px 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }
}

/* Container Styles */
.container {
    max-width: 1050px;
    margin: 10px auto;
    padding: 15px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #007bff;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: #e6effa;
    border-radius: 6px;
}

/* Settings Styles */
.settings {
    margin-bottom: 30px;
}

.settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.setting-item {
    flex: 1;
    min-width: 150px;
}

.full-width {
    flex: 100%;
}

.dropdown {
    padding: 10px 15px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
    font-family: 'Kruti Dev 010', sans-serif;
}

#sample-text-select option {
    font-family: 'Kruti Dev 010', sans-serif;
}

.radio-group {
    display: flex;
    flex-direction: column;
}

/* Timer and Progress Bar */
.timer-progress {
    margin-bottom: 30px;
    text-align: center;
}

.timer {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 5px;
}

.progress-bar::-webkit-progress-value {
    background-color: #007bff;
    border-radius: 5px;
}

/* Typing Area */
.typing-area {
    margin-bottom: 30px;
}

.sample-text {
    position: relative;
    height: 250px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 6px;
    background-color: #f9f9f9;
    font-family: 'Kruti Dev 010', sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.sample-text-content {
    white-space: pre-wrap;
    font-family: 'Kruti Dev 010', sans-serif;
    font-size: 22px;
    line-height: 1.6;
    color: #333;
}

.current-word {
    border-bottom: 2px dotted red;
}

/* Text Controls */
.text-controls {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 5px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 30;
    pointer-events: auto;
    overflow: auto;

}

.sample-text:hover .text-controls {
    opacity: 1;
    visibility: visible;
}

.control-btn {
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fccfd3;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    font-family: Arial, sans-serif;
}

.control-btn:hover {
    background-color: #e0e0e0;
}

.control-btn:active {
    background-color: #d0d0d0;
}

.bold-toggle.active {
    background-color: #007bff;
    color: white;
}

.user-input {
    width: 100%;
    height: 100px;
    padding: 15px;
    font-size: 22px;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: none;
    font-family: 'Kruti Dev 010', sans-serif;
    line-height: 1.6;
    color: #333;
    margin-top: 15px;
}

/* Metrics Styles */
.metrics {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 10px;
    margin-bottom: 30px;
}

.metric-box {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    flex: 1 1 150px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.metric-box strong {
    display: block;
    font-size: 1.2rem;
    color: #007bff;
    margin-bottom: 5px;
}

/* Final Results Section */
.final-results {
    margin-top: 20px;
}

.results-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.results-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.results-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.results-table tr:hover {
    background-color: #f1f1f1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 5px;
    border-radius: 8px;
    width: 90%;
    height: 70%;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    overflow-y: scroll;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer and Edge */
    -webkit-scrollbar: none; /* Chrome, Safari and other Webkit browser */
}

.close {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

.result-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-align: center;
    background-color: #e6effa;
    border-radius: 6px;  
    color: #007bff;
    font-weight: bold;
}



.kruti-dev-font {
    font-family: 'Kruti Dev 010', sans-serif;
    color: red;
}



/* Button Styles */
.btn {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.primary-btn {
    background-color: #007bff;
    color: white;
}

.primary-btn:hover {
    background-color: #0056b3;
}

.secondary-btn {
    background-color: #6c757d;
    color: white;
}

.secondary-btn:hover {
    background-color: #5a6268;
}

/* Center-Aligned Buttons */
.button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

/* Sample Text Options */
.sample-text-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#custom-sample-text {
    width: 100%;
    height: 100px;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    resize: vertical;
    font-family: 'Kruti Dev 010', sans-serif;
}

/* Footer Styles */
.footer {
    background-color: #343a40;
    color: white;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.footer-links li a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.footer-links li a:hover {
    color: #007bff;
    text-decoration: underline;
}