:root {
    --primary-blue: #013d7a;
    --secondary-blue: #0066cc;
    --accent-pink: #ff3366;
    --accent-green: #00cc66;
    --accent-purple: #9933cc;
    --light-bg: #f0f7ff;
    --card-bg: #ffffff;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #e1e8f0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --footer-bg: #0a192f;
    --footer-text: #ccd6f6;
    --footer-heading: #e6f1ff;
    --footer-border: #233554;
    --footer-hover: #64ffda;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #f0f7ff 0%, #e4edf5 100%);
    color: #2b2d42;
    line-height: 1.6;
    min-height: 100vh;
}

/* Header Styles */
.header {
    background: white;
    position: sticky;
    top: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: var(--shadow);
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo a {
    text-decoration: none;
    color: var(--footer-bg);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.logo a:hover {
    color: var(--accent-pink);
}

/* Navigation */
.nav-links {
    display: flex;
    margin-left: 30px;
}

.nav-item {
    position: relative;
    color: black;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 10px 16px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.links a {
    color: black;
    text-decoration: none;
    transition: all 0.3s ease;
}

.links a:hover {
    color: var(--accent-pink);
}

.nav-item:hover {
    color: var(--accent-pink);
}

.dropdown-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-item:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Mega Dropdown Styles */
.mega-dropdown {
    position: absolute;
    top: 45px;
    left: -750px;
    background-color: white;
    width: 1200px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 30px;
    display: none;
    z-index: 1001;
    grid-template-columns: repeat(6, 1fr);
    border-top: 3px solid var(--accent-pink);
}

.nav-item:hover .mega-dropdown {
    display: grid;
    animation: fadeIn 0.3s ease;
}

.dropdown-section h3 {
    color: var(--primary-blue);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.dropdown-section h3 i {
    margin-right: 10px;
    color: var(--accent-pink);
    background: rgba(255, 51, 102, 0.1);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dropdown-link {
    display: flex;
    align-items: center;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.7rem;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.dropdown-link:hover {
    background-color: #f0f7ff;
    color: var(--accent-pink);
}

.dropdown-link i {
    margin-right: 12px;
    color: var(--secondary-blue);
    width: 20px;
    text-align: center;
    font-size: 14px;
}

/* Mobile Toggle */
.mobile-toggle {
    margin-left: auto;
    display: none;
    background: none;
    border: none;
    color: var(--accent-pink);
    font-size: 24px;
    cursor: pointer;
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: white;
    z-index: 999;
    transition: all 0.4s ease;
    overflow-y: auto;
    padding: 20px;
    box-shadow: var(--shadow);
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-category {
    margin-top: 20px;
}

.mobile-category-title {
    font-size: 18px;
    color: var(--primary-blue);
    font-weight: 500;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-pink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-category-title i {
    color: var(--accent-pink);
}

.mobile-tool-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 8px;
    font-weight: 500;
    transition: all 0.2s;
    background: #f8fafd;
    color: var(--text-dark);
}

.mobile-tool-link:hover {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    transform: translateX(5px);
    color: var(--accent-pink);
}

.mobile-tool-link i {
    margin-right: 15px;
    color: var(--secondary-blue);
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .mega-dropdown {
        width: 700px;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .mega-dropdown {
        width: 500px;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        height: 70px;
    }

    .logo a {
        font-size: 22px;
    }

    .mobile-sidebar {
        top: 70px;
        height: calc(100vh - 70px);
    }
}

/* Stopwatch Styles */
.container {
    max-width: 1000px;
    margin: 40px auto 200px;
    padding: 0 20px;
}

.tool-title {
    text-align: center;
    margin: 30px 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 2.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: var(--footer-bg);
}

.tool-description {
    text-align: center;
    margin: 0 auto 30px;
    max-width: 900px;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Stopwatch Container */
.stopwatch-container {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 30px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.timer-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;

}

.timer-option {
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    background: var(--light-bg);
    color: var(--text-dark);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid var(--primary-blue);
}

.timer-option.active {
    background: var(--primary-blue);
    color: white;
}

.display-container {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.display {
    font-family: 'Orbitron', monospace;
    font-size: 5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 20px 0;
    background: var(--light-bg);
    border-radius: 16px;
    padding: 20px;
    letter-spacing: 3px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1);
}

.countdown-input {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.time-input {
    width: 80px;
    padding: 10px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    font-size: 1.2rem;
    text-align: center;
    background: var(--light-bg);
    color: var(--text-dark);
}

.time-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* Buttons */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-blue);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: var(--accent-pink);
    color: white;
}

.btn-secondary:hover {
    background: #e62e5c;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.btn-accent {
    background: var(--accent-green);
    color: white;
}

.btn-accent:hover {
    background: #00b359;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.btn-neutral {
    background: var(--light-bg);
    color: var(--primary-blue);
}

.btn-neutral:hover {
    background: #e1e8f0;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Lap Times */
.lap-container {
    margin-top: 40px;
    border-top: 2px solid var(--border-color);
    padding-top: 30px;
}

.lap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.lap-title {
    color: var(--text-dark);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lap-controls {
    display: flex;
    gap: 10px;
}

.lap-list {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 12px;
    background: var(--light-bg);
    padding: 15px;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.2rem;
    font-family: 'Courier New', monospace;
}

.lap-item:last-child {
    border-bottom: none;
}

.lap-number {
    color: var(--accent-pink);
    font-weight: bold;
}

.lap-time {
    color: var(--primary-blue);
    font-weight: bold;
}

.lap-item.highlight {
    background: rgba(255, 51, 102, 0.1);
    border-radius: 8px;
    animation: highlight 1s ease;
}

.split-time {
    color: var(--accent-purple);
    font-weight: bold;
}

/* Footer */
.copyright {
    text-align: center;
    padding: 20px;
    color: var(--footer-text);
    background-color: var(--footer-bg);
    margin-top: 40px;
    font-size: 0.9rem;
}

/* Animation */
@keyframes highlight {
    0% {
        background-color: rgba(255, 51, 102, 0.1);
    }

    50% {
        background-color: rgba(255, 51, 102, 0.3);
    }

    100% {
        background-color: rgba(255, 51, 102, 0.1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 1.5s infinite;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .display {
        font-size: 3.5rem;
        padding: 15px;
    }

    .tool-title {
        font-size: 2rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .time-input {
        width: 70px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .display {
        font-size: 2.5rem;
    }

    .controls {
        gap: 10px;
    }

    .btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .time-input {
        width: 60px;
        padding: 8px;
    }
}