* {
    font-family: Poppins, Arial;      
}

body, html {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    margin: 0; /* Remove default margin */
    background-color: #e48168;
    overflow-x: hidden;  
}

input {
    padding: 10px;    
    border: 2px solid rgba(71, 53, 44, 0.5); 
    border-radius: 50px;    
    color: #183437;
    font-size: 16px;    
    outline: none; /* Remove default outline */
    margin: 10px;
}

#timer-display {
    margin-top: 20px;
    font-size: 1rem;    
}

#countdown {
    font-size: 1.8rem; 
    font-weight: bold;   
}

/* Modal styling */
.modal, .trivia-modal {
    display: none; 
    position: fixed;
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.5); 
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto; /* Allow scrolling if content overflows */
}

/* Modal content styling */
.modal-content {
    position: relative; 
    background-color: #f5e9db;
    color: #47352c; 
    padding: 20px; 
    border-radius: 10px; 
    text-align: center; 
    max-width: 50%; 
    max-height: 90%; 
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); 
    word-wrap: break-word; /* Ensure long words break and wrap within the content */
    font-size: 1.5rem;
    font-weight: 550;
}

/* Image styling */
.modal-image {
    position: absolute;
    top: 10px; 
    left: 10px; 
    right: 10px;
    bottom: 20px;
    width: 50px;
    height: auto;    
}

.trivia-modal {
    z-index: 2000; 
}

.show {
    opacity: 1;
    transition: opacity 0.5s ease-in;
}

.hide {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

#quote-container {
    text-align: center;
    margin-bottom: 20px;    
    font-style: italic;
    color: #555;
    flex: 0 1 auto; 
    padding: 0 20px;
    width: 600px;
    box-sizing: border-box; /* Include padding in width calculations */
    align-items: center;
    justify-content: center;
}

#quote {
    font-size: 1.8em;
    font-weight: 500;
    color: #47352c; 
    line-height: 1.6; /* Spacing between lines */
    margin: 0;
    padding: 50px 50px 0 50px;
    text-align: center;    
}



footer p {
    margin: 5px 0; /* Add some vertical margin between paragraphs */
    line-height: 1.5; /* Improve readability */
}

/* Media queries for mobile view */
@media (max-width: 768px) {
    #quote-container, #app {
        position: flex;        
        width: 60%; /* Ensure both containers take full width on mobile */
        padding: 0;
        box-sizing: border-box;
        align-items: center;
        justify-content: center;        
    }

    #parent-container {
        gap: 10px;        
        flex-direction: column;
        margin-top: 200px; /* Adjust space at the top of the parent-container */
    }

    #app {
        margin: 0;
        padding: 15px;
        max-width: 90%; /* Ensure the app doesn't shrink excessively */
        align-items: center;
        left: 30px;
    }

    #top-image {
        width: 300px; 
        top: -100px;
    }

    #quote {
        font-size: 1.5em;
        padding: 20px 10px 0 10px;
    }    

    footer {        
        margin-left: 30px;
        margin-bottom: 20px;              
        flex-direction: column;
        text-align: left;
        width: 50%;              
    }

    .modal-content {       
        max-width: 60%;               
    }

    .settings {        
        bottom: 20px;
        right: 10px;      
        flex-direction: column;
        gap: 5px;
    }

    .controls {
        flex-direction: column;
    }

    /* Allow scrolling in all directions */
    body {
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

#parent-container {    
    display: flex;     
    align-items: center;
    justify-content: center;    
    gap: 20px; 
    margin: 20px; 
    flex: 1;
    width: 100%; /* Ensure full width on mobile */
    box-sizing: border-box;
    min-height: 100vh;
}

#app {
    position: relative; /* Make #app the reference for absolute positioning */
    background-color: #f5e9db;
    color: #47352c; 
    border-radius: 20px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    padding: 20px;    
    width: 600px;
    margin-top: 80px; 
    text-align: center;
    align-items: center;
    justify-content: center;
    margin-right: 100px; /* Right margin to not exceed 100px */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

#top-image {
    position: absolute;
    top: -145px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: auto;
    z-index: 1;
}

#app_message {
    font-weight: 500;
}

h1 {
    font-size: 2rem;
}

select {
    padding: 10px;    
    border: 2px solid rgba(71, 53, 44, 0.5); 
    border-radius: 50px;    
    color: #183437;
    font-size: 16px;
    cursor: pointer;
    outline: none; /* Remove default outline */
}

/* Container styling */
.sound-selector-container {
    display: flex;
    align-items: center;
    gap: 10px; /* Adjust the spacing between elements */
    font-family: Arial, sans-serif; /* Font for the container */    
}

/* Select box styling */
.sound-select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.sound-select:focus {
    border-color: #007bff; /* Border color on focus */
    outline: none; /* Remove default focus outline */
}

/* Icon styling */
.play-icon {
    font-size: 24px; /* Size of the icon */
    color: #007bff; /* Icon color */
    transition: color 0.3s ease;
    cursor: pointer; /* Pointer cursor on hover */
}

.play-icon:hover {
    color: #0056b3; /* Darker shade on hover */
}

#start-task-btn {    
    margin: 10px;        
    outline: none;
    color: #ffffff;
    background: #333;
    cursor: pointer;
    position: relative;
    z-index: 0;
    border-radius: 50px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
    overflow: hidden; /* Ensures neat transitions */
  }
  
  #start-task-btn:hover {
    background: url('../assets/images/food_waiting.png') center;
    background-size: 100px;
    color: transparent; /* Make text transparent */
    height: 100px;
    width: 100px;
    transition: background 0.3s ease-in-out;
    
  }
  
  #start-task-btn:hover::before, 
  #start-task-btn:hover::after {
    display: none; /* Hide before and after effects */
  }
  
  #start-task-btn:before, #start-task-btn:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    border-radius: 50px;
    z-index: -1;
  } 


button {
    background-color: transparent;
    border: 2px solid #e48168;
    color: #e48168;
    padding: 10px 20px;
    font-size: 16px;    
    text-align: center;
    text-decoration: none;
    display: inline-block;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

button:hover {
    background-color: #e48168;
    color: #f5e9db;
}

button:active {
    background-color: #9c5341;
    border-color: #e48168;
    color: #f5e9db;
}

#snooze-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
    background-color: transparent;
    border: 2px solid #e48168;
    color: #e48168;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    display: inline-block;
}

#snooze-btn::after {
    content: ""; 
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/Cateye.gif'); 
    background-size: cover; 
    background-position: center; 
    opacity: 0; 
    transition: opacity 0.3s;
    z-index: 0; /* Lower z-index to be under the button text */
}

#snooze-btn:hover::after {
    opacity: 1;
}

#snooze-btn:hover {
    background-color: #e48168(0, 0, 0, 0.7); 
    color: #fff;
    border: 2px solid #f5e9db;
}

btn-container {
    position: relative; /* Create a positioning context for the text span */
    display: inline-block;
}

.mode-text {
    color: #183437;    
    font-size: 0.8rem;
    font-weight: bold;
    position: absolute; /* Position it relative to the container */
    bottom: calc(100% - 110px); 
    left: 50%; /* Center it horizontally */
    transform: translateX(-50%); /* Center it horizontally */
    margin-bottom: 5px; /* Space between text and button */
}

footer a {
    font-weight: bold;
}

/* Container for settings icons positioned at the bottom right */
.settings, .info {
    position: fixed;
    bottom: 30px;
    right: 30px; 
    display: flex;
    align-items: center; 
    gap: 20px;
    z-index: 1000;    
}

/* Style for each icon */
.settings img, .info img {
    width: 75px; 
    height: 75px;
    background-color: #fff;    
    cursor: pointer;    
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5); 
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

/* Hover effect for icons */
.settings img:hover, .info img:hover {
    transform: scale(1.2);     
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Click effect for icons */
.settings img:active, .info img:active {
    transform: scale(0.95); 
    background-color: #e0e0e0; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
}

.info {
    position: fixed;
    top: 20px;
    left: 5px;
    z-index: 1000;
    display: flex;
    align-items: center;    
    box-sizing: border-box;
    height: 10px;
    margin: 30px;        
}

#play-sample-icon {
    height: 30px;
    cursor: pointer;    
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;    
}

.introduction {
    max-width: 800px;
    margin: auto;
    padding: 20px;
    background-color: #f5e9db;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

#howToUse {
    display: none;
}

h1, .toogle {
    text-align: center;
    color: #47352c;
}

#intro-container {    
    display: flex;    
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
    padding: 20px;
    box-sizing: border-box; /* Include padding in height calculation */
    margin-bottom: 40px;
    color: #47352c;
}

footer {
    background-color: #e48168;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #333; 
    position: relative; /* Ensure it stays below intro-container */
    margin-top: 20px; /* Space above the footer */
    margin-bottom: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */    
}
