* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: white;
    min-height: 100vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
}

.container {
    max-width: 600px;
    width: 100%;
    padding: 2rem;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.home-link {
    color: inherit; 
    text-decoration: none; 
    cursor: pointer; 
}

@media (max-width: 768px) {
    h1 a.home-link {
        font-size: 0.8em; 
    }
}

/* styles.css */
.instruction {
    text-align: center; 
    font-size: 0.8em;   
    margin-top: -10px;
    margin-bottom: 30px; 
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.custom-timer {
    margin-bottom: 2rem;
}

.time-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

input {
    padding: 0.5rem;
    border: none;
    border-radius: 0.3rem;
    background-color: #333;
    color: white;
    font-size: 1rem;
}

.timer-display {
    font-size: 5rem;
    font-family: monospace;
    text-align: center;
    margin: 2rem 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-all;
}

@media (max-width: 600px) {
    .timer-display {
        font-size: 4rem;
    }
}

@media (max-width: 400px) {
    .timer-display {
        font-size: 3rem;
    }
}

.timer-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

#startBtn {
    background-color: #2ecc71;
}

#startBtn:hover {
    background-color: #27ae60;
}

#pauseBtn {
    background-color: #f1c40f;
}

#pauseBtn:hover {
    background-color: #f39c12;
}

#resetBtn {
    background-color: #e74c3c;
}

#resetBtn:hover {
    background-color: #c0392b;
}

.modal {
    display: none; 
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
  }
  
.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 360px;
}
  
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
  
.close:hover, .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content p {
    font-size: 24px;
    margin: 10px 0 20px;
    color:#333;
}

.modal-content button {
    background-color: #e74c3c;
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin: 0 auto;
    display: block;
}

.modal-content button:hover {
    background-color: #c0392b;
}

footer {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    padding: 2rem;
    background-color: #1a1a1a;
    color: white;
    margin-top: auto;
}

footer p {
    margin-bottom: 0.5rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    margin: 10px auto;
}

.footer-links a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
    margin-right: 1rem;
}

.footer-links a:last-child {
    margin-right: 0;
}

.footer-links a:hover {
    color: #2980b9;
}