/* Main Converter Section */
.octal-converter-main {
	margin-top: 2.5rem;
	margin-bottom: 2rem;
}

.converter-card {
	background: #ffffff;
	border-radius: 24px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	border: 1px solid #e9ecef;
	transition: all 0.3s ease;
}

.converter-card:hover {
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* Converter Header */
.converter-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	padding: 1.5rem;
}

.mode-switcher {
	display: flex;
	gap: 0.75rem;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(10px);
	border-radius: 16px;
	padding: 0.375rem;
}

.mode-btn {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.875rem 1.25rem;
	background: transparent;
	border: none;
	border-radius: 12px;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	text-decoration: none;
}

.mode-btn:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.1);
}

.mode-btn.active {
	background: #ffffff;
	color: #667eea;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mode-icon {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1;
}

.mode-text {
	line-height: 1;
}

/* Converter Body */
.converter-body {
	padding: 2.5rem;
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.input-section,
.output-section {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.section-label {
	display: flex;
	align-items: center;
}

.base-indicator {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.625rem 1.25rem;
	border-radius: 12px;
	font-weight: 600;
	transition: all 0.3s ease;
}

.base-indicator.base-8 {
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
	color: #667eea;
}

.base-indicator.base-10 {
	background: linear-gradient(135deg, rgba(240, 147, 251, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
	color: #f5576c;
}

.base-number {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1;
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: currentColor;
	color: #ffffff;
	border-radius: 8px;
}

.base-indicator.base-8 .base-number {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.base-indicator.base-10 .base-number {
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.base-text {
	font-size: 0.9375rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Input Field */
.input-field-wrapper,
.output-field-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	background: #f8f9fa;
	border: 2px solid #e9ecef;
	border-radius: 16px;
	transition: all 0.3s ease;
	overflow: hidden;
}

.input-field-wrapper:focus-within {
	border-color: #667eea;
	background: #ffffff;
	box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.main-input {
	flex: 1;
	padding: 1.5rem 4.5rem 1.5rem 1.5rem;
	font-size: 1.75rem;
	font-weight: 700;
	
	border: none;
	background: transparent;
	color: #212529;
	outline: none;
	width: 100%;
}

.main-input::placeholder {
	color: #adb5bd;
	font-weight: 400;
}

.input-actions,
.output-actions {
	display: flex;
	gap: 0.5rem;
	padding: 0.75rem;
	position: absolute;
	right: 0.5rem;
}

.action-btn {
	width: 2.5rem;
	height: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid #e9ecef;
	border-radius: 10px;
	color: #6c757d;
	cursor: pointer;
	transition: all 0.2s ease;
	backdrop-filter: blur(10px);
}

.action-btn:hover {
	background: #ffffff;
	color: #667eea;
	border-color: #667eea;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
	transform: translateY(0);
}

.action-btn svg {
	width: 18px;
	height: 18px;
}

.input-feedback {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	padding: 0.5rem 0;
	transition: all 0.3s ease;
}

.input-feedback.valid {
	color: #28a745;
}

.input-feedback.invalid {
	color: #dc3545;
}

.feedback-icon {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1;
}

/* Conversion Divider */
.conversion-divider {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0.5rem 0;
}

.divider-line {
	flex: 1;
	height: 2px;
	background: linear-gradient(90deg, transparent, #e9ecef, transparent);
}

.divider-icon {
	width: 3rem;
	height: 3rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 50%;
	color: #ffffff;
	flex-shrink: 0;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
	animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		transform: scale(1);
		opacity: 1;
	}
	50% {
		transform: scale(1.05);
		opacity: 0.9;
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.divider-icon svg {
	width: 1.5rem;
	height: 1.5rem;
}

/* Output Section */
.output-field-wrapper {
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
	border: 2px solid rgba(102, 126, 234, 0.2);
}

.output-display {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	padding: 1.5rem;
	flex: 1;
}

.output-number {
	font-size: 2.5rem;
	font-weight: 700;
	
	color: #212529;
	line-height: 1;
}

.output-base {
	font-size: 1.5rem;
	font-weight: 600;
	color: #667eea;
	line-height: 1;
}

.output-label {
	font-size: 0.875rem;
	color: #6c757d;
	font-weight: 500;
	padding-left: 0.25rem;
}

/* Converter Footer */
.converter-footer {
	padding: 1.5rem 2.5rem;
	background: #f8f9fa;
	border-top: 1px solid #e9ecef;
}

.quick-actions {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.quick-action-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	padding: 0.75rem 1.25rem;
	background: #ffffff;
	border: 2px solid #e9ecef;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.3s ease;
	min-width: 80px;
}

.quick-action-btn:hover {
	border-color: #667eea;
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.quick-action-btn:active {
	transform: translateY(0);
}

.quick-value {
	font-size: 1.125rem;
	font-weight: 700;
	
	color: #212529;
	line-height: 1;
}

.quick-label {
	font-size: 0.75rem;
	color: #6c757d;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Details Card */
.details-card {
	background: #ffffff;
	border-radius: 24px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
	border: 1px solid #e9ecef;
	margin-top: 2rem;
	overflow: hidden;
	transition: all 0.3s ease;
}

.details-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.5rem 2rem;
	background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
	border-bottom: 1px solid #e9ecef;
	cursor: pointer;
	user-select: none;
}

.details-header:hover {
	background: linear-gradient(135deg, #f1f3f5 0%, #f8f9fa 100%);
}

.details-title {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 1.125rem;
	font-weight: 600;
	color: #212529;
	margin: 0;
}

.details-title svg {
	width: 20px;
	height: 20px;
	color: #667eea;
}

.details-toggle {
	width: 2.5rem;
	height: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	border: 1px solid #e9ecef;
	border-radius: 10px;
	color: #6c757d;
	cursor: pointer;
	transition: all 0.3s ease;
}

.details-toggle:hover {
	background: #f8f9fa;
	color: #667eea;
	border-color: #667eea;
}

.details-toggle svg {
	width: 18px;
	height: 18px;
	transition: transform 0.3s ease;
}

.details-toggle.expanded svg {
	transform: rotate(180deg);
}

.details-body {
	padding: 2rem;
	overflow: hidden;
	transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
	max-height: 2000px;
	opacity: 1;
}

.details-body.collapsed {
	max-height: 0;
	opacity: 0;
	padding-top: 0;
	padding-bottom: 0;
}

.details-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.25rem;
	margin-bottom: 2rem;
}

.detail-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.25rem;
	background: #f8f9fa;
	border-radius: 16px;
	border: 1px solid #e9ecef;
	transition: all 0.3s ease;
}

.detail-item:hover {
	background: #ffffff;
	border-color: #667eea;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
	transform: translateY(-2px);
}

.detail-icon {
	width: 3rem;
	height: 3rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	font-size: 1.25rem;
	font-weight: 700;
	color: #ffffff;
	flex-shrink: 0;
}

.detail-icon.octal-icon {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.detail-icon.decimal-icon {
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.detail-icon.binary-icon {
	background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.detail-icon.hex-icon {
	background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.detail-content {
	flex: 1;
	min-width: 0;
}

.detail-name {
	font-size: 0.8125rem;
	color: #6c757d;
	font-weight: 500;
	margin-bottom: 0.375rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.detail-value {
	font-size: 1rem;
	font-weight: 700;
	
	color: #212529;
	word-break: break-all;
}

.calculation-box {
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
	border: 1px solid rgba(102, 126, 234, 0.2);
	border-radius: 16px;
	padding: 1.5rem;
}

.calculation-header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #667eea;
	margin-bottom: 1rem;
}

.calculation-header svg {
	width: 18px;
	height: 18px;
}

.calculation-content {
	font-size: 1rem;
	
	color: #212529;
	line-height: 1.8;
	white-space: pre-wrap;
	word-break: break-word;
	padding: 1rem;
	background: #ffffff;
	border-radius: 12px;
	border: 1px solid rgba(102, 126, 234, 0.1);
}

/* Mobile Responsive */
@media (max-width: 991px) {
	.converter-body {
		padding: 2rem;
	}

	.details-grid {
		grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	}
}

@media (max-width: 767px) {
	.octal-converter-main {
		margin-top: 1.5rem;
	}

	.converter-header {
		padding: 1.25rem;
	}

	.mode-switcher {
		flex-direction: column;
		gap: 0.5rem;
	}

	.mode-btn {
		padding: 1rem;
	}

	.converter-body {
		padding: 1.5rem;
		gap: 1.5rem;
	}

	.main-input {
		font-size: 1.5rem;
		padding: 1.25rem 4rem 1.25rem 1.25rem;
	}

	.output-number {
		font-size: 2rem;
	}

	.output-base {
		font-size: 1.25rem;
	}

	.converter-footer {
		padding: 1.25rem 1.5rem;
	}

	.quick-actions {
		justify-content: center;
	}

	.quick-action-btn {
		flex: 1;
		min-width: calc(50% - 0.375rem);
	}

	.details-header {
		padding: 1.25rem 1.5rem;
	}

	.details-body {
		padding: 1.5rem;
	}

	.details-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.calculation-box {
		padding: 1.25rem;
	}

	.calculation-content {
		font-size: 0.9375rem;
	}
}

@media (max-width: 575px) {
	.converter-body {
		padding: 1.25rem;
	}

	.main-input {
		font-size: 1.25rem;
		padding: 1rem 3.5rem 1rem 1rem;
	}

	.output-number {
		font-size: 1.75rem;
	}

	.base-indicator {
		padding: 0.5rem 1rem;
	}

	.base-number {
		width: 1.75rem;
		height: 1.75rem;
		font-size: 1.125rem;
	}

	.quick-action-btn {
		min-width: calc(50% - 0.375rem);
		padding: 0.625rem 1rem;
	}

	.details-body {
		padding: 1.25rem;
	}

	.detail-item {
		padding: 1rem;
	}

	.detail-icon {
		width: 2.5rem;
		height: 2.5rem;
		font-size: 1.125rem;
	}
}
