/* ============================
   AGE GATE MODAL
   ============================ */

#ageGateModal .age-gate-container {
    max-width: min(90vw, 450px);
    max-height: min(85vh, 600px);
    background: var(--bg-card);
}

#ageGateModal .age-gate-emoji {
    display: block;
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: 0.5rem;
    animation: bounce 2s infinite;
}

#ageGateModal .age-gate-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin: 0;
    color: white;
}

#ageGateModal .age-gate-body {
    padding: clamp(1.5rem, 4vw, 2rem);
    text-align: center;
    background: var(--bg-card);
}

#ageGateModal .age-gate-message h2 {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    color: var(--text-primary);
    margin: 0 0 1rem;
}

#ageGateModal .age-gate-message p {
    font-size: clamp(0.9rem, 3vw, 1rem);
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

#ageGateModal .age-question {
    font-size: clamp(1.1rem, 3.5vw, 1.25rem);
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0;
}

#ageGateModal .age-gate-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin: 1.5rem 0;
}

#ageGateModal .age-gate-buttons .btn {
    width: 100%;
    max-width: 220px;
    padding: 0.8rem 1.5rem;
    font-size: clamp(0.9rem, 3vw, 1rem);
}

#ageGateModal .age-gate-legal {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--divider-color);
    font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    color: var(--text-muted);
}

/* ============================
   SIGN IN MODAL - BEAUTIFUL STYLES
   ============================ */

#signInModal .signin-container {
    max-width: min(95vw, 440px);
    max-height: min(90vh, 680px);
}

#signInModal .signin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: var(-space-md);
    text-align: center;
    color: white;
    position: relative;
}

#signInModal .signin-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

#signInModal .signin-emoji {
    display: block;
    font-size: var(--icon-md);
    margin-bottom: 0.5rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#signInModal .signin-header h2 {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    margin: 0 0 0.5rem;
    color: white;
    position: relative;
}

#signInModal .signin-header h2 #signInNicknameDisplay {
    color: #fbbf24;
    font-weight: 700;
}

#signInModal .signin-header p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    opacity: 0.95;
    margin: 0;
}

#signInModal .signin-body {
    padding: clamp(1.5rem, 4vw, 2rem);
   overflow: auto;
}

#signInModal .signin-form {
    margin-bottom: 1.5rem;
}

#signInModal .signin-form .input-group {
    margin-bottom: 1.5rem;
}

#signInModal .signin-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.5rem;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

#signInModal .label-icon {
    font-size: 1.2rem;
}

#signInModal .signin-input {
    width: 100%;
    padding: clamp(0.8rem, 2vw, 1rem);
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
}

#signInModal .signin-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

#signInModal .passcode-input-wrapper {
    position: relative;
}

#signInModal .passcode-input {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    letter-spacing: 0.3em;
    text-align: center;
    text-transform: uppercase;
    font-weight: 600;
    font-size: clamp(1.2rem, 3.5vw, 1.4rem);
    padding-right: 4rem;
}

#signInModal .passcode-format-hint {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: #9ca3af;
    font-weight: 600;
    letter-spacing: 0.05em;
}

#signInModal .input-hint {
    display: block;
    margin-top: 0.4rem;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    color: #6b7280;
    line-height: 1.4;
}

#signInModal .signin-error-box {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: clamp(0.75rem, 2vw, 1rem);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

#signInModal .signin-error-box .error-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

#signInModal .signin-error-box .error-text {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    color: #dc2626;
    font-weight: 500;
}

#signInModal .signin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0 1.5rem;
}

#signInModal .btn {
    width: 100%;
}

#signInModal .btn-glow {
    box-shadow: 0 4px 14px 0 rgba(102, 126, 234, 0.3);
}

#signInModal .btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(102, 126, 234, 0.4);
}

#signInModal .btn-icon {
    font-size: 1.2rem;
}

#signInModal .signin-help {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 12px;
    padding: clamp(1rem, 3vw, 1.25rem);
    display: flex;
    gap: 1rem;
}

#signInModal .help-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

#signInModal .help-content p {
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
}

#signInModal .help-content small {
    display: block;
    color: #6b7280;
    line-height: 1.5;
    font-size: clamp(0.8rem, 2.5vw, 0.85rem);
}

/* Sign In Options Modal */
#signInOptionsModal .signin-options-container {
    max-width: 380px;
}

#signInOptionsModal .signin-options-header {
    text-align: center;
    padding: 24px 24px 16px;
}

#signInOptionsModal .signin-options-emoji {
    font-size: 3rem;
}

#signInOptionsModal .signin-options-header h2 {
    margin: 12px 0 8px;
}

#signInOptionsModal .signin-options-header p {
    color: var(--text-muted);
    margin: 0;
}

#signInOptionsModal .signin-options-body {
    padding: var(--space-lg) var(--space-sm);
}

#signInOptionsModal .signin-options-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xl);
    margin: var(--space-lg);
}

#signInOptionsModal .btn-google {
    background: var(--white);
    color: #1f1f1f;
    border: none;

    cursor: pointer;
    transition: all var(--transition);
}

#signInOptionsModal .btn-google svg {
    margin-right: 10px;
}

#signInOptionsModal .btn-google:hover {
    background: var(--grey-white);
    box-shadow: var(--shadow-sm);
}

#signInOptionsModal .btn-passcode-signin {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: var(--text-md);
    background: var(--primary-gradient-simple);
    color: var(--text-white);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

#signInOptionsModal .btn-passcode-signin:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

#signInOptionsModal .btn-passcode-signin .btn-icon {
    margin-right: 10px;
}

#signInOptionsModal .btn-create-manual {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 12px 20px;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: color var(--transition);
}

#signInOptionsModal .btn-create-manual:hover {
    color: var(--text-primary);
}

/* Marketing Consent Modal */
#marketingConsentModal .marketing-consent-container {
    max-width: 400px;
    text-align: center;
    padding: var(--space-lg);
}

#marketingConsentModal .marketing-consent-header {
    margin-bottom: var(--space-md);
}

#marketingConsentModal .marketing-consent-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: var(--space-sm);
}

#marketingConsentModal .marketing-consent-header h2 {
    margin: 0;
    color: var(--text-primary);
}

#marketingConsentModal .marketing-consent-body {
    margin-bottom: var(--space-lg);
}

#marketingConsentModal .marketing-consent-body p {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

#marketingConsentModal .marketing-benefits {
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0;
    text-align: left;
}

#marketingConsentModal .marketing-benefits li {
    padding: var(--space-xs) 0;
    color: var(--text-primary);
}

#marketingConsentModal .marketing-promise {
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-style: italic;
}

#marketingConsentModal .marketing-consent-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

#marketingConsentModal .btn-marketing-yes {
    width: 100%;
}

#marketingConsentModal .btn-marketing-no {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: var(--space-sm);
}

#marketingConsentModal .btn-marketing-no:hover {
    color: var(--text-primary);
}

/* Apple OAuth Button */
#signInOptionsModal .btn-apple {
    background: #000;
    color: #fff;
    border: none;
}

#signInOptionsModal .btn-apple:hover {
    background: #333;
}

#signInOptionsModal .btn-apple svg {
    flex-shrink: 0;
}

/* Divider between OAuth and manual options */
#signInOptionsModal .signin-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
}

#signInOptionsModal .signin-divider::before,
#signInOptionsModal .signin-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color, rgba(255,255,255,0.1));
}

#signInOptionsModal .signin-divider span {
    font-size: 12px;
    color: var(--text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================
   NICKNAME MODAL
   ============================ */
#nicknameModal .nickname-container {
    max-width: min(95vw, 480px);
    max-height: min(90vh, 700px);
}

#nicknameModal .nickname-header {
    background: var(--primary-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    padding: clamp(1.5rem, 4vh, 2rem);
    text-align: center;
    color: white;
    position: relative;
}

#nicknameModal .nickname-emoji {
    display: block;
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: 0.5rem;
}

#nicknameModal .nickname-header h2 {
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    margin: 0 0 0.5rem;
    color: white;
}

#nicknameModal .nickname-header p {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    opacity: 0.95;
    margin: 0;
}

#nicknameModal .nickname-body {
    padding: clamp(1rem, 3vw, 1.5rem);
   overflow: auto;
}

#nicknameModal .nickname-input {
    width: 100%;
    padding: clamp(0.7rem, 2vw, 1rem);
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

#nicknameModal .nickname-input:focus {
    border-color: var(--purple, #667eea);
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#nicknameModal .suggestions-section {
    margin-top: 1.5rem;
}

#nicknameModal .suggestions-section p {
    font-size: clamp(0.85rem, 2.5vw, 0.9rem);
    color: var(--text-secondary, #666);
    margin-bottom: 0.75rem;
}

#nicknameModal .suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

#nicknameModal .chip {
    padding: clamp(0.4rem, 1.5vw, 0.5rem) clamp(0.7rem, 2vw, 1rem);
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    cursor: pointer;
    transition: all 0.3s ease;
}

#nicknameModal .chip:hover {
    background: var(--purple, #667eea);
    color: white;
    border-color: var(--purple, #667eea);
    transform: translateY(-2px);
}

#nicknameModal .avatar-section {
    margin-top: 1.5rem;
}

#nicknameModal .avatar-section p {
    font-size: clamp(0.85rem, 2.5vw, 0.9rem);
    color: var(--text-secondary, #666);
    margin-bottom: 0.75rem;
}

#nicknameModal .avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: clamp(0.4rem, 1.5vw, 0.6rem);
    max-width: 300px;
    margin: 0 auto;
}

#nicknameModal .avatar-option {
    aspect-ratio: 1;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: clamp(1.2rem, 3.5vw, 1.8rem);
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#nicknameModal .avatar-option:hover {
    border-color: var(--purple, #667eea);
    transform: scale(1.1);
}

#nicknameModal .avatar-option.active {
    border-color: var(--purple, #667eea);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(109, 40, 217, 0.1) 100%);
}

#nicknameModal .privacy-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 1.5rem;
}

#nicknameModal .privacy-item {
    font-size: clamp(0.75rem, 2.5vw, 0.85rem);
    color: var(--text-secondary, #666);
}

#nicknameModal .nickname-actions {
    display: flex;
    justify-content: center;
    padding: clamp(1rem, 3vh, 1.5rem) clamp(1rem, 3vw, 1.5rem);
    background: #f8f9fa;
    margin: 0 calc(-1 * clamp(1rem, 3vw, 1.5rem));
    margin-top: 1.5rem;
}

#nicknameModal .btn {
    width: 100%;
}

/* ============================
   PASSCODE MODAL - BEAUTIFUL REDESIGN
   ============================ */

#passcodeModal .passcode-container {
   max-width: min(95vw, 440px);
   max-height: min(90vh, 650px);
   background: #1f2937;
}

#passcodeModal .passcode-header {
   background: linear-gradient(135deg, #10b981 0%, #059669 100%);
   padding: var(--space-md);
   text-align: center;
   color: white;
   position: relative;
}

/* Animated background effect */
#passcodeModal .passcode-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 8s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* #passcodeModal .success-icon {
    display: block;
    font-size: clamp(3rem, 8vw, 4rem);
    margin-bottom: 1rem;
    animation: successPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
    position: relative;
    z-index: 1;
} */

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

#passcodeModal .passcode-header h2 {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    margin: 0 0 0.5rem;
    color: white;
    position: relative;
    z-index: 1;
}

#passcodeModal .passcode-header p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    opacity: 0.95;
    margin: 0;
    position: relative;
    z-index: 1;
}

#passcodeModal .passcode-body {
    padding: clamp(1.5rem, 4vw, 2rem);
   overflow-y:auto;
}

#passcodeModal .passcode-section {
    margin-bottom: 1.5rem;
}

#passcodeModal .passcode-section h3 {
  font-size: clamp(1rem, 3vw, 1.1rem);
  color: white;
  margin: 0 0 1rem;
  text-align: center;
  font-weight: 600;
}

#passcodeModal .passcode-display {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border: 2px solid #d1d5db;
  border-radius: 16px;
  padding: clamp(1.2rem, 3vw, 1.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
  border-color: #6b7280;
}

#passcodeModal .passcode-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

#passcodeModal #passcodeValue {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Courier New', monospace;
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    font-weight: 700;
    letter-spacing: 0.3em;
    color: white;
    text-align: center;
    flex: 1;
    user-select: all;
    cursor: text;
}

#passcodeModal .passcode-display .btn-sm {
    padding: 0.6rem 1rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#passcodeModal .passcode-display .btn-sm:hover {
    background: #10b981;
    color: white;
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#passcodeModal .passcode-warning {
  border: 1px solid #fbbf24;
  border-radius: 12px;
  padding: clamp(1rem, 3vw, 1.25rem);
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
  border-color: #b45309;
}

#passcodeModal .passcode-warning p {
    margin: 0 0 0.5rem;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    color: #fef3c7;
    line-height: 1.5;
}

#passcodeModal .passcode-warning p:first-child {
    font-weight: 700;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#passcodeModal .passcode-warning p:last-child {
    margin-bottom: 0;
}

#passcodeModal .passcode-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

#passcodeModal .passcode-actions .btn-secondary {
    flex: 1;
    min-width: 140px;
    padding: clamp(0.7rem, 2vw, 0.9rem);
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

#passcodeModal .passcode-actions .btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* FIXED CHECKBOX STYLES */
#passcodeModal .passcode-confirm {
    background: #374151;
    border-radius: 12px;
    padding: clamp(1rem, 3vw, 1.25rem);
    margin-bottom: 1.5rem;
}

#passcodeModal .passcode-confirm .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    color: white;
    font-weight: 500;
    user-select: none;
}

/* Remove all the conflicting styles and use a simple, reliable approach */
#passcodeModal .passcode-confirm input[type="checkbox"] {
    /* Reset any inherited styles */
    all: unset;
    
    /* Now add back what we need */
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
    
    /* Visual appearance */
    background: white;
    border: 2px solid #10b981;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

/* Checked state - use a pseudo element for the checkmark */
#passcodeModal .passcode-confirm input[type="checkbox"]:checked {
    background: #10b981;
    border-color: #10b981;
}

#passcodeModal .passcode-confirm input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Hover state */
#passcodeModal .passcode-confirm input[type="checkbox"]:hover {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Focus state for accessibility */
#passcodeModal .passcode-confirm input[type="checkbox"]:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

#passcodeModal .passcode-confirm .checkbox-label span {
    color: white;
    line-height: 1.4;
}

/* Continue button states */
#passcodeModal #continueFromPasscode {
    width: 100%;
    padding: clamp(1rem, 3vw, 1.25rem);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: clamp(1rem, 3vw, 1.1rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#passcodeModal #continueFromPasscode::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#passcodeModal #continueFromPasscode:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#passcodeModal #continueFromPasscode:not(:disabled):hover::before {
    width: 300px;
    height: 300px;
}

#passcodeModal #continueFromPasscode:disabled {
    background: #6b7280;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

/* Optional: Add a nice animation when the checkbox is clicked */
@keyframes checkPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

#passcodeModal .passcode-confirm input[type="checkbox"]:active {
    animation: checkPulse 0.2s ease;
}

/* ================================
   BENEFITS MODAL
   ================================ */

#benefitsModal .benefits-container {
    max-width: min(95vw, 460px);
    max-height: min(90vh, 720px);
    display: flex;
    flex-direction: column;
}

#benefitsModal .benefits-header {
    text-align: center;
    padding: clamp(2rem, 6vw, 2.5rem) clamp(1.5rem, 4vw, 2rem) clamp(1.25rem, 3vw, 1.5rem);
}

#benefitsModal .benefits-avatar-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bg-subtle, rgba(139, 92, 246, 0.08));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

#benefitsModal .benefits-avatar {
    font-size: 2.5rem;
    line-height: 1;
}

#benefitsModal .benefits-title {
    margin: 0 0 0.4rem 0;
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    font-weight: 600;
    color: var(--text-primary);
}

#benefitsModal .benefits-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

#benefitsModal .benefits-body {
    padding: 0 clamp(1.5rem, 4vw, 2rem) clamp(1.5rem, 4vw, 2rem);
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 3vw, 1.25rem);
    overflow: auto;
}

#benefitsModal .benefits-reward {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.6rem;
    padding: 0.75rem 1rem;
    background: var(--bg-subtle, rgba(139, 92, 246, 0.06));
    border: 1px solid var(--border-subtle, rgba(139, 92, 246, 0.18));
    border-radius: 10px;
    font-size: 0.9rem;
}

#benefitsModal .benefits-reward-points {
    font-weight: 600;
    color: var(--accent, #8b5cf6);
}

#benefitsModal .benefits-reward-divider {
    color: var(--text-muted);
    opacity: 0.5;
}

#benefitsModal .benefits-reward-badge {
    color: var(--text-secondary);
}

#benefitsModal .benefits-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

#benefitsModal .benefits-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
}

#benefitsModal .benefits-action-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-subtle, rgba(255, 255, 255, 0.04));
    border-radius: 10px;
}

#benefitsModal .benefits-action-content {
    flex: 1;
    min-width: 0;
}

#benefitsModal .benefits-action-content h3 {
    margin: 0 0 0.15rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

#benefitsModal .benefits-action-content p {
    margin: 0;
    font-size: 0.825rem;
    color: var(--text-muted);
    line-height: 1.4;
}

#benefitsModal .benefits-cta {
    margin-top: 0.5rem;
}

.btn-full {
    width: 100%;
}

/* ============================
   COOKIE CONSENT MODAL STYLES
   ============================ */

#cookieModal .cookie-container {
    max-width: min(95vw, 480px);
    max-height: min(90vh, 700px);
}

#cookieModal .cookie-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    padding: var(--space-md);
    text-align: center;
    color: white;
    position: relative;
}

#cookieModal .cookie-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 15s linear infinite;
}

#cookieModal .cookie-emoji {
    display: block;
    font-size: clamp(2.5rem, 7vw, 3.5rem);
    margin-bottom: 0.5rem;
    animation: cookieBounce 2s ease-in-out infinite;
}

@keyframes cookieBounce {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

#cookieModal .cookie-header h2 {
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    margin: 0 0 0.25rem;
    color: white;
    position: relative;
    z-index: 1;
}

#cookieModal .cookie-header p {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    opacity: 0.95;
    margin: 0;
}

#cookieModal .cookie-body {
   padding: clamp(1.25rem, 3vw, 1.5rem);
   overflow: auto;
}

#cookieModal .cookie-message {
    text-align: center;
    margin-bottom: 1.5rem;
}

#cookieModal .cookie-message p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

/* Cookie Types */
#cookieModal .cookie-types {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

#cookieModal .cookie-type {
    background: #f9fafb;
    border-radius: 12px;
    padding: clamp(0.875rem, 2vw, 1rem);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

#cookieModal .cookie-type:hover {
    border-color: #f59e0b;
    background: #fffbeb;
}

#cookieModal .cookie-type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

#cookieModal .cookie-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

#cookieModal .cookie-icon {
    font-size: 1.5rem;
    width: 32px;
    flex-shrink: 0;
}

#cookieModal .cookie-info h4 {
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
    margin: 0 0 0.125rem;
    color: #111827;
}

#cookieModal .cookie-info p {
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    color: #6b7280;
    margin: 0;
}

#cookieModal .cookie-badge {
    background: #10b981;
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: clamp(0.7rem, 2vw, 0.8rem);
    font-weight: 600;
    white-space: nowrap;
}

#cookieModal .cookie-badge.always-on {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* FIXED Cookie Toggle Switch */
#cookieModal .cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    cursor: pointer;
}

#cookieModal .cookie-toggle input {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    opacity: 0;
    z-index: 1;
}

#cookieModal .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;  /* Light gray background */
    transition: all 0.3s ease;
    border-radius: 28px;
    border: 2px solid #fed7aa;  /* Faint orange outline */
}

#cookieModal .toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 2px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Checked state - orange background */
#cookieModal .cookie-toggle input:checked + .toggle-slider {
    background-color: #f97316;  /* Orange background */
    border-color: #ea580c;  /* Darker orange border */
}

#cookieModal .cookie-toggle input:checked + .toggle-slider:before {
    transform: translateX(20px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Hover effects */
#cookieModal .cookie-toggle:hover .toggle-slider {
    border-color: #fb923c;  /* Brighter orange on hover */
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);  /* Subtle glow */
}

#cookieModal .cookie-toggle input:checked:hover + .toggle-slider {
    background-color: #fb923c;  /* Lighter orange on hover */
    border-color: #f97316;
}

/* Focus effect for accessibility */
#cookieModal .cookie-toggle input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.2);
}

/* Smooth transitions */
#cookieModal .toggle-slider,
#cookieModal .toggle-slider:before {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#cookieModal .cookie-examples {
    margin-left: calc(32px + 0.75rem);
}

#cookieModal .cookie-examples small {
    font-size: clamp(0.75rem, 2vw, 0.8rem);
    color: #9ca3af;
    line-height: 1.4;
}

/* Privacy Link */
#cookieModal .cookie-privacy {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

#cookieModal .cookie-privacy p {
    margin: 0;
    font-size: clamp(0.85rem, 2.5vw, 0.9rem);
    color: #6b7280;
}

#cookieModal .cookie-privacy a {
    color: #f59e0b;
    font-weight: 600;
    text-decoration: none;
}

#cookieModal .cookie-privacy a:hover {
    text-decoration: underline;
}

/* Cookie Actions */
#cookieModal .cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#cookieModal .cookie-actions .btn {
    width: 100%;
    padding: clamp(0.875rem, 2.5vw, 1rem);
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
    border-radius: 12px;
}

#cookieModal .cookie-actions .btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    font-weight: 600;
}

#cookieModal .cookie-actions .btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    font-weight: 600;
}

#cookieModal .cookie-actions .btn-ghost {
    background: transparent;
    color: #9ca3af;
    border: none;
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    padding: 0.5rem;
}


/* FORCE Cookie Toggle Switch Styles with More Specific Selectors */
#cookieModal .cookie-toggle {
    position: relative !important;
    display: inline-block !important;
    width: 50px !important;
    height: 28px !important;
    cursor: pointer !important;
}

#cookieModal .cookie-toggle input[type="checkbox"] {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    cursor: pointer !important;
    opacity: 0 !important;
    z-index: 2 !important;
}

#cookieModal .cookie-toggle .toggle-slider {
    position: absolute !important;
    cursor: pointer !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: #e5e7eb !important;
    transition: all 0.3s ease !important;
    border-radius: 28px !important;
    border: 2px solid #fed7aa !important;
    display: block !important;
}

#cookieModal .cookie-toggle .toggle-slider:before {
    position: absolute !important;
    content: "" !important;
    height: 20px !important;
    width: 20px !important;
    left: 3px !important;
    bottom: 2px !important;
    background-color: white !important;
    transition: all 0.3s ease !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
    display: block !important;
}

/* Checked state */
#cookieModal .cookie-toggle input[type="checkbox"]:checked + .toggle-slider {
    background-color: #f97316 !important;
    border-color: #ea580c !important;
}

#cookieModal .cookie-toggle input[type="checkbox"]:checked + .toggle-slider:before {
    transform: translateX(20px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}
