:root {
    --primary-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar {
    background-color: #212e3c;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.navbar-container {
    max-width: 100%;
    margin: 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    place-self: left;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.6rem;
    text-align: center;
    margin-left: 100px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.85rem;
}

.nav-menu a:hover {
    color: #3498db;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border-radius: 5px;
    box-shadow: var(--shadow);
    list-style: none;
    padding: 0.5rem 0;
    min-width: 220px;
    max-height: 80vh;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    columns: 2;
    column-gap: 20px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    padding: 0.5rem 1rem;
    break-inside: avoid;
}

.dropdown-menu a {
    color: #2c3e50;
    display: block;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 3px;
    transition: all 0.2s;
}

.dropdown-menu a:hover {
    color: #3498db;
    background-color: #f8f9fa;
    text-decoration: none;
}
.main-container {
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.converter-box, .info-box {
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.info-container {
    padding: 20px;
}

.info-container h3{
    margin-top: 20px;
}

.info-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.info-section h2 {
    text-align: left;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.info-section h3 {
    margin: 1.5rem 0 1rem;
    color: #2c3e50;
}

.info-section ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.example {
    background-color: white;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border-left: 4px solid #3498db;
}

.example h4 {
    margin-bottom: 0.5rem;
    color: #3498db;
}

.example p {
    margin: 0.3rem 0;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding-bottom: 20px;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
}

h1, h2 {
    color: var(--dark-color);
    margin-bottom: 20px;
    text-align: center;
}

.converter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
    align-items: center;
    justify-content: center;
}

.input-section {
    flex: 1;
    min-width: 300px;
    place-items: center;
}

.input-group {
    margin-bottom: 20px;
    width: 80%;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--dark-color);
}

.input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.input-wrapper span {
    padding: 10px 15px;
    background-color: #eee;
    color: #555;
    font-weight: bold;
}

.input-wrapper input {
    flex: 1;
    padding: 10px;
    border: none;
    outline: none;
    font-size: 16px;
}

.input-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}
.input-wrapper input::placeholder {
    color: #aaa;
}


button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

#convert-btn {
    border-radius: 5px;
    margin-right: 1.5px;
}

ol{
    margin-left: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.result-container {
    display: flex;
    align-items: center;
    margin-top: 20px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s;
    width: 80%;
}

.hsv-result {
    flex: 1;
    font-size: 18px;
    font-weight: bold;
    color: var(--dark-color);
    padding: 5px;
    font-family: monospace;
}

.copy-btn {
    background-color: transparent;
    color: var(--dark-color);
    padding: 5px 10px;
    border-radius: 5px;
    margin-left: 10px;
}

.copy-btn:hover {
    background-color: #e0e0e0;
}

.color-display-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 350px;
    height: 340.6px;
}

.color-display-section p{
    font-size: 10px;
}

.color-display {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    box-shadow: var(--shadow);
    border: 5px solid white;
    transition: background-color 0.3s;
}

#color-picker {
    width: 250px;
    height: 250px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 50%;
    -webkit-appearance: none;
}

#color-picker::-webkit-color-swatch {
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: var(--shadow);
}

#color-picker::-moz-color-swatch {
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: var(--shadow);
}

.current-hex-display {
    background: white;
    padding: 10px;
    border-radius: 5px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.current-hex-display span {
    font-weight: bold;
    font-family: monospace;
}
.cmyk-result {
    flex: 1;
    font-size: 18px;
    font-weight: bold;
    color: var(--dark-color);
    padding: 5px;
    font-family: monospace;
}
.shades-container {
    margin-top: 40px;
    margin-bottom: 20px;
}

.shades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
    margin-left: 95px;
}


.shade-box {
    height: 80px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    color: white;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.shade-box:hover {
    transform: translateY(-5px);
}

.shade-box .shade-hex {
    font-size: 14px;
}

.shade-box .shade-copy {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
    align-self: flex-start;
    display: none;
}

.shade-box:hover .shade-copy {
    display: block;
}

.combinations-container {
    margin-top: 40px;
    width: 100%;
}

.combinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.color-combo {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
    cursor: pointer;
    min-height: 180px;
    display: flex;
    flex-direction: column;
}

.color-combo:hover {
    transform: translateY(-5px);
}

.combo-colors {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.combo-color {
    flex: 1;
    min-height: 40px;
    position: relative;
    transition: all 0.2s ease;
}

.combo-color:hover {
    transform: scale(1.02);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.combo-label {
    padding: 12px;
    background: white;
    font-size: 13px;
    text-align: center;
    font-weight: bold;
    border-top: 1px solid #eee;
}

.combo-color .hex-value {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-family: monospace;
}

.combo-color .copy-hex {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255,255,255,0.9);
    color: #333;
    border: none;
    border-radius: 3px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
}

.combo-color:hover .copy-hex {
    opacity: 1;
}

.combo-color .copy-hex:hover {
    background: white;
    transform: scale(1.1);
}

.examples-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.color-examples {
    list-style: none;
    padding: 0;
}

.color-examples li {
    padding: 8px 0;
    display: flex;
    align-items: center;
}

.color-demo {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 1px solid #ddd;
    margin: 0 10px;
    vertical-align: middle;
}

.faq-section {
    margin-top: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.faq-item {
    margin-bottom: 15px;
}

.faq-item h4 {
    margin-bottom: 5px;
    color: #2c3e50;
}

.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3 {
    color: #ecf0f1;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.9;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-bottom p {
    margin: 5px 0;
}
@media (max-width: 768px) {
    *{
        font-size: 0.8rem;
    }
    .nav-menu{
        margin-left: 10px;
    }
    .nav-menu a{
        font-size: 0.7rem;
        gap: 0rem;
    }
    h1{
        font-size: 1.2rem;
    }
    .color-display-section{
        height: 80%;
        width: 80%;
        margin-left: -15px;
    }
    .input-group{
        width: 100%;
    }
    .result-container{
        width: 100%;
    }
    .shades-grid{
        margin-left: 0;
    }
}
@media (max-width: 768px) {
    *{
        font-size: 0.8rem;
    }
    #hsl-input{
        font-size: 0.8rem;
    }
    .hsv-result{
        font-size: 1rem;
    }
    .shades-grid{
        padding: 0;
        margin: 0;
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    .input-wrapper input {
        width: 50px;
    }
    .navbar{
        margin: 0;
        padding: 0;
        width: 100%;
    }
    .navbar-container {
        flex-direction: column;
        padding: 10px;
        padding-bottom: 15px;
        width: 100%;
        place-self: center;
    }

    .logo {
        margin: 0px;
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.7rem;
        margin: 0;
    }

    .nav-menu a {
        margin: 0;
        font-size: 0.7rem;
        padding: 0;
    }

    .dropdown-menu {
        position: static;
        columns: 2;
        min-width: 260px;
        max-height: none;
      }
      .dropdown:hover .dropdown-menu {
        display: none;
      }
      .dropdown-menu.show {
        display: block !important;
      }
    .input-group label {
        margin-left: 2px;
    }
    .input-wrapper{
        width: 300px;
    }
    #convert-btn{
        font-size: 1rem;
        margin-right: -2px;
    }
    .input-wrapper span{
        margin-left: 4px;
    }
    .hex-result{
        font-size: 1rem;
        margin-left: 20px;
    }
    .rgb-result{
        width: 100px;
    }
    #copy-hex i {
        margin-left: 150px;
        font-size: 1.2rem;
    }
    .color-display-section{
        margin-top: 10px;
        margin-left: 0px;
    }
    #color-picker{
        width: 150px;
        height: 150px;
    }
    .main-container{
        padding: 10px;
    }
    .color-display-section{
        margin-bottom: -40px;
    }
    .shades-container{
        margin-top: 70px;
    }
    .shades-container h2 {
        margin-bottom: 15px;
    }
    .footer-bottom p {
        font-size: 0.7rem;
    }
    .converter-container {
        flex-direction: column;
    }
    .shades-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    .footer-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}