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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #241B40;
    background: #F6F4FC;
    line-height: 1.6;
}


nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(90deg, #3B1278, #1E3A8A);
    box-shadow: 0 8px 20px rgba(60, 30, 130, 0.15);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    gap: 2.5rem;
    padding: 1.4rem 3rem;
}

nav a {
    color: #FFFFFF;
    text-decoration: none;
    font-family: "Segoe UI", "Trebuchet MS", Verdana, sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
    padding: 0.4rem 0.2rem;
    border-bottom: 2px solid transparent;
    transition: border-color 0.25s ease, color 0.25s ease;
}

nav a:hover {
    border-bottom-color: #7f68c4;
    color: #7f68c4;
}


main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

section {
    margin-bottom: 4rem;
}


h1 {
    font-family: "Segoe UI", "Trebuchet MS", Verdana, sans-serif;
    font-size: 2.6rem;
    font-weight: 800;
    color: #3B1278;
    margin-bottom: 1.2rem;
    border-left: 6px solid #2563EB;
    padding-left: 0.8rem;
}

h2 {
    font-family: "Segoe UI", "Trebuchet MS", Verdana, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1E3A8A;
    margin: 2rem 0 1rem;
    position: relative;
    padding-bottom: 0.4rem;
}

h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, #6D28D9, #2563EB);
}

h3 {
    font-family: "Segoe UI", "Trebuchet MS", Verdana, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #6D28D9;
    margin: 1.8rem 0 0.8rem;
}

h4 {
    font-family: "Segoe UI", "Trebuchet MS", Verdana, sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.intro-text {
    background: #FFFFFF;
    border-left: 4px solid #7f68c4;
    padding: 1rem 1.3rem;
    border-radius: 0 10px 10px 0;
    color: #5B5470;
    box-shadow: 0 8px 20px rgba(60, 30, 130, 0.15);
}


.table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(60, 30, 130, 0.15);
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #FFFFFF;
    font-size: 0.92rem;
}

thead {
    background: linear-gradient(90deg, #6D28D9, #2563EB);
}

thead th {
    color: #FFFFFF;
    font-family: "Segoe UI", "Trebuchet MS", Verdana, sans-serif;
    font-weight: 600;
    text-align: left;
    padding: 0.9rem 1rem;
}

tbody tr {
    border-bottom: 1px solid #ECE8F8;
    transition: background 0.2s ease;
}

tbody tr:nth-child(even) {
    background: #F8F6FE;
}

tbody tr:hover {
    background: #EDE6FB;
}

td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

code {
    font-family: "Courier New", Courier, monospace;
    background: #F0EBFC;
    color: #3B1278;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    font-size: 0.88rem;
}


.badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.badge-no {
    background: #E7E3F4;
    color: #5B5470;
}

.badge-video {
    background: #2563EB;
    color: #FFFFFF;
}


main > section > pre,
h2 + pre {
    background: #2A1B52;
    color: #E4DBFF;
    font-family: "Courier New", Courier, monospace;
    padding: 1.2rem;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 8px 20px rgba(60, 30, 130, 0.15);
}

pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}


.selectors-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-top: 1.2rem;
}

.css-methods,
.extra-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.4rem;
    margin-top: 1.2rem;
}

.selector-card,
.method-card,
.extra-card {
    border-radius: 14px;
    padding: 1.8rem;
    color: #FFFFFF;
    box-shadow: 0 8px 20px rgba(60, 30, 130, 0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.selector-card,
.method-card {
    min-height: 230px;
}

.selector-card:hover,
.method-card:hover,
.extra-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 26px rgba(238, 237, 240, 0.988);
}


.selector-card {
    background: #7f68c4;
    color: #fafafa;
}

.method-card {
    background: #6D28D9;
}


.extra-card:nth-child(odd) {
    background: #6D28D9;
}

.extra-card:nth-child(even) {
    background: #2563EB;
}

.method-card h4,
.extra-card h4 {
    color: #FFFFFF;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.5rem;
}

.selector-card h4 {
    color: #FFFFFF;
    padding-bottom: 0.5rem;
}


.selector-card pre {
    background: transparent;
    color: #3B1278;
    font-family: "Courier New", Courier, monospace;
    padding: 0;
    overflow-x: auto;
    margin-top: 0.3rem;
    font-size: 0.85rem;
    box-shadow: none;
}

.method-card pre {
    background: #3B1278;
    color: #FFFFFF;
    font-family: "Courier New", Courier, monospace;
    padding: 0.9rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.extra-card pre {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    font-family: "Courier New", Courier, monospace;
    padding: 0.9rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.selector-card pre code {
    background: transparent;
    color: #ffffff;
}

.method-card pre code,
.extra-card pre code {
    background: transparent;
    color: #FFFFFF;
}

.extra-card p {
    color: rgba(255, 255, 255, 0.85) !important;
    margin-top: 0.6rem;
}

footer {
    background: linear-gradient(90deg, #3B1278, #1E3A8A);
    color: #FFFFFF;
    text-align: center;
    padding: 1.5rem;
    font-family: "Segoe UI", "Trebuchet MS", Verdana, sans-serif;
    font-weight: 500;
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    nav ul {
        gap: 1.2rem;
        flex-wrap: wrap;
    }

    .selectors-grid,
    .css-methods,
    .extra-section {
        grid-template-columns: 1fr;
    }
}
