:root {
    --primary: #4361ee;
    --secondary: #7209b7;
    --accent: #f72585;
    --dark: #2d3748;
    --light: #f7fafc;
    --gray: #718096;
    --success: #4cc9f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f4f8;
    color: var(--dark);
    min-height: 100vh;
    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);
    margin-bottom: 40px;
    height: 55px;
}

.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(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;
    }

    .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;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.logo i {
    font-size: 1.8rem;
    color: var(--primary);
}

h1 {
    font-size: 2rem;
    color: var(--primary);
    font-weight: 600;
}

.subtitle {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

.control-panel {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.shape-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.shape-option {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.8rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shape-option:hover {
    border-color: var(--primary);
}

.shape-option.active {
    background: #f0f7ff;
    border-color: var(--primary);
}

.shape-option i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.inputs-container {
    margin-bottom: 1.5rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--dark);
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    color: var(--dark);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.calculate-btn {
    width: 100%;
    padding: 0.8rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.calculate-btn:hover {
    background: #3a56d4;
}

.result-container {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.result-container h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--gray);
}

.result {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary);
}

.history {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.history h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

#historyList {
    list-style: none;
}

#historyList li {
    padding: 0.8rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.history-shape {
    font-weight: 500;
    color: var(--primary);
}

.history-result {
    font-weight: 600;
    color: var(--success);
}

footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--gray);
}

@media (max-width: 480px) {
    .shape-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 1.5rem;
    }
}

.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 {
    margin: 30px;
}

footer p a {
    text-decoration: none;
    color: #aa00ff;
    font-weight: bold;
}