
* {
    box-sizing: border-box; 
}

body {
    font-family: 'Arial', 'Roboto', 'Helvetica', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f7fb;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; 
    width: 100%;
    max-width: 100vw;
    line-height: 1.6;
}

.header {
            background-color: white;
            box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
            top: 0;
    margin-bottom: 10px;
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            height: 80px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 24px;
            font-weight: bold;
            text-decoration: none;
            color: #333;
        }

        .nav-links {
            display: flex;
            align-items: center;
        }

        .nav-links a {
            text-decoration: none;
            color: #333;
            padding: 10px;
            transition: color 0.3s ease;
        }

        .nav-links a:hover {
            color: #FF9900;
        }

.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
    width: 30px;
    height: 30px;
    position: relative;
    background: none;
    border: none;
    box-shadow: none;
    outline: none;
    -webkit-tap-highlight-color: transparent; 
}

.hamburger:hover,
.hamburger:active,
.hamburger:focus {
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
}

.hamburger-lines {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #888;
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger-lines::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #888;
    top: -6px;
    left: 0;
    transition: transform 0.3s ease;
}

.hamburger-lines::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #888;
    bottom: -6px;
    left: 0;
    transition: transform 0.3s ease;
}

.hamburger.active .hamburger-lines {
    background-color: transparent;
}

.hamburger.active .hamburger-lines::before {
    transform: rotate(45deg);
    top: 0;
}

.hamburger.active .hamburger-lines::after {
    transform: rotate(-45deg);
    bottom: 0;
}

.container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    width: 100%;
    flex-grow: 1;
    align-items: flex-start; 
}


.sidebar {
    flex: 0 0 300px;
    background-color: #ffffff;
    color: #1f2937;        
    padding: 20px;
    border-radius: 8px;
    margin-left: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    align-self: flex-start;
}

.sidebar h3 {
    margin-top: 0;
    font-size: 18px;
    text-align: center;
    border-bottom: 2px solid #e5e7eb;  
    padding-bottom: 10px;
    color: #111827;  
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #4b5563;         
    font-weight: 500;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar ul li a:hover {
    background-color: #f3f4f6; 
    color: #111827;     
}

.table-wrapper {
      overflow-x: auto;
    }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
}

th {
    background-color: #f3f4f6;
    font-weight: bold;
}

.content {
    flex: 1;
    width: 100%;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

h1 {
    margin-top: 0;
    font-size: 26px;
    margin-bottom: 20px;
    color: #1f2937;
}

label, select, button {
    font-size: 18px;
    margin-bottom: 15px;
    display: block;
}

select, button {
    padding: 10px;
    width: 100%;
    max-width: 100%; 
    margin-top: 10px;
    border-radius: 5px;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    color: #333;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}


button {
    background-color: #3b82f6;
    color: white;
    border: none;
    cursor: pointer;
    padding: 8px 15px;
    font-size: 16px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    line-height: 1.5;
    white-space: nowrap;
}

button:hover {
    background-color: #2563eb;
}

#button-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap; 
}

#info {
    margin-top: 40px;
}

#info h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #1f2937;
}

#info h3 {
    font-size: 18px;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #333;
}

#info p {
    font-size: 16px;
    margin-top: 10px;
    margin-bottom: 15px;
    color: #4b5563;
}

#info ol, #info ul {
    list-style-position: inside; 
}

#info ol li, #info ul li {
    color: #4b5563;
}

.clock-face {
    width: 300px;
    height: 300px;
    border: 10px solid #333;
    border-radius: 50%;
    position: relative;
    margin: 20px auto;
    background: #fff;
}

.number {
    position: absolute;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-align: center;
    width: 30px;
    height: 30px;
    line-height: 30px;
    left: 50%;
    top: 50%;
    margin: -15px 0 0 -15px;
}

.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: 50% 100%;
    background: #333;
    border-radius: 4px;
}

.hour-hand {
    width: 4px;
    height: 80px;
    margin-left: -2px;
    background: #333;
}

.minute-hand {
    width: 3px;
    height: 100px;
    margin-left: -1.5px;
    background: #666;
}

.second-hand {
    width: 2px;
    height: 120px;
    margin-left: -1px;
    background: #f00;
}

.center-point {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #333;
    transform: translate(-50%, -50%);
}

.clock-container {
    text-align: center;
    position: relative;
    padding: 20px;
}

.date-display {
    margin-top: 20px;
    font-size: 18px;
    color: #333;
}

.clock-container {
    max-width: 800px;
      margin: 0 auto;
      padding: 20px;
      background: #f8f9fa;
      border-radius: 8px;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 300px; 
    }
    
    .clock-display {
        font-size: 5rem; 
        font-weight: bold;
        margin: 0; 
        padding: 1rem 0;
        font-family: monospace;
        color: #333;
        line-height: 1.2;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .date-display {
        font-size: 1.8rem;
        margin: 0; 
        padding-top: 1rem;
        color: #666;
        font-weight: 500; 
    }

    @media screen and (max-width: 768px) {
        .clock-container {
            min-height: 250px;
        }
        
        .clock-display {
            font-size: 4rem;
        }
        
        .date-display {
            font-size: 1.5rem;
        }
    }

    @media screen and (max-width: 480px) {
        .clock-container {
            min-height: 200px;
        }
        
        .clock-display {
            font-size: 3rem;
        }
        
        .date-display {
            font-size: 1.2rem;
        }
    }

.timer-container {
      max-width: 800px;
      margin: 0 auto;
      padding: 20px;
      background: #f8f9fa;
      border-radius: 8px;
}

.timer-input {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.input-group label {
    font-size: 1rem;
    color: #666;
}

.input-group input {
    width: 80px;
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 0.5rem;
}

.input-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.timer-preview {
    text-align: center;
    margin-bottom: 2rem;
}

.timer-preview h2 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 1rem;
}

#time-display {
    font-size: 5rem;
    font-weight: bold;
    color: #333;
    font-family: monospace;
}

.timer-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.control-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.control-btn {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px; 
}

#start {
    background-color: #28a745;
    color: white;
}

#start:hover {
    background-color: #218838;
}

#pause {
    background-color: #ffc107;
    color: #333;
}

#pause:hover {
    background-color: #e0a800;
}

#reset {
    background-color: #dc3545;
    color: white;
}

#reset:hover {
    background-color: #c82333;
}

.control-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.timer-options {
    display: flex;
    gap: 2rem;
    justify-content: center;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 110px;
    justify-content: flex-start;  
}

.option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0; 
}

.option-item label {
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    user-select: none;
    display: block; 
    margin: 0;
    line-height: 18px;
    white-space: nowrap;  
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

@media screen and (max-width: 480px) {

    .timer-input {
        gap: 0.75rem;
    }

    .input-group input {
        width: 60px;
        height: 40px;
        font-size: 1.2rem;
    }

    #time-display {
        font-size: 2rem;
    }

    .timer-preview h2 {
        font-size: 1.2rem;
    }

    .control-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .control-btn {
        width: 100%;
        padding: 0.7rem 1rem;
        font-size: 1rem;
        min-width: unset;
    }

    .timer-options {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

.option-item {
        justify-content: center; 
        width: 100%;  
        max-width: 200px; 
        margin: 0 auto;  
    }

    .option-item:first-child {
        margin-right: auto; 
    }

    .option-item:last-child {
        margin-left: auto;  
    }
}

@media screen and (min-width: 481px) and (max-width: 768px) {

    #time-display {
        font-size: 2rem;
    }

    .control-btn {
        min-width: 100px;
        padding: 0.7rem 1.5rem;
    }
}

.control-btn:focus,
input:focus,
input[type="checkbox"]:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

@media (hover: none) {
    .control-btn:hover {
        background-color: initial;
    }

    #start:hover {
        background-color: #28a745;
    }

    #pause:hover {
        background-color: #ffc107;
    }

    #reset:hover {
        background-color: #dc3545;
    }
}

.stopwatch-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stopwatch-display {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lap-times {
    margin-top: 2rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lap-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.lap-table th,
.lap-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
}

.lap-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.lap-table tr:hover {
    background-color: #f8f9fa;
}

.lap-table .lap-number {
    font-weight: 600;
    color: #495057;
}

.lap-table .lap-split {
    color: #28a745;
}

.lap-table .lap-total {
    color: #007bff;
}

#lap {
    background-color: #007bff;
    color: white;
}

#lap:hover {
    background-color: #0056b3;
}

@media screen and (max-width: 480px) {
    .lap-table th,
    .lap-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

.footer {
    text-align: center;
    padding: 15px;
}

.footer p {
    padding: 3px;
    font-size: 0.8em;
    color: #4b5563;
}

.footer p a {
    color: #4b5563;
    text-decoration: none;
    padding: 10px; 
}

.result-container {
background: #fff;
padding: 25px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


@media (max-width: 900px) {

    .header {
        margin-bottom: 0;
    }

            .logo {
            font-size: 20px;
        }

.nav-links {
                display: none;
                position: absolute;
                top: 60px;
                right: 0;
                background-color: white;
                width: 200px;
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
                padding: 20px;
            }

            .nav-links.active {
                display: block;
            }

            .nav-links a {
                display: block;
                padding: 10px;
            }

.hamburger {
        display: block;
    }
    
    .container {
        flex-direction: column;
        padding: 15px; 
        margin: 0; 
    }

    .sidebar {
        flex: 0 0 auto;
        margin-left: 0;
        margin-top: 20px;
        width: 100%;
        max-width: 100%;
        order: 1;
        padding: 15px; 
    }

    .content {
        order: 0;
        margin-bottom: 20px;
        padding: 20px;
        width: 100%;
        max-width: 100%;
    }

    h1 {
        font-size: 20px; 
        margin-bottom: 15px;
    }

    .sidebar h3 {
        font-size: 16px; 
    }

    #info h2 {
    font-size: 18px;
}

#info h3 {
    font-size: 1em;
}

    label, select, button {
        font-size: 16px; 
    }

    select, button {
        padding: 8px; 
    }

    #result-name {
        font-size: 28px; 
    }

    #common-link h2 {
    font-size: 18px;
}
        #common-link li {
                flex: 1 0 calc(50% - 10px);
            }
}
