/* Base styles */

/* Hide the native scrollbar */
html {
    overflow: auto;
    scrollbar-width: none; /* Hide scrollbar in Firefox */
}

html::-webkit-scrollbar {
    display: none; /* Hide scrollbar in WebKit browsers */
}

/* Create a floating scrollbar */
.scrollbar-overlay {
    position: fixed;
    top: 0;
    right: 5px; /* Adjust this for spacing */
    width: 6px; /* Width of the scrollbar */
    height: 100vh;
    background: rgba(0, 0, 0, 0.3); /* Scrollbar color */
    border-radius: 3px;
    pointer-events: none; /* Allow interactions with elements underneath */
}


#submitButton,
#submitButton:active,
#submitButton:focus {
  transform: none !important;
  -webkit-transform: none !important;
  -webkit-tap-highlight-color: transparent;
}


/* Create the thumb that moves */
.scrollbar-thumb {
    position: absolute;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    transition: opacity 0.2s;
}

.scrollbar-overlay:hover .scrollbar-thumb {
    opacity: 1;
}

.page-title {

 font-size: 1.2em;
  font-weight: 800;
 
  color: #fff;

}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #f8f9fa;
    height: 50px;
}

.toolbar {
  background: linear-gradient(135deg, #2c3e50, #3498db);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  height: 50px;
}
.toolbar-buff {
  height: 65px;
}

.toolbar-top {
  /* This ensures your logo is on the left and right-buttons on the right */
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* position: relative; // Only needed if you have children with absolute positioning */
}

/* Remove position: fixed from .logo */
.logo {
  font-size: 1.2em;
  font-weight: 800;
  letter-spacing: -0.5px;
  /* position: fixed; top: 10px; left: 60px; // remove these */
  /* Rely on Flex alignment instead */
  color: #fff;

}

/* Remove position: absolute from .right-buttons */
.right-buttons {
  display: flex; 
  align-items: center;
  gap: 1rem;
  /* position: absolute; right: 0; top: 50%; transform: translateY(-50%); // remove these */
}

.nav-logo-group {
            display: flex;
            align-items: center;
            width: 100%;
}

.nav-buttons {
            display: flex;
            gap: 10px;
}

/* Logo checkmark styles */
.logo-check {
    color: #2ecc71;
    font-size: 4.2em;
    animation: checkmarkPop 0.3s ease;
    text-shadow: 0 2px 4px rgba(46,204,113,0.2);
    position: absolute;
    z-index: -1;
    opacity: 0.5;
    left: 51px;
    top: -35px;
}

@keyframes checkmarkPop {
    0% { transform: scale(0) rotate(-45deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0); }
}

/* Response status styles */
.response-status {
    max-width: 800px;
    margin: 2rem auto 3rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(to right, #f1f9f5, #f8fdfb);
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #27ae60;
    font-weight: 600;
    font-size: 1.1em;
    border: 1px solid rgba(46,204,113,0.15);
    box-shadow: 0 4px 12px rgba(46,204,113,0.08);
    transition: all 0.3s ease;
}

.response-status:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46,204,113,0.12);
}

.response-check {
    font-size: 1.5em;
    color: #2ecc71;
    text-shadow: 0 2px 4px rgba(46,204,113,0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.question-date {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2px;
}

.nav-logo-group a {
    text-decoration: none;
}

.nav-logo-group .logo {
    margin-left: 0.5rem;
    display: inline-block;
}

.prev-question {
    margin-right: 0.1rem;
}

.prev-question {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    color: white;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.1);
}

.prev-question:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(-2px);
}

.daily-question {
    font-size: 3.6em;
    text-align: center;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    line-height: 1.2;
    position: relative;
    padding: 2px 15% 3px;

    margin-top: 1rem;
}

.copy-url-button {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(135, 22, 255, 0.313);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

.copy-url-button:hover {
    background: rgba(0, 0, 0, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.copy-url {
    z-index: 9999999999;
}

.login {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.login a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9em;
    border: 1px solid rgba(255,255,255,0.1);
}

.login a:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

/* Responses layout */
.responses {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.response-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.response-item {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 2rem;
    flex: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.response-content {
    cursor: pointer;
    margin-bottom: 1rem;
}

.response-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.response-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.response-item:hover::before {
    opacity: 1;
}

/* Vote section */
.vote-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 1rem;
}

.vote-number {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
    min-width: 40px;
    text-align: center;
}

.vote-buttons {
    display: flex;
    gap: 0.5rem;
}

.vote-buttons a {
    text-decoration: none;
    color: #3498db;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: rgba(52,152,219,0.1);
}

.vote-buttons a:hover {
    color: #fff;
    background: #3498db;
    transform: translateY(-2px);
}

/* Dynamic text sizes */
.row-1 .response-item {
    font-size: 1.8em;
    font-weight: 700;
    line-height: 1.4;
}

.row-2 .response-item {
    font-size: 1.4em;
    font-weight: 600;
    line-height: 1.5;
}

.row-3 .response-item {
    font-size: 1.2em;
    font-weight: 500;
    line-height: 1.6;
}

.response-text {
    color: #2c3e50;
    position: relative;
    padding-bottom: 2rem;
}

.response-signature {
    text-align: right;
    font-style: italic;
    color: #666;
    font-size: 0.7em;
    position: absolute;
    bottom: 0;
    right: 0;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000 !important; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
  
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 3rem;
    width: 90%;
    max-width: 800px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease;
}

.modal-question {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #2c3e50;
    line-height: 1.4;
    text-align: center;
}

.modal #modal-response {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 2rem;
    z-index: 9999999999999999999999999;

}

.modal .response-signature {
    font-size: 0.9em;
    margin-top: 1rem;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.modal-vote-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-vote-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-vote-buttons button {
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    color: #3498db;
}

.modal-vote-buttons button:hover {
    background: rgba(52,152,219,0.1);
    transform: translateY(-2px);
}

.modal-vote-count {
    font-size: 1.4em;
    font-weight: 600;
    color: #2c3e50;
    min-width: 50px;
    text-align: center;
}

.modal-sharing {
    display: flex;
    gap: 1rem;
}

.modal-sharing button {
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-sharing button:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2em;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: rgba(0,0,0,0.05);
}

.close:hover {
    color: #333;
    background: rgba(0,0,0,0.1);
    transform: rotate(90deg);
}


/* Container for the form */
.submit-response {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 2rem;
}

/* Initially display the form in a row layout */
.submit-response form {
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

/* Compact textarea with right margin to accommodate the button */
.submit-response textarea {
  flex: 1;
  min-height: 20px;           /* Compact single-line height */
  padding: 0.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1em;
  resize: none;
  transition: all 0.3s ease;
  margin-right: 1rem;
}

/* Compact button placed on the right */
.submit-response button {
  padding: 0.5rem 1rem;       /* Compact button padding */
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9em;
  transition: all 0.3s ease;
}

/* Expanded state: switch form layout to column so the button moves below */
.submit-response:focus-within form {
  flex-direction: column;
  align-items: stretch;
}

/* Expand the textarea when focused and remove right margin */
.submit-response:focus-within textarea {
  min-height: 120px;          /* Expanded height for multi-line input */
  padding: 1.25rem;
  resize: vertical;
  margin-right: 0;
}

/* Move the button below the textarea in expanded state */
.submit-response:focus-within button {
  position: static;           /* Reset any absolute positioning */
  margin-top: 1rem;           /* Add space above the button */
  padding: 1rem 2rem;         /* Enlarged button padding */
  font-size: 1.1em;           /* Slightly larger font */
  align-self: flex-end;       /* Optionally align the button to the right */
}

.submit-response button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46,204,113,0.3);
}

/* Animations */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

 .all-button {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: #f0f0f0;
            color: #555;
            text-decoration: none;
            transition: background-color 0.3s;
        }
        
        .all-button:hover {
            background-color: #e0e0e0;
        }
        
        .active-page {
            background-color: #007bff;
            color: white;
        }



        .username-display {
    position: absolute;
    top: 55px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    z-index: 1001;
}

.top-right-box {
    position: fixed;
    top: 0px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0);
    padding: 15px;
    z-index: 1000;
}



/* Mobile styles */
@media (max-width: 768px) {
.username-display {
    position: absolute;
    right: 145px;            /* Anchor at the parent's right edge */
    top: -1.76rem;         /* Maintain vertical offset as needed */
    font-size: 0.9em;    /* Responsive font size */
    text-align: right;   /* Align text so that it grows leftwards */
    white-space: nowrap; /* Prevent wrapping if desired */
    z-index: 1001
}

.top-right-box {
    position: fixed;
    top: 0px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0);
    padding: 15px;
    z-index: 1000;
}


    /* Append a colon after the username */
    .username-display:after {
        content: ":";
    }


    .login {
        position: absolute;
        top: 0.1rem;
        right: 0.1rem;
    }
  
     .logo {
            font-size: 1.0em;
            padding: 0.rem;
             position: absolute;
            top: -0.1rem;
            right: 1.4rem;
            z-index: 1001;
            transition: text-shadow 0.3s ease; /* Smooth transition */
}

.logo:hover {
    text-shadow: 0 0 10px gold, 0 0 20px gold; /* Gold glowing effect */
}
    


 .toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    min-height: 60px;
    z-index: 100; /* Ensure it sits above other content */
  }
   .toolbar-buff {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    min-height: 60px;
    z-index: 10; /* Ensure it sits above other content */
  }

    
            .toolbar-top {
                flex-direction: column;
                align-items: center;
                padding-top: 10px;
            }
            
            .nav-logo-group {
                flex-direction: column;
                align-items: center;
            }
            
            .back-button {
                position: absolute;
                left: 10px;
                top: 10px;
                transform: none;
            }
            
         
            
              .nav-logo-group .right-buttons {
    order: 2;
    position: sticky;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    width: 100%;
  }
          

            
            .auth-container {
                margin: 20px auto;
                width: 90%;
            }
        
    
    .nav-buttons {
        margin-top: 0.45rem;
        margin-left: .2rem;
    }
    
    .prev-question {
        margin-right: 0.3rem;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

 .daily-question {
    font-size: 2.5em;
    text-align: center;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    line-height: 1.2;
    position: relative;
    padding: 2px 6% 3px;
    margin-top: 1rem;
}

    .navigation-buttons {
        display: flex;
        align-items: center;
    }

    .login {
        display: flex;
        gap: 0.3rem;
        flex-wrap: wrap;
    }

    .login a {
        padding: 0.35rem 0.25rem;
        font-size: 0.85em;
    }
    
    .login .all-button {
        margin-right: 0.3rem;
    }
    
    /* Highlight active page button */
    .login .active-page {
        background: rgba(255,255,255,0.3);
        font-weight: bold;
    }

    .copy-url-button {
        width: 32px;
        height: 32px;
    }

    .responses {
        padding: 1rem;
    }

    .response-row {
        flex-direction: column;
        gap: 1rem;
    }

    .response-item {
        padding: 1.5rem;
    }

    .row-1 .response-item {
        font-size: 1.4em;
    }

    .row-2 .response-item {
        font-size: 1.2em;
    }

    .row-3 .response-item {
        font-size: 1.1em;
    }

 .modal-content {
    width: 100%;
    max-width: 600px; /* Optional: prevent it from being too wide on larger screens */
    margin: 5% auto;
    padding: 2rem;
    box-sizing: border-box; /* Prevent padding from increasing total width */
}


    .modal-actions {
        flex-direction: column;
        gap: 1.5rem;
    }

    .modal-sharing {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .modal-sharing button {
        flex: 1;
        min-width: 140px;
        justify-content: center;
    }

}

