:root {
  --primary-color: #007BFF;
  --secondary-color: #f8f9fa;
  --text-color: #333;
  --border-color: #dee2e6;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background-color: var(--secondary-color);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: #fff;
  box-shadow: 0 2px 10px var(--shadow-color);
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 24px;
  text-decoration: none;
  color: var(--primary-color);
}

nav a {
  margin-left: 20px;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #0056b3;
}

.breadcrumb {
  margin: 15px 0;
  color: #6c757d;
  font-size: 14px;
}

.tool-box {
  background: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--shadow-color);
  text-align: center;
}

.tool-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.description {
  max-width: 650px;
  margin: 0 auto 25px auto;
  font-size: 1.1rem;
  color: #555;
}

.timer-display {
    font-family: 'Roboto Mono', monospace;
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--text-color);
    background-color: #f1f3f5;
    padding: 20px 40px;
    border-radius: 10px;
    margin: 20px auto;
    display: inline-block;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    letter-spacing: 2px;
}

.controls {
    margin: 25px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.controls button {
    font-size: 1.2rem;
    padding: 12px 30px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    color: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#startStopBtn {
    background-color: var(--success-color);
}

#startStopBtn.running {
    background-color: var(--danger-color);
}

#resetBtn {
    background-color: #6c757d;
}

#lapBtn {
    background-color: var(--warning-color);
    color: #333;
}

.controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.laps-container {
    margin-top: 30px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    background-color: #f8f9fa;
}

.laps-container h2 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

#lapsList {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

#lapsList li {
    display: flex;
    justify-content: space-between;
    padding: 10px 5px;
    border-bottom: 1px solid #e9ecef;
    font-size: 1.1rem;
}

#lapsList li:last-child {
    border-bottom: none;
}

#lapsList .lap-label {
    font-weight: 600;
    color: #555;
}

#lapsList .lap-time {
    font-family: 'Roboto Mono', monospace;
    color: var(--text-color);
}

section {
    background: #fff;
    padding: 25px;
    margin-top: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.card img {
  width: 50px;
  height: 50px;
  margin-bottom: 10px;
}

.card button {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.card button:hover {
    background-color: #0056b3;
}

.faq-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  border-left: 4px solid var(--primary-color);
}

footer {
  text-align: center;
  padding: 20px;
  background: #fff;
  margin-top: 40px;
  box-shadow: 0 -2px 10px var(--shadow-color);
}

#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  display: none;
  transition: opacity 0.3s, transform 0.3s;
}

#backToTop:hover {
    opacity: 0.9;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .timer-display {
        font-size: 3rem;
    }
    h1 {
        font-size: 2rem;
    }
    .controls {
        flex-direction: column;
    }
}
/* style.css */

/* --- Global Styles & Variables --- */
:root {
  --primary: #0056ff;
  --secondary: linear-gradient(135deg, #00E0FF, #00FFFF); /* Bright Cyan Gradient */
  --text: #222;
}

body {
  font-family: Poppins, sans-serif;
  margin: 0;
  background: var(--secondary);
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

/* --- Header Styles --- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #0056ff, #00aaff);
  padding: 15px 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: auto;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo-img {
  margin-right: 12px;
  filter: brightness(1) invert(0.9) sepia(0.8) saturate(3) hue-rotate(45deg);
}

.logo-text {
  font-size: 24px;
  color: #fff;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
  font-weight: 700;
}

/* Navbar links */
#navbar {
  display: flex;
  align-items: center;
  gap: 20px;
}

#navbar a {
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 5px 0;
}

#navbar a:hover {
  color: #fffa;
  transform: scale(1.1);
}

/* Hamburger Icon */
#hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1002;
}

#hamburger span {
  width: 25px;
  height: 3px;
  background: #fff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Dropdown styles */
.dropdown {
  position: relative;
}

.dropbtn {
  background: none;
  border: none;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  font-family: Poppins, sans-serif;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #0056ff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  min-width: 180px;
  z-index: 999;
  border: 1px solid #004acb;
}

.dropdown-content a {
  display: block;
  padding: 10px 15px;
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
  background-color: #004acb;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* --- Mobile Responsive Menu --- */
@media screen and (max-width: 768px) {
  #hamburger {
    display: flex;
  }

  #navbar {
    position: fixed;
    top: 80px;
    right: 15px;
    width: 250px;
    background: linear-gradient(180deg, #0056ff, #00399d);
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
    gap: 0;
    box-shadow: -5px 5px 15px rgba(0,0,0,0.25);
    z-index: 1001;
    border-radius: 12px;
    transform: translateX(110%);
    transition: transform 0.3s ease-in-out;
  }

  #navbar.show {
    display: flex;
    transform: translateX(0);
  }

  #navbar a, .dropdown {
    padding: 15px 25px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
  }

  .dropdown-content {
    position: static;
    display: none;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: none;
    border-radius: 0;
    border: none;
    min-width: 100%;
  }

  .dropdown-content a {
    color: #e0f7ff;
    font-weight: normal;
    padding-left: 40px;
  }

  .dropdown.active .dropdown-content {
    display: block;
  }
}

/* --- Footer Styles --- */
footer a {
  text-decoration: none;
  color: var(--primary);
  margin-right: 15px;
}

footer a:hover {
  color: #0039c1;
}

/* Social media icon hover effect */
.footer-social a:hover {
    transform: scale(1.15);
}