:root {
    --primary-color: #4361ee;
    --secondary-color: #ff6b6b;
    --accent-color: #48cae4;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --success-color: #06d6a0;
    --warning-color: #ffd166;
    --text-color: #333;
    --heading-color: #1a1a2e;
    --border-color: #e9ecef;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-color);
}

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

header {
    background: linear-gradient(135deg, var(--primary-color), #3a0ca3);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    text-decoration: none;
    color: white;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

main {
    padding: 3rem 0;
}

section {
    margin-bottom: 4rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--heading-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

p,
ul,
ol {
    margin-bottom: 1.5rem;
}

ul,
ol {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #3a0ca3;
}

.hero {
    text-align: center;
    padding: 4rem 0;
    background-color: rgba(67, 97, 238, 0.05);
    border-radius: 8px;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-icon {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.color-swatch {
    border-radius: 8px;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.code-block {
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-family: monospace;
    overflow-x: auto;
    border-radius: 4px;
}

.tip {
    background-color: rgba(6, 214, 160, 0.1);
    border-left: 4px solid var(--success-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.warning {
    background-color: rgba(255, 209, 102, 0.1);
    border-left: 4px solid var(--warning-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.font-example {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.font-pair {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.font-heading {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.font-body {
    font-size: 1rem;
}

footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.back-home {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.back-home:hover {
    background-color: #3a0ca3;
    color: white;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: #3a0ca3;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #ff5252;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tool-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
}

.tool-card-content {
    padding: 1.5rem;
}

.tool-card h4 {
    margin-bottom: 0.5rem;
}

.tool-card p {
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    header {
        padding: 1.5rem 0;
    }

    .header-container {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .grid,
    .color-grid,
    .tool-grid {
        grid-template-columns: 1fr;
    }
}