* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4361ee;
    --primary-light: #e0e7ff;
    --secondary: #7209b7;
    --accent: #f72585;
    --dark: #212529;
    --light: #ffffff;
    --gray: #6c757d;
    --light-gray: #f8f9fa;
    --border: #dee2e6;
}

body {
    background-color: var(--light);
    color: var(--dark);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px;
    line-height: 1.6;
}

/* 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);
    width: 100%;
    height: 50px;
}

.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: 7px;
    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;
    position: relative;
    top: -3px;
}

@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: 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;
    }

    .logo {
        gap: 0;
    }

    .logo a span {
        font-size: 1.2rem;
        position: relative;
        top: -5px;
    }

    .site-header {
        padding: 5px 10px;
    }
}


.container {
    max-width: 900px;
    width: 100%;
    background: var(--light);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    margin: 20px;
    border: 1px solid var(--border);
}

header {
    text-align: center;
    padding: 30px 20px;
    background: var(--light);
    border-bottom: 1px solid var(--border);
}

h1 {
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.subtitle {
    font-size: 1rem;
    color: var(--gray);
    max-width: 500px;
    margin: 0 auto;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: auto;
}

@media (max-width: 768px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}

.diagram-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.triangle-diagram {
    position: relative;
    width: 240px;
    height: 200px;
}

.triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 120px solid transparent;
    border-right: 0px solid transparent;
    border-bottom: 180px solid var(--primary-light);
}

.side-label {
    position: absolute;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.side-a {
    top: 150px;
    left: 40px;
}

.side-b {
    top: 80px;
    left: -30px;
    transform: rotate(-90deg);
}

.side-c {
    top: 20px;
    left: 90px;
    transform: rotate(45deg);
}

.right-angle {
    position: absolute;
    top: 155px;
    left: 85px;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 2px;
}

.formula {
    text-align: center;
    margin: 15px 0 25px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    color: var(--dark);
    background: var(--light-gray);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.formula span {
    color: var(--secondary);
    font-weight: 500;
}

.calculator {
    background: var(--light);
    border-radius: 12px;
    padding: 25px;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--dark);
    font-weight: 500;
}

.input-field {
    width: 100%;
    padding: 12px 15px;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--dark);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn.calculate {
    background: var(--primary);
    color: white;
}

.btn.calculate:hover {
    background: #3a56d4;
    transform: translateY(-1px);
}

.btn.reset {
    background: white;
    color: var(--gray);
    border: 1px solid var(--border);
}

.btn.reset:hover {
    background: var(--light-gray);
    border-color: var(--gray);
}

.result-container {
    margin-top: 25px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 10px;
    border: 1px solid var(--border);
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.result-title {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 1.8rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

.explanation {
    font-size: 0.95rem;
    color: var(--gray);
    max-width: 100%;
}

footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--gray);
}

/* Animation for results */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.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;
}
 
footer p a {
    text-decoration: none;
    font-weight: bold;
    color: rgb(18, 215, 0);
}