/* Original Custom Styles */
.reaction-area.ready {
    background-color: #fca5a5; /* red-300 */
}
.reaction-area.go {
    background-color: #86efac; /* green-300 */
}


.url {
    color: #0066cc;
    word-break: break-all;
}

#controls .relative { /* Scoped to controls */
    margin-top: 4em;
}

.reaction-area {
    position: relative;
    /* width: 100%; */ /* Replaced by .w-full */
    /* height: 300px; */ /* Handled by h-48/md:h-64 */
    border-radius: 10px; /* Overridden by .rounded-lg */
    /* display: flex; */ /* Replaced by .flex */
    /* align-items: center; */ /* Replaced by .items-center */
    /* justify-content: center; */ /* Replaced by .justify-center */
    /* font-size: 2rem; */ /* Overridden by text-xl/md:text-2xl */
    /* color: #fff; */ /* Replaced by .text-white */
    /*transition: background-color 0.3s ease-in-out;*/ /* Overridden by .transition-colors */
}

.fixed-circle {
    position: relative;
    width: 220px;
    height: 220px;
    border: 4px solid #2563eb;
    border-radius: 50%;
    background: white;
    color: #2563eb;
    font-size: 3.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, box-shadow 0.3s;
}

#release-button.idle {
  background-color: white;
  color: #2563eb;
  box-shadow: none;
}

#release-button.pressed {
  background-color: #2563eb;
  color: white;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.4);
}

#release-button.go {
  background-color: #22c55e;
  color: white;
  border-color: #15803d;
  animation: pulse 0.6s ease-out;
}

#release-button.pressed {
  transition: background-color 0.1s ease, box-shadow 0.1s ease;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  70% { box-shadow: 0 0 0 30px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.rounded {
    border-radius: 0.25rem;
    margin: .25rem;
}


.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.p-3 { padding: 0.75rem; }


.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.d-flex { display: flex; }
.flex { display: flex; }
.grid { display: grid; }
.block { display: block; }


.justify-content-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-6 { gap: 1.5rem; }

.w-full { width: 100%; }
.h-48 { height: 12rem; }
.min-h-\[2\.5rem\] { min-height: 2.5rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }

.fs-4 { font-size: 1.5rem; }
.text-sm { font-size: 0.875rem; text-align: right !important; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; color: red;}

.text-dark { color: #111827; } /* Assuming .text-dark is similar to text-gray-900 */
.text-white { color: #ffffff; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }

.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-blue-500 { background-color: #3b82f6; }

.border { border-width: 1px; }
.border-gray-300 { border-color: #d1d5db; }
.border-collapse { border-collapse: collapse; }

.rounded-r-lg { border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem; }
.rounded-l-lg { border-top-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem; }

.cursor-pointer { cursor: pointer; }
.overflow-x-auto { overflow-x: auto; }
.uppercase { text-transform: uppercase; }

.transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }

.focus\:ring-2:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); }
.focus\:ring-blue-500:focus { --tw-ring-color: #3b82f6; }
.focus\:border-blue-500:focus { border-color: #3b82f6; }


.btn {
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.125rem;
  border-radius: 0.6rem;
}
.transition-opacity { transition: opacity 0.3s ease; }

/* Make the button larger for mobile devices */
@media (max-width: 768px) {
    .fixed-circle {
        width: 280px;  /* Increased from 220px */
        height: 280px; /* Increased from 220px */
        font-size: 4rem; /* Larger icon */
    }
    
    /* Optional: make it easier to press */
    .fixed-circle:active {
        transform: scale(0.95);
    }
}

#controls {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

#controls.hidden {
    display: none;
}


.js-loading #reaction-area {
    visibility: hidden;
}


#release-button, #reaction-area {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.js-loading #reaction-area,
.js-loading #release-button,
.js-loading #controls {
    visibility: hidden;
}

/* Style for the average result text */
.average-result-text {
    color: #2c3e50;
    background-color: #f8f9fa;
    padding: 12px 20px;
    border-radius: 8px;
    border-left: 5px solid #3498db;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 15px 0;
    text-align: right !important;
    font-size: 1.2rem;
}

/* Style for the strong tag inside average result */
.average-result-text strong {
    color: #2980b9;
    font-weight: 700;
}

/* Optional: Add animation for when the result appears */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.average-result-text {
    animation: fadeIn 0.5s ease-out;
}

/* Better touch targets */
@media (max-width: 768px) {
    #reaction-area {
        min-height: fit-content; /* Larger touch target */
    }
    
    .btn-lg {
        padding: 1rem 2.5rem; /* Larger button */
        font-size: 1.25rem;
    }
    
    /* Prevent zoom on input */
    select {
        font-size: 16px; /* Prevent iOS zoom */
    }
}

/* Ensure the button is properly centered */
#controls {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

/* Add these at the end of the file */
.instruction-card {
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    padding: 1.5rem;
    border-radius: 0.5rem;
    background-color: #f9fafb; /* gray-50 */
    color: #374151; /* gray-700 */
}

.instruction-card ul {
    list-style-type: disc;
    padding-right: 1.5rem;
    margin-bottom: 1rem;
}

.instruction-card li {
    margin-bottom: 0.5rem;
}


@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}


#rt-explanation {
  margin-top: 2rem;
  text-align: right;
  line-height: 1.7;
}

.rt-info-text {
  padding: 1rem;
  border: 1px solid #ccc;
  background: #f1f1f1;
  border-radius: 6px;
  margin-top: 2rem;
  font-size: 1rem;
  line-height: 1.7;
}


/* Feedback Level Styles */
.feedback-elite {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border-left: 5px solid #8b5cf6;
    color: #5b21b6;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.1), 0 2px 4px -1px rgba(139, 92, 246, 0.06);
}

.feedback-excellent {
    background-color: #e6f7ff;
    border-left: 5px solid #1890ff;
    color: #003a8c;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.feedback-good {
    background-color: #f6ffed;
    border-left: 5px solid #52c41a;
    color: #135200;
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.2);
}

.feedback-average {
    background-color: #fff2e8;
    border-left: 5px solid #fa8c16;
    color: #873800;
    box-shadow: 0 2px 8px rgba(250, 140, 22, 0.2);
}

.feedback-improve {
    background-color: #fff1f0;
    border-left: 5px solid #ff4d4f;
    color: #820014;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.2);
}

.rounded-lg {
    transition: all 0.3s ease;
    margin: 1rem auto;
    max-width: 600px;
    padding: 1.5rem;
    font-size: large;
    border-radius: 8px;
}

/* Hidden state */
.hidden {
    opacity: 0;
    height: 0;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    transition: all 0.3s ease;
}


/* Countdown Container */

#countdown-container {
    margin: 2rem 0;
    padding: 1rem;
    text-align: center;
}

/* Countdown Text */
#countdown-container p {
    font-size: 1.25rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

/* Countdown Number */
#countdown {
    font-size: 5rem;
    font-weight: 800;
    color: #7c3aed; /* Violet color */
    text-shadow: 0 4px 6px rgba(124, 58, 237, 0.2);
    animation: pulse 1s infinite alternate;
    display: inline-block;
    min-width: 100px;
    line-height: 1;
}

/* Pulse Animation */
@keyframes pulse {
    from {
        transform: scale(1);
        opacity: 1;
        text-shadow: 0 0 0 rgba(124, 58, 237, 0.7);
    }
    to {
        transform: scale(1.1);
        opacity: 0.9;
        text-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
    }
}

/* Countdown Transition Effects */
.countdown-transition {
    animation: zoomOut 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes zoomOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}


#results-section.hidden {
    opacity: 0;
    height: 0;
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
}



tbody, td, tfoot, th, thead, tr {
    border-color: rgba(0, 0, 0, 0.075);
    border-style: solid;
    border-width: thin;
    border-radius: var(--cui-border-radius) !important;
    padding: .5rem;
    overflow: hidden !important;
}

.note {
    font-size: 0.875rem;
    color: #6c757d; /* gray-600 */
    margin-bottom: 0.5rem;
    font-style: italic;
}

/* Prevent abrupt jumps when elements appear */
#interaction-area, #results-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#interaction-area:not(.hidden), 
#results-section:not(.hidden) {
    animation: fadeInExpand 0.4s ease-out forwards;
}

@keyframes fadeInExpand {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}