:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #10b981;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #94a3b8;
    --gray-light: #e2e8f0;
    --danger: #ef4444;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --rounded-sm: 0.25rem;
    --rounded: 0.5rem;
    --rounded-lg: 1rem;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    color: var(--dark);
    background-color: #f1f5f9;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
    background-color: transparent;
    /* background: linear-gradient(135deg, #1a252f, #2c3e50); */
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.log {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
}

.log img {
    height: 40px;
    margin-right: 10px;
    object-fit: cover;
    position: relative;
    top: 5px;
    filter: drop-shadow(0 0 3px rgb(255, 255, 255));
}

.log a span {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: bolder;
    background: linear-gradient(to right, #aa00ff, #0015ff, #1b9400, #ffae00, #ff0000, #ffae00, #1b9400, #0015ff, #aa00ff);
    background-size: 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: animate-gradient 2.5s linear infinite;
    position: relative;
    top: -3px;
}

@keyframes animate-gradient {
    to {
        background-position: 200%;
    }
}

.log a {
    text-decoration: none;
    color: white;
}

.nav-links a {
    color: rgba(39, 39, 39, 0.7);
    text-decoration: none;
    margin-left: 20px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #000000;
}

nav a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #000000;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

@media (min-width: 350px) and (max-width:390px) {
    .nav-links a {
        margin: 0 0 0 10px;
    }

    .site-header {
        padding: 5px 10px;
    }
}

@media (min-width: 300px) and (max-width:350px) {
    .nav-links a {
        font-size: small;
        margin: 0 0 0 10px;
    }

    .log {
        gap: 0;
    }

    .log a span {
        font-size: 1.2rem;
        position: relative;
        top: -5px;
    }

    .site-header {
        padding: 5px 10px;
    }
}


.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.75rem;
}

.logo i {
    font-size: 1.8rem;
}

.tagline {
    color: var(--gray);
    font-size: 1.125rem;
    max-width: 500px;
    margin: 0 auto;
}

.converter-card {
    background: white;
    border-radius: var(--rounded-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    background-color: var(--primary);
    color: white;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-body {
    padding: 1.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark);
}

.input-field {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--rounded);
    font-size: 1rem;
    transition: var(--transition);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--rounded);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.result-section {
    background: white;
    border-radius: var(--rounded-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease-out;
}

.result-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fraction-result {
    text-align: center;
    margin-bottom: 1.5rem;
}

.fraction {
    display: inline-block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.5rem 0;
}

.fraction span {
    display: block;
    line-height: 1;
}

.fraction .numerator {
    border-bottom: 2px solid var(--dark);
    padding-bottom: 0.25rem;
}

.fraction .denominator {
    padding-top: 0.25rem;
}

.decimal-value {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.steps-container {
    background: white;
    border-radius: var(--rounded-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.steps-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
}

.step:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.step-content {
    flex-grow: 1;
}

.step-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.step-description {
    color: var(--gray);
    font-size: 0.9375rem;
}

.step-math {
    background-color: #f8fafc;
    border-radius: var(--rounded-sm);
    padding: 0.75rem;
    margin-top: 0.75rem;
    font-family: monospace;
    overflow-x: auto;
}

.error-message {
    color: var(--danger);
    margin-top: 1rem;
    font-weight: 500;
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

footer {
    text-align: center;
    margin: 3rem;
    color: var(--gray);
    font-size: 0.875rem;
}

footer p a {
    text-decoration: none;
    font-weight: bold;
    color: #0015ff;
}

@media (max-width: 640px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .fraction {
        font-size: 2rem;
    }
}

.seo-section {
  max-width: 960px;
  margin: 40px auto;
  padding: 30px 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  line-height: 1.8;
  font-size: 1rem;
  color: #212529;
}

.seo-section h2 {
  font-size: 1.8rem;
  color: #4361ee;
  margin-bottom: 20px;
  border-bottom: 2px solid #4361ee;
  padding-bottom: 10px;
}

.seo-section h3 {
  font-size: 1.4rem;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #3f37c9;
}

.seo-section p {
  margin-bottom: 15px;
}

.seo-section ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 20px;
}

.seo-section ul li {
  margin-bottom: 10px;
}

.seo-section ol {
  list-style: decimal;
  padding-left: 20px;
  margin-bottom: 20px;
}

.seo-section ol li {
  margin-bottom: 10px;
}

.seo-section strong {
  color: #4361ee;
}

.seo-section a {
  color: #3f37c9;
  text-decoration: underline;
}

.seo-section a:hover {
  text-decoration: none;
}
