:root {
    --primary: #673ab7;
    --secondary: #9c27b0;
    --dark: #212121;
    --light: #f5f5f5;
    --accent: #ff9800;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', Arial, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    padding: 0;
}

/* Header */
.site-header {
    background-color:#673ab7;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
    object-fit: cover;
    position: relative;
    top: 2px;
    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: white;
    text-decoration: none;
    margin-left: 20px;
    font-size: 1rem;
    font-weight: bold;
}

.nav-links a:hover {
    text-decoration: underline;
    color: aqua;
}

@media (min-width: 300px) and (max-width:350px) {
    .nav-links a{
        font-size: small;
        margin: 0 0 0 10px;
    }
    
    .site-header {
        padding: 5px 10px;
    }
}

.calculator {
    width: 100%;
    max-width: 500px;
    margin: 40px auto 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background-color: var(--primary);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 500;
}

.display {
    padding: 20px;
    background-color: #f1f3f4;
    text-align: right;
}

.operation-display {
    font-size: 1rem;
    color: #5f6368;
    height: 20px;
    margin-bottom: 8px;
}

.result-display {
    font-size: 2rem;
    font-weight: 500;
    word-break: break-all;
}

.bit-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background-color: #dadce0;
}

button {
    border: none;
    padding: 20px;
    font-size: 1.2rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover {
    background-color: #f1f3f4;
}

.span-2 {
    grid-column: span 2;
}

.operation-btn {
    background-color: #f3e5f5;
    color: var(--primary);
}

.equals-btn {
    background-color: var(--secondary);
    color: white;
}

.clear-btn {
    background-color: #f44336;
    color: white;
}

.binary-btn {
    font-weight: bold;
}

.bit-visualizer {
    padding: 20px;
    background-color: #f1f3f4;
    margin-top: 1px;
}

.bit-title {
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--primary);
}

.bit-container {
    display: flex;
    gap: 5px;
}

.bit {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.bit.active {
    background-color: var(--accent);
    color: white;
    font-weight: bold;
}

.seo-content {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    line-height: 1.7;
}

.seo-content h2,
.seo-content h3 {
    margin-top: 20px;
    color: var(--primary);
}

footer {
    text-align: center;
    padding: 15px;
    background-color: #212121;
    color: #f1f1f1;
    font-size: 0.9rem;
}
 
footer a {
    text-decoration: none;
}
footer a span {
    color: #aa00ff;
    font-weight: bold;
}

footer a span:hover {
    color: aqua;
}