* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header h1 span {
    font-weight: 400;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

nav {
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav li {
    margin: 0;
}

nav a {
    display: block;
    padding: 15px 25px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

nav a:hover {
    background: #f9f9f9;
    color: #5a67d8;
}

main {
    padding: 40px 0;
}

.color-input-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #555;
}

.input-group input {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.input-group button {
    padding: 12px 20px;
    font-size: 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.input-group button:hover {
    background: #5a67d8;
}

#color-preview {
    width: 200px;
    height: 200px;
    margin: 20px auto;
    border-radius: 8px;
    border: 5px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    background-color: #38cc91;
}

.color-info-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.color-info-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

.color-info {
    margin-bottom: 30px;
}

#color-description {
    font-size: 1.1rem;
    color: #555;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.conversion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.conversion-item {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
    transition: transform 0.3s;
}

.conversion-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.conversion-item h3 {
    margin-bottom: 10px;
    color: #667eea;
    font-size: 1.1rem;
}

.color-related {
    margin-top: 40px;
}

#color-shades, #color-tints {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.color-swatch {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch::after {
    content: attr(data-hex);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #666;
    white-space: nowrap;
}

footer {
    background: #333;
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 40px;
}

footer p {
    opacity: 0.8;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }
    
    .input-group input {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .conversion-grid {
        grid-template-columns: 1fr;
    }
}