/* STC SiteMill Engine: Rotating showcase styles and animations */

.sitemill-engine {
  position: relative;
  z-index: 2;
  width: min(510px, 100%);
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Masthead with Spinning Windmill Turbine */
.sitemill-masthead {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(10, 30, 56, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(65, 102, 141, 0.5);
  border-radius: 12px;
  padding: 8px 14px;
  box-shadow: 0 8px 24px -6px rgba(8, 43, 87, 0.3);
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.sitemill-turbine {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  position: relative;
}

.turbine-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.turbine-orbit {
  fill: none;
  stroke: rgba(0, 169, 214, 0.25);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}

.turbine-hub-glow {
  fill: rgba(0, 169, 214, 0.15);
  filter: drop-shadow(0 0 4px #00a9d6);
}

.turbine-blades {
  transform-origin: 50px 50px;
  animation: turbine-spin 6s linear infinite;
}

.sitemill-turbine.turbine-burst .turbine-blades {
  animation: turbine-boost 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.turbine-blade {
  stroke-width: 1.2;
}

.blade-1 { fill: url(#blade-grad-1); stroke: #00a9d6; }
.blade-2 { fill: url(#blade-grad-2); stroke: #a9dc52; }
.blade-3 { fill: url(#blade-grad-1); stroke: #00a9d6; }
.blade-4 { fill: url(#blade-grad-2); stroke: #a9dc52; }

.turbine-center {
  fill: #082b57;
  stroke: #a9dc52;
  stroke-width: 2;
  filter: drop-shadow(0 0 3px #a9dc52);
}

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

@keyframes turbine-boost {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(720deg); }
}

.sitemill-masthead-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sitemill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #a9dc52;
  text-transform: uppercase;
}

.sitemill-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a9dc52;
  box-shadow: 0 0 6px #a9dc52;
  animation: sitemill-pulse 2s infinite;
}

@keyframes sitemill-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.sitemill-status {
  font-size: 11px;
  color: #c1d6ec;
  font-weight: 500;
}

/* Browser Showcase Window Frame */
.sitemill-window {
  background: #091c33;
  border: 1px solid #32567d;
  border-radius: 12px;
  box-shadow: 0 25px 65px -15px rgba(8, 43, 87, 0.75), 0 0 30px -8px rgba(0, 169, 214, 0.2);
  overflow: hidden;
  position: relative;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.sitemill-window::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(169, 220, 82, 0.5), rgba(0, 169, 214, 0.6), transparent);
  pointer-events: none;
}

.sitemill-window:hover {
  border-color: #5286ba;
  box-shadow: 0 30px 75px -15px rgba(8, 43, 87, 0.85), 0 0 40px -5px rgba(0, 169, 214, 0.3);
}

.sitemill-window-bar {
  background: #112d4d;
  height: 38px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #20456c;
}

.window-dots {
  display: flex;
  gap: 5px;
}

.window-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-red { background: #e06c75; }
.dot-yellow { background: #e5c07b; }
.dot-green { background: #98c379; }

.window-title {
  font-size: 11px;
  font-weight: 600;
  color: #dceaff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.window-tag {
  font-size: 9px;
  font-weight: 700;
  color: #a9dc52;
  background: rgba(169, 220, 82, 0.12);
  border: 1px solid rgba(169, 220, 82, 0.3);
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Stage & Drop Animation */
.sitemill-stage {
  padding: 16px;
  min-height: 315px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.sitemill-drop {
  animation: sitemill-drop-key 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes sitemill-drop-key {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Shared Card Elements */
.sitemill-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #d4e5f7;
  font-family: inherit;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.sitemill-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  background: rgba(16, 47, 80, 0.5);
  border: 1px solid #244b73;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 10.5px;
  box-sizing: border-box;
  min-width: 0;
}

.strip-item b {
  color: #a9dc52;
}

.strip-item.highlight {
  color: #00c6ff;
  font-weight: 600;
}

.dot-live {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  margin-right: 4px;
  box-shadow: 0 0 6px #22c55e;
}

/* Card: Security & Cameras */
.security-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}

.cam-box {
  background: #061527;
  border: 1px solid #244b73;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cam-header {
  font-size: 10px;
  padding: 5px 8px;
  background: #0f2b48;
  color: #bdd6ee;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cam-dot {
  width: 5px;
  height: 5px;
  background: #22c55e;
  border-radius: 50%;
}

.cam-view {
  position: relative;
  line-height: 0;
}

.cam-svg {
  width: 100%;
  height: auto;
  display: block;
}

.cam-scanline {
  animation: cam-scan 3s ease-in-out infinite alternate;
}

@keyframes cam-scan {
  from { transform: translateY(-20px); }
  to { transform: translateY(20px); }
}

.cam-badge {
  position: absolute;
  top: 5px;
  right: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #ff5c5c;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
}

.lock-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.lock-header {
  font-size: 11px;
  font-weight: 600;
  color: #bdd6ee;
}

.interactive-lock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-family: inherit;
}

.interactive-lock-btn.is-locked {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #a9dc52;
}

.interactive-lock-btn.is-locked:hover {
  background: rgba(34, 197, 94, 0.25);
  transform: translateY(-1px);
}

.interactive-lock-btn.is-unlocked {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fcd34d;
}

.interactive-lock-btn.is-unlocked:hover {
  background: rgba(245, 158, 11, 0.28);
  transform: translateY(-1px);
}

.lock-icon { font-size: 15px; }
.lock-label { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; }
.lock-latency { font-size: 9px; opacity: 0.7; }

.access-subtext {
  font-size: 10px;
  color: #8da4be;
  background: rgba(16, 47, 80, 0.4);
  padding: 6px 8px;
  border-radius: 6px;
}

.access-subtext b {
  color: #a9dc52;
}

/* Card: Gaming & Market */
.gaming-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.metric-cell {
  background: #0d2644;
  border: 1px solid #1f4870;
  border-radius: 6px;
  padding: 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-cell span {
  font-size: 8.5px;
  color: #8faecf;
  letter-spacing: 0.5px;
}

.metric-cell strong {
  font-size: 13px;
  color: #ffffff;
}

.metric-cell.highlight strong {
  color: #a9dc52;
}

.gaming-leaderboard {
  background: #07172b;
  border: 1px solid #1a3c61;
  border-radius: 8px;
  overflow: hidden;
  font-size: 11px;
}

.board-header {
  display: grid;
  grid-template-columns: 20px 1.5fr 1fr 1fr 50px;
  padding: 5px 8px;
  background: #0e2947;
  color: #8faecf;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.board-row {
  display: grid;
  grid-template-columns: 20px 1.5fr 1fr 1fr 50px;
  align-items: center;
  padding: 5px 8px;
  border-top: 1px solid rgba(32, 69, 108, 0.4);
}

.row-rank { color: #8faecf; font-weight: 700; }
.row-user b { color: #dceaff; }
.row-user small { display: block; font-size: 9px; color: #7296ba; }
.row-pool { color: #bdd6ee; }
.row-pnl.pos { color: #a9dc52; font-weight: 700; }

.board-mini-btn {
  background: #143e69;
  color: #a9dc52;
  border: 1px solid #2b6094;
  border-radius: 4px;
  font-size: 9px;
  padding: 2px 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.board-mini-btn:hover {
  background: #1d558f;
  color: #ffffff;
}

.gaming-banner {
  background: rgba(0, 169, 214, 0.12);
  border: 1px solid rgba(0, 169, 214, 0.3);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 10px;
  color: #cce9ff;
}

.banner-tag {
  background: #00a9d6;
  color: #082b57;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 4px;
}

/* Card: Leagues & Ladders */
.match-score-card {
  background: #0c2542;
  border: 1px solid #224d77;
  border-radius: 8px;
  padding: 10px 14px;
}

.score-court-tag {
  font-size: 9.5px;
  color: #8faecf;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.score-roster {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-col {
  display: flex;
  flex-direction: column;
}

.player-col strong {
  font-size: 13px;
  color: #ffffff;
}

.player-col span {
  font-size: 9.5px;
  color: #a9dc52;
}

.score-display {
  display: flex;
  gap: 8px;
  background: #061527;
  border: 1px solid #193d63;
  padding: 4px 10px;
  border-radius: 6px;
}

.score-display b {
  font-size: 13px;
  color: #00c6ff;
  letter-spacing: 1px;
}

.ladder-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.interactive-challenge-btn {
  background: linear-gradient(135deg, #104273, #082b57);
  border: 1px solid #2c659e;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.interactive-challenge-btn:hover {
  background: linear-gradient(135deg, #195899, #0f3d75);
  box-shadow: 0 4px 12px rgba(0, 169, 214, 0.3);
  transform: translateY(-1px);
}

.interactive-challenge-btn.btn-confirmed {
  background: #15803d;
  border-color: #22c55e;
}

.ladder-note {
  font-size: 9.5px;
  color: #7d9bbd;
}

/* Card: Restaurant & Online Order */
.food-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0d2644;
  border: 1px solid #214972;
  border-radius: 8px;
  padding: 9px 12px;
}

.food-info strong {
  font-size: 13px;
  color: #ffffff;
  display: block;
}

.food-info small {
  font-size: 10px;
  color: #8faecf;
}

.food-badge {
  background: #f59e0b;
  color: #451a03;
  font-size: 8.5px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.spice-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #07172b;
  border: 1px solid #1a3c61;
  border-radius: 8px;
  padding: 7px 10px;
}

.spice-label {
  font-size: 10.5px;
  color: #8faecf;
}

.spice-options {
  display: flex;
  gap: 5px;
}

.spice-btn {
  background: #102e4d;
  border: 1px solid #224d77;
  color: #b8d4f0;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.spice-btn:hover {
  background: #194675;
  color: #ffffff;
}

.spice-btn.active {
  background: #b91c1c;
  border-color: #ef4444;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.order-tracker-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(169, 220, 82, 0.1);
  border: 1px solid rgba(169, 220, 82, 0.3);
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 11px;
}

.order-tracker-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  background: #a9dc52;
  border-radius: 50%;
  box-shadow: 0 0 6px #a9dc52;
  animation: sitemill-pulse 1.5s infinite;
}

.order-eta {
  color: #a9dc52;
  font-weight: 700;
}

/* Card: Contractor & Trades */
.service-selector-box {
  background: #07172b;
  border: 1px solid #1a3c61;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.selector-title {
  font-size: 10px;
  color: #8faecf;
}

.trade-buttons {
  display: flex;
  gap: 6px;
}

.trade-btn {
  flex: 1;
  background: #102e4d;
  border: 1px solid #224d77;
  color: #b8d4f0;
  font-size: 10px;
  padding: 6px 4px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-align: center;
}

.trade-btn:hover {
  background: #194675;
  color: #ffffff;
}

.trade-btn.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.trade-btn.emergency.active {
  background: #dc2626;
  border-color: #f87171;
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.4);
}

.dispatch-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0d2644;
  border: 1px solid #214972;
  border-radius: 8px;
  padding: 8px 12px;
}

.dispatch-tech {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tech-icon { font-size: 16px; }

.dispatch-tech div b {
  font-size: 11px;
  color: #ffffff;
  display: block;
}

.dispatch-tech div small {
  font-size: 9.5px;
  color: #8faecf;
}

.eta-pill {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #a9dc52;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 12px;
}

/* Card: Lawn & Property Care */
.lawn-schedule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lawn-item {
  background: #07172b;
  border: 1px solid #1a3c61;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lawn-item span {
  font-size: 9px;
  color: #8faecf;
}

.lawn-item strong {
  font-size: 10.5px;
}

.lawn-item.completed strong {
  color: #a9dc52;
}

.lawn-item.active strong {
  color: #00c6ff;
}

.sms-reminder-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 169, 214, 0.1);
  border: 1px solid rgba(0, 169, 214, 0.28);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 10px;
  color: #cce9ff;
}

.sms-icon { font-size: 13px; }

/* Interactive Category Switcher Nav */
.sitemill-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.sitemill-tab {
  min-width: 0;
  background: rgba(10, 30, 56, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(50, 86, 125, 0.5);
  border-radius: 8px;
  padding: 6px 4px;
  color: #b5cde7;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sitemill-tab:hover {
  background: rgba(18, 52, 94, 0.85);
  color: #ffffff;
  border-color: #4b80b7;
  transform: translateY(-1px);
}

.sitemill-tab.active {
  background: linear-gradient(135deg, rgba(16, 55, 99, 0.95), rgba(8, 43, 87, 0.95));
  border-color: #a9dc52;
  color: #ffffff;
  box-shadow: 0 4px 14px -3px rgba(169, 220, 82, 0.3);
}

.tab-icon {
  font-size: 11px;
  flex-shrink: 0;
}

/* Media Queries */
@media (max-width: 650px) {
  .sitemill-engine {
    width: 100%;
    max-width: 100%;
    gap: 8px;
  }
  .sitemill-masthead {
    padding: 6px 10px;
  }
  .sitemill-stage {
    padding: 12px;
    min-height: 315px;
  }
  .security-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 8px;
  }
  .sitemill-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }
  .sitemill-tab {
    padding: 5px 3px;
    font-size: 9px;
    gap: 3px;
  }
  .lawn-schedule-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .sitemill-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sitemill-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .board-header, .board-row {
    font-size: 8px;
    grid-template-columns: 14px 1.2fr 1fr 1fr 38px;
    padding: 4px 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .turbine-blades,
  .sitemill-turbine.turbine-burst .turbine-blades,
  .sitemill-drop,
  .cam-scanline,
  .sitemill-live-dot,
  .pulse-indicator {
    animation: none !important;
    transform: none !important;
  }
}
