/* SportFit rope theme switcher — light-mode overrides */
body[data-theme="light"]{background:#f5f9ff;color:#10213a}
body[data-theme="light"] nav{background:#fff;color:#10213a;border-bottom-color:#d9e6f5}
body[data-theme="light"] .logo,body[data-theme="light"] .nav-links a{color:#10213a}
body[data-theme="light"] .tagline{color:#61718a}
body[data-theme="light"] .login{color:#10213a;border-color:#9eb3ce}
body[data-theme="light"] .user-avatar{background:#eef6ff;color:#12345a}
body[data-theme="light"] .profile-panel{background:#fff;color:#10213a;border-color:#d6e3f2;box-shadow:0 18px 45px #203d5b24}
body[data-theme="light"] .profile-field input,body[data-theme="light"] .profile-field select{background:#f5f9ff;color:#10213a;border-color:#c7d6e8}
body[data-theme="light"] .profile-head p,body[data-theme="light"] .profile-field label{color:#62738a}
body[data-theme="light"] .hero{background-image:linear-gradient(90deg,#f5f9ff 20%,rgba(245,249,255,.88) 48%,rgba(245,249,255,.12)),url("https://images.unsplash.com/photo-1599058917212-d750089bc07e?auto=format&fit=crop&w=1400&q=80");color:#10213a}
body[data-theme="light"] .hero p{color:#33445b}
body[data-theme="light"] .secondary-btn{color:#10213a;border-color:#10213a}
body[data-theme="light"] .stat p,body[data-theme="light"] .details{color:#61718a}
body[data-theme="light"] .category,body[data-theme="light"] .workout{background:#fff;border-color:#d9e6f5;box-shadow:0 4px 16px #254a7010}
body[data-theme="light"] .category p{color:#53647b}
body[data-theme="light"] footer{background:#fff!important;color:#10213a}
body[data-theme="light"] footer p,body[data-theme="light"] footer li{color:#53647b}
body[data-theme="light"] .profile-message{color:#438400}
#rope-theme-switch{position:fixed;z-index:99999;right:18px;top:0;width:54px;height:150px;border:0;padding:0;background:transparent;cursor:grab;touch-action:none;display:flex;align-items:center;flex-direction:column;filter:drop-shadow(0 3px 4px #0002)}
#rope-theme-switch:active{cursor:grabbing}
#rope-theme-switch .theme-rope{height:78px;width:5px;background:repeating-linear-gradient(78deg,#bfc3c7 0 2px,#777d85 2px 4px,#a4a8ad 4px 6px);border-radius:5px;transform-origin:top center;position:relative;display:block;transition:height .28s ease,transform .28s ease;will-change:transform}
#rope-theme-switch .theme-ball{position:absolute;left:50%;top:calc(100% - 1px);width:34px;height:34px;transform:translate(-50%,0);border-radius:50%;background:radial-gradient(circle at 30% 25%,#fff4a0 0,#ffdf35 26%,#ffc400 65%,#e59a00 100%);box-shadow:inset -4px -5px 0 #d99600aa,0 4px 8px #8a670044;will-change:transform}
#rope-theme-switch .theme-rope::after{content:"";position:absolute;left:0;right:0;bottom:-2px;height:8px;border-radius:50%;background:linear-gradient(90deg,#777d85,#c5c8cc,#777d85)}
#rope-theme-switch.pulling .theme-rope{height:104px}
#rope-theme-switch.waving .theme-rope{animation:rope-wave 1.8s cubic-bezier(.37,0,.63,1) 1}
#rope-theme-switch.waving .theme-ball{animation:ball-wave 1.8s cubic-bezier(.37,0,.63,1) 1}
@keyframes rope-wave{0%{transform:rotate(0) skewX(0)}14%{transform:rotate(5deg) skewX(2deg)}30%{transform:rotate(-4.5deg) skewX(-2deg)}46%{transform:rotate(3.5deg) skewX(1.5deg)}62%{transform:rotate(-2.4deg) skewX(-1deg)}78%{transform:rotate(1.3deg) skewX(.5deg)}100%{transform:rotate(0) skewX(0)}}
@keyframes ball-wave{0%{transform:translate(-50%,0)}14%{transform:translate(calc(-50% + 5px),1px)}30%{transform:translate(calc(-50% - 4px),3px)}46%{transform:translate(calc(-50% + 3px),2px)}62%{transform:translate(calc(-50% - 2px),1px)}78%{transform:translate(calc(-50% + 1px),0)}100%{transform:translate(-50%,0)}}
#rope-theme-switch:hover .theme-ball{filter:brightness(1.06)}
#rope-theme-switch .theme-hint{position:absolute;top:116px;right:42px;white-space:nowrap;font:600 11px Arial,sans-serif;color:#5c6c80;background:#fff;border:1px solid #d8e3ef;padding:5px 8px;border-radius:6px;opacity:0;transition:opacity .2s;pointer-events:none}
#rope-theme-switch:hover .theme-hint,#rope-theme-switch:focus-visible .theme-hint{opacity:1}
body[data-theme="light"] #rope-theme-switch .theme-hint{color:#10213a}
@media(max-width:600px){#rope-theme-switch{right:8px;width:42px;height:125px}#rope-theme-switch .theme-rope{height:61px}#rope-theme-switch.pulling .theme-rope{height:87px}#rope-theme-switch .theme-ball{width:30px;height:30px}#rope-theme-switch .theme-hint{right:34px;top:92px}}
@media(prefers-reduced-motion:reduce){#rope-theme-switch *,body{transition:none!important;animation:none!important}}


/* ===== Global light-theme contrast fixes for every page using this stylesheet ===== */
body[data-theme="light"] {
  background-color: #f3f7fd !important;
  color: #172b45 !important;
}
body[data-theme="light"] :where(h1,h2,h3,h4,h5,h6,p,li,label,small,strong,b,em,legend,dt,dd,th,td) {
  color: #172b45;
}
body[data-theme="light"] :where(.head p,.tagline,.muted,.subtitle,.description,.meta,.date,.details,.stat p,footer p,footer li) {
  color: #5b6d83;
}
body[data-theme="light"] :where(main,.card,.panel,.content-card,.feature-card,.faq,.faq-item,.category,.workout,.progress-card,.profile-panel,.modal-content,.form-container,.auth-card,.donate-card,.contact-card,.blog-card,.article-card) {
  background-color: #ffffff;
  color: #172b45;
  border-color: #d7e2ef;
  box-shadow: 0 8px 28px rgba(24,52,83,.08);
}
body[data-theme="light"] :where(input,textarea,select) {
  background-color: #ffffff;
  color: #172b45;
  border-color: #bdcde0;
  caret-color: #126cff;
}
body[data-theme="light"] :where(input,textarea,select)::placeholder {
  color: #718198;
  opacity: 1;
}
body[data-theme="light"] :where(label) {
  color: #334b67;
}
body[data-theme="light"] :where(a:not(.signup):not(.primary-btn):not(.secondary-btn):not(.login):not(.signup)) {
  color: #1769c2;
}
body[data-theme="light"] nav {
  background: #ffffff !important;
  color: #172b45 !important;
  border-bottom-color: #d7e2ef !important;
}
body[data-theme="light"] .nav-links {
  background: #ffffff !important;
  border-color: #d7e2ef !important;
}
body[data-theme="light"] .nav-links a {
  color: #172b45 !important;
}
body[data-theme="light"] .nav-links a:hover,
body[data-theme="light"] footer a:hover {
  color: #075dcc !important;
}
body[data-theme="light"] footer {
  background: #ffffff !important;
  color: #172b45 !important;
  border-top-color: #d7e2ef !important;
}
body[data-theme="light"] .login {
  color: #172b45 !important;
  background: transparent !important;
  border-color: #9aacc2 !important;
}
body[data-theme="light"] .signup,
body[data-theme="light"] .primary,
body[data-theme="light"] .primary-btn,
body[data-theme="light"] button.signup {
  color: #ffffff !important;
}
body[data-theme="light"] .hero,
body[data-theme="light"] .banner {
  color: #172b45;
}
body[data-theme="light"] .hero p {
  color: #334b67 !important;
}
body[data-theme="light"] .bottom,
body[data-theme="light"] .message {
  color: inherit;
}
body[data-theme="light"] .error,
body[data-theme="light"] .message.error {
  color: #9f2534 !important;
  background: #fff0f1 !important;
  border-color: #efb9bf !important;
}
body[data-theme="light"] .success,
body[data-theme="light"] .message.success {
  color: #17643b !important;
  background: #edfff4 !important;
  border-color: #b8e7c9 !important;
}
body[data-theme="light"] .opt label {
  background: #f5f8fc;
  color: #334b67;
  border-color: #d0dceb;
}
body[data-theme="light"] .opt input:checked + label {
  background: #e8f1ff;
  color: #124f9e;
  border-color: #6ba4f5;
}
body[data-theme="light"] .profile-field input,
body[data-theme="light"] .profile-field select {
  background: #f5f9ff;
  color: #172b45;
  border-color: #c7d6e8;
}
