:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --warning-color: #f8961e;
    --danger-color: #f94144;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --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;
    background-color: #f5f7fa;
    color: var(--dark-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.site-header {
    background-color: #3f37c9;
    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;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.header h1 i {
    margin-right: 10px;
}

.subtitle {
    color: var(--gray-color);
    font-size: 1.1rem;
}

.color-pickers {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.color-picker {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.color-picker label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-color);
}

.color-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-input input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.color-input input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-family: monospace;
    font-size: 1rem;
}

.color-input input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.preview-section {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.preview-box {
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 20px;
    transition: var(--transition);
}

#preview-text {
    font-size: 1.5rem;
    margin: 0;
}

.size-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.size-controls label {
    font-weight: 600;
}

.size-controls select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
}

.size-controls select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.results-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.contrast-ratio,
.compliance-results {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contrast-ratio h3,
.compliance-results h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.ratio-value {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin: 20px 0;
    color: var(--dark-color);
}

.ratio-scale {
    height: 20px;
    background: linear-gradient(to right, #f94144, #f8961e, #90be6d, #43aa8b);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.scale-bar {
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    width: 0;
    transition: var(--transition);
}

.compliance-levels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.level {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--border-radius);
    background-color: #f0f0f0;
}

.level i {
    font-size: 1.2rem;
}

.level.pass {
    background-color: #e6f7ee;
    color: #2e8b57;
}

.level.fail {
    background-color: #ffebee;
    color: #d32f2f;
}

.additional-info {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-box {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.info-box h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box h3 i {
    font-size: 1.2rem;
}

.info-grid {
    display: flex;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex-wrap: wrap;
}

.info-grid div {
    display: flex;
    justify-content: space-between;
}

.info-grid span:first-child {
    font-weight: 600;
}

.suggestions p {
    margin-bottom: 10px;
}

.footer {
    text-align: center;
    padding: 20px;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.footer a {
    text-decoration: none;
    font-weight: bold;
    color: #aa00ff;
}

.two-opsn {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;

    flex: 1;
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.two-opsn a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
    background-color: rgb(0, 0, 255);
    padding: 10px 20px 10px 20px;
    border-radius: 5px;
}

.two-opsn a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* SEO Content Styling */
.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 span:hover {
    color: #00ff11;
}

@media (max-width: 768px) {

    .color-pickers,
    .results-section,
    .additional-info {
        flex-direction: column;
    }

    .compliance-levels {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 2rem;
    }
}



@media (min-width: 300px) and (max-width:350px) {
    .nav-links a {
        font-size: small;
        margin: 0 0 0 10px;
    }

    .site-header {
        padding: 10px 10px;
    }

    #random-colors {
        font-size: small;
        padding: 10px 7px;
    }

    #swap-colors {
        font-size: small;
        padding: 10px 7px;
    }

    .info-grid {
        display: flex;
        flex-wrap: wrap;
    }
}





@media (max-width: 768px) {

    .info-grid span,
    .info-grid h3,
    .info-grid p {
        font-size: 14px;
    }
}





@media (min-width: 350px) and (max-width:390px) {
    #random-colors {
        font-size: small;
        /* padding: 10px 10px; */
    }

    #swap-colors {
        font-size: small;
        /* padding: 10px 5px; */
    }
}