.pulley-calculator {
	width: 100%;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pulley-calculator__loading {
	padding: 2rem;
	text-align: center;
	color: #666;
}

.pulley-calc {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	padding: 1.5rem;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
	.pulley-calc {
		grid-template-columns: 400px 1fr;
	}
}

.pulley-calc.dark {
	background: #1a1a1a;
	color: #f0f0f0;
}

.pulley-calc.dark .pulley-calc__input,
.pulley-calc.dark .pulley-calc__mode-select,
.pulley-calc.dark .pulley-calc__belt-select {
	background: #2a2a2a;
	color: #f0f0f0;
	border-color: #444;
}


@media (prefers-color-scheme: dark) {
	.pulley-calc.auto {
		background: #1a1a1a;
		color: #f0f0f0;
	}

	.pulley-calc.auto .pulley-calc__input,
	.pulley-calc.auto .pulley-calc__mode-select,
	.pulley-calc.auto .pulley-calc__belt-select {
		background: #2a2a2a;
		color: #f0f0f0;
		border-color: #444;
	}

}

.pulley-calc__controls {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.pulley-calc__mode label,
.pulley-calc__belt-type label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #ffffff;
}

.pulley-calc.light .pulley-calc__mode label,
.pulley-calc.light .pulley-calc__belt-type label {
	color: #1a1a1a;
}

.pulley-calc__mode-select,
.pulley-calc__belt-select {
	width: 100%;
	padding: 0.75rem;
	font-size: 1rem;
	border: 2px solid #ddd;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.2s;
}

.pulley-calc__mode-select:focus,
.pulley-calc__belt-select:focus {
	outline: none;
	border-color: #ff6b35;
}


.pulley-calc__inputs {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.pulley-calc__input-group,
.pulley-calc__output-group {
	display: grid;
	grid-template-columns: 200px 1fr auto;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem;
	border: 2px solid #e5e5e5;
	border-radius: 4px;
	transition: all 0.3s;
}

.pulley-calc__input-group.is-missing {
	border-color: #ff6b35;
	background: rgba(255, 107, 53, 0.05);
	box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.pulley-calc.dark .pulley-calc__input-group,
.pulley-calc.dark .pulley-calc__output-group {
	border-color: #333;
}

.pulley-calc.dark .pulley-calc__input-group.is-missing {
	border-color: #ff6b35;
	background: rgba(255, 107, 53, 0.1);
}

.pulley-calc__input-group label,
.pulley-calc__output-group label {
	font-weight: 600;
	font-size: 0.875rem;
	color: #ffffff;
}

.pulley-calc.light .pulley-calc__input-group label,
.pulley-calc.light .pulley-calc__output-group label {
	color: #1a1a1a;
}

.pulley-calc__input {
	padding: 0.5rem;
	font-size: 1rem;
	border: 1px solid #ddd;
	border-radius: 3px;
	background: #fff;
	font-family: 'Courier New', monospace;
	transition: border-color 0.2s;
}

.pulley-calc__input:focus {
	outline: none;
	border-color: #ff6b35;
}

.pulley-calc__input[readonly] {
	background: #f9f9f9;
	cursor: not-allowed;
	font-weight: 600;
	color: #ff6b35;
}

.pulley-calc.dark .pulley-calc__input[readonly] {
	background: #333;
	color: #ff6b35;
}

.pulley-calc__unit {
	font-size: 0.875rem;
	color: #999;
	font-weight: 600;
	min-width: 40px;
}

.pulley-calc__help-text {
	margin-top: 0.5rem;
	padding: 0.75rem;
	background: rgba(59, 130, 246, 0.1);
	border-left: 3px solid #3b82f6;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: #ffffff;
}

.pulley-calc.light .pulley-calc__help-text {
	color: #1a1a1a;
}

.pulley-calc__label-hint {
	font-weight: 400;
	font-size: 0.75rem;
	opacity: 0.7;
	font-style: italic;
}

.pulley-calc__info-box {
	background: rgba(255, 107, 53, 0.05);
	border-left: 3px solid #ff6b35;
}

.pulley-calc.dark .pulley-calc__info-box {
	background: rgba(255, 107, 53, 0.1);
}

.pulley-calc__belt-part {
	font-family: 'Courier New', monospace;
	font-weight: 700;
	color: #ff6b35;
	font-size: 1.1rem;
}

.pulley-calc__output {
	padding: 0.5rem;
	font-size: 1rem;
	font-family: 'Courier New', monospace;
	font-weight: 600;
	color: #ff6b35;
}

.pulley-calc__help-text {
	margin-top: 0.5rem;
	padding: 0.75rem;
	background: rgba(59, 130, 246, 0.1);
	border-left: 3px solid #3b82f6;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: #ffffff;
}

.pulley-calc.light .pulley-calc__help-text {
	color: #1a1a1a;
	background: rgba(59, 130, 246, 0.05);
}

.pulley-calc__label-hint {
	font-weight: 400;
	font-size: 0.75rem;
	opacity: 0.7;
	font-style: italic;
}

.pulley-calc__info-box {
	background: rgba(255, 107, 53, 0.05);
	border-left: 3px solid #ff6b35;
}

.pulley-calc.dark .pulley-calc__info-box {
	background: rgba(255, 107, 53, 0.1);
}

.pulley-calc__belt-part {
	font-family: 'Courier New', monospace;
	font-weight: 700;
	color: #ff6b35;
	font-size: 1.1rem;
}

.pulley-calc__error {
	padding: 1rem;
	background: #fee;
	border: 2px solid #fcc;
	border-radius: 4px;
	color: #c33;
	font-size: 0.875rem;
	font-weight: 600;
}

.pulley-calc.dark .pulley-calc__error {
	background: rgba(255, 51, 51, 0.2);
	border-color: #c33;
}

.pulley-calc__visualization {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 300px;
	background: #fafafa;
	border-radius: 4px;
	border: 2px solid #e5e5e5;
}

.pulley-calc.dark .pulley-calc__visualization {
	background: #0a0a0a;
	border-color: #333;
}

.pulley-calc__svg {
	width: 100%;
	height: 100%;
	max-height: 500px;
}

.is-missing circle {
	filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.6));
}

path.is-missing {
	filter: drop-shadow(0 0 6px rgba(255, 107, 53, 0.5));
	animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
	0%, 100% {
		filter: drop-shadow(0 0 6px rgba(255, 107, 53, 0.5));
	}
	50% {
		filter: drop-shadow(0 0 12px rgba(255, 107, 53, 0.8));
	}
}

.pulley-label {
	fill: #000000;
	user-select: none;
	pointer-events: none;
	font-weight: bold;
}

@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

@media (max-width: 767px) {
	.pulley-calc {
		padding: 1rem;
	}

	.pulley-calc__input-group,
	.pulley-calc__output-group {
		grid-template-columns: 1fr;
		gap: 0.25rem;
	}

	.pulley-calc__unit {
		text-align: right;
	}
}
