:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #3f37c9;
    --text-color: #2b2d42;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --error-color: #d90429;
    --success-color: #2b9348;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f7ff;
    padding: 20px;
}

/* Header */
.site-header {
    background-color: #1a252f;
    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(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
}

.logo img {
    height: 40px;
    margin-right: 10px;
    object-fit: cover;
    position: relative;
    top: 5px;
    filter: drop-shadow(0 0 3px rgb(255, 255, 255));
}

.logo 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;
}

@keyframes animate-gradient {
    to {
        background-position: 200%;
    }
}

.logo a {
    text-decoration: none;
    color: white;
}

.nav-links a {
    color: rgba(255, 255, 255, 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: #ffffff;
}

nav a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

@media (min-width: 300px) and (max-width:380px) {
    .nav-links a {
        font-size: small;
        margin: 0 0 0 10px;
    }

    .logo a span {
        font-size: large;
    }

    .site-header {
        padding: 5px 10px;
    }
}

.container {
    max-width: 800px;
    margin: 50px auto 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

header p {
    color: var(--dark-gray);
    font-size: 1.1rem;
}

.converter-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.fraction-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fraction-input input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    text-align: center;
}

.fraction-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.fraction-bar {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-gray);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.result-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.result-box {
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
}

.result-box label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.result {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.error-message {
    color: var(--error-color);
    margin-top: 1rem;
    font-weight: 500;
    text-align: center;
    min-height: 1.5rem;
}

.info-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
}

.info-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.info-section ol {
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

.info-section li {
    margin-bottom: 0.5rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.example {
    background-color: var(--light-gray);
    padding: 1rem;
    border-radius: var(--border-radius);
}

.example span {
    font-weight: bold;
    color: var(--primary-color);
}

footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--dark-gray);
    padding: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {

    .result-container,
    .examples-grid {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 2rem;
    }

    .converter-card,
    .info-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .fraction-input {
        flex-direction: column;
        align-items: stretch;
    }

    .fraction-bar {
        display: none;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 1rem;
    }
}

.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: var(--dark-color);
}

.seo-section h2 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
}

.seo-section h3 {
  font-size: 1.4rem;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.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: var(--primary-color);
}

.seo-section a {
  color: var(--secondary-color);
  text-decoration: underline;
}

.seo-section a:hover {
  text-decoration: none;
}

footer p a {
    text-decoration: none;
    color: hsl(350, 100%, 50%);
    font-weight: bold;
}