:root {
    --primary-color: #ffd700;
    --secondary-color: #4a90e2;
    --accent-color: #ffd700;
    --bg-color: #0a0a0a;
    --bg-lighter: #1a1a1a;
    --text-color: #e0e0e0;
    --text-muted: #888;
    --border-color: #2a2a2a;
    --card-bg: #111;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
    --border-radius: 4px;
    --max-width: 1000px;
    --header-height: 500px;
    --content-width: 800px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1em;
    color: #fff;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5em;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    color: #fff;
    text-align: center;
}

h2 {
    font-size: 1.8rem;
    margin: 2.5em 0 1.5em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    text-align: left;
    font-weight: 600;
    color: #fff;
}

h2:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 10px 1px rgba(255, 215, 0, 0.5);
}

h3 {
    font-size: 1.4rem;
    margin: 1.8em 0 0.8em;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.4;
}

p {
    margin-bottom: 1.6em;
    color: var(--text-color);
    font-weight: 400;
    line-height: 1.8;
    font-size: 1.05rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: #ff8a8a;
    text-decoration: underline;
}

/* Header Styles */
header {
    text-align: center;
    padding: 60px 0 40px;
    position: relative;
    max-width: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(10,10,10,1) 0%, rgba(20,20,20,1) 100%);
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.header-logos {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.powered-by {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
}

.powered-by span {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.semianalysis-logo {
    height: 30px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.semianalysis-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

.header-image {
    max-width: 80%;
    height: auto;
    margin: 0 auto;
    display: block;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.3);
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 15px auto 30px;
    font-weight: 400;
    line-height: 1.8;
    padding: 0 20px;
}

/* Main Content */
main {
    padding: 0 0 80px;
    position: relative;
    z-index: 1;
}

section {
    margin-bottom: 80px;
    position: relative;
}

section:last-child {
    margin-bottom: 0;
}

.content-section {
    max-width: var(--content-width);
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
}

.content-section p {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 1.8em;
}

.text-center {
    text-align: center;
}

/* Rating Criteria Grid */
.criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 50px 0;
    position: relative;
    z-index: 1;
}

.criterion {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 28px;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.criterion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 94, 94, 0.1) 0%, rgba(74, 144, 226, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.criterion {
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.criterion:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.2);
    background: rgba(255, 215, 0, 0.03);
}

.criterion:hover::before {
    opacity: 1;
}

.criterion:hover h3 {
    color: var(--primary-color);
}

.criterion h3 {
    color: var(--primary-color);
    margin: 0 0 15px 0;
    font-size: 1.25rem;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
    padding-left: 20px;
}

.criterion h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(255, 215, 0, 0.5);
}

.criterion p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
    font-weight: 400;
}

/* Content Sections */
.content-section {
    max-width: 800px;
    margin: 0 auto 4rem;
}

.content-section h2 {
    text-align: left;
    border: none;
    padding-bottom: 0;
    margin: 4rem 0 2rem;
}

.content-section h2::after {
    left: 0;
    transform: none;
}

/* Image Sections */
.rankings,
.providers,
.medals {
    text-align: center;
    margin: 6rem auto;
    max-width: 1000px;
}

.rankings h2,
.providers h2,
.medals h2 {
    margin-bottom: 3rem;
    text-align: left;
    border: none;
    padding-bottom: 0;
}

.rankings h2::after,
.providers h2::after,
.medals h2::after {
    left: 0;
    transform: none;
}

.ranking-image,
.providers-image,
.medals-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    background: var(--bg-secondary);
    padding: 1rem;
}

.ranking-image:hover,
.providers-image:hover,
.medals-image:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.rankings p,
.providers p,
.medals p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 700px;
    margin: 1.5rem auto 0;
    line-height: 1.8;
}

/* Footer */
footer {
    text-align: center;
    padding: 60px 20px 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 80px;
    background-color: rgba(0, 0, 0, 0.3);
    position: relative;
}

.contact-button-container {
    margin-bottom: 30px;
    text-align: center;
}

.contact-prompt {
    color: var(--text-muted);
    margin-bottom: 15px !important;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.5;
}

.newsletter-blurb {
    max-width: 700px;
    margin: 0 auto 30px;
    padding: 20px;
    background: rgba(26, 26, 26, 0.5);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.newsletter-blurb p {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.7;
}

.newsletter-blurb a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.newsletter-blurb a:hover {
    color: #fff;
    border-bottom-color: var(--primary-color);
    text-decoration: none;
}

.contact-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--primary-color);
    color: #000;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.contact-button:hover {
    background-color: #fff;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    text-decoration: none;
}

.contact-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0.2;
}

footer p {
    max-width: 700px;
    margin: 0 auto 1rem;
    line-height: 1.8;
    font-size: 0.95rem;
}

.disclaimer {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 3rem auto 0;
    font-style: italic;
    max-width: 700px;
    line-height: 1.8;
    padding: 0 20px;
    opacity: 0.7;
    text-align: center;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-0 {
    margin-top: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 0 2rem;
    }
}

@media (max-width: 1024px) {
    .rating-criteria {
        padding: 3rem 0;
    }
    
    .criteria-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rankings,
    .providers,
    .medals {
        margin: 5rem auto;
        padding: 0;
    }
}

/* Modal Styles */
.criteria-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.criteria-modal.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    background-color: var(--bg-lighter);
    margin: 2rem auto;
    padding: 2rem;
    max-width: 800px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    transform: translateY(20px);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.criteria-modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.criteria-modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
    z-index: 10;
}

.close-modal:hover {
    color: var(--primary-color);
}

.modal-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.75rem;
}

.modal-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border-radius: 3px;
}

.criteria-list {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 1rem;
    margin-right: -1rem;
}

.criteria-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.criteria-item:last-child {
    border-bottom: none;
}

.criteria-item:hover {
    padding-left: 0.5rem;
    color: var(--primary-color);
}

/* Custom scrollbar for modal */
.criteria-list::-webkit-scrollbar {
    width: 6px;
}

.criteria-list::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 3px;
}

.criteria-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.criteria-list::-webkit-scrollbar-thumb:hover {
    background: #e6c200;
}

/* Animation for modal items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.criteria-item {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

/* Add delay for each item */
.criteria-item:nth-child(1) { animation-delay: 0.1s; }
.criteria-item:nth-child(2) { animation-delay: 0.15s; }
.criteria-item:nth-child(3) { animation-delay: 0.2s; }
.criteria-item:nth-child(4) { animation-delay: 0.25s; }
.criteria-item:nth-child(5) { animation-delay: 0.3s; }
.criteria-item:nth-child(6) { animation-delay: 0.35s; }
.criteria-item:nth-child(7) { animation-delay: 0.4s; }
.criteria-item:nth-child(8) { animation-delay: 0.45s; }
.criteria-item:nth-child(9) { animation-delay: 0.5s; }
.criteria-item:nth-child(10) { animation-delay: 0.55s; }
.criteria-item:nth-child(n+11) { animation-delay: 0.6s; }

/* Responsive adjustments */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    header {
        padding: 3rem 0 1rem;
        margin-bottom: 3rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
        margin: 2.5rem 0 1.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .header-logos {
        gap: 15px;
    }
    
    .header-image {
        max-width: 90%;
    }
    
    .semianalysis-logo {
        height: 25px;
    }
    
    .criteria-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
        gap: 1.25rem;
    }
    
    .criterion {
        padding: 1.5rem 1.25rem;
    }
    
    .rating-criteria {
        margin: 0 -1.5rem 3rem;
        padding: 2.5rem 1.5rem;
    }
    
    .rankings,
    .providers,
    .medals {
        margin: 4rem auto;
    }
    
    footer {
        margin-top: 4rem;
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: auto;
    }
    
    .header-logos {
        margin-bottom: 20px;
    }
    
    .header-image {
        max-width: 95%;
    }
    
    .powered-by span {
        font-size: 0.75rem;
    }
    
    .semianalysis-logo {
        height: 20px;
    }
    
    .container {
        padding: 0 1.25rem;
    }
    
    header {
        padding: 3rem 0 2.5rem;
    }
    
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.6rem;
        margin: 1.8em 0 1em;
    }
    
    h3 {
        font-size: 1.3rem;
        margin: 1.6em 0 0.8em;
    }
    
    .subtitle {
        font-size: 1.1rem;
        line-height: 1.7;
        margin-bottom: 1.5rem;
    }
    
    .header-image {
        margin-bottom: 1.5rem;
        max-width: 100%;
    }
    
    .criterion {
        padding: 1.25rem 1rem;
    }
    
    .criterion h3 {
        font-size: 1.15rem;
        padding-left: 18px;
    }
    
    .criterion h3::before {
        width: 6px;
        height: 6px;
        top: 7px;
    }
    
    .criterion p {
        font-size: 0.95rem;
    }
    
    footer {
        padding: 2.5rem 1.25rem;
        margin-top: 4rem;
    }
    
    .disclaimer {
        font-size: 0.8rem;
        line-height: 1.7;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

section {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-0 {
    margin-top: 0;
}
