:root {
    --primary-color: #e60000;
    --text-color: #15141A;
    --secondary-text: #5B5B66;
    --background-light: #F0F0F4;
    --header-height: 64px;
}

*, ::before, ::after {
    box-sizing: inherit;
}

html {
    font-size: 14px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
    line-height: 1.15;
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background: white;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-wrapper {
    display: flex;
    width: 100%;
    background-color: #fff;
    border-bottom: 5px solid #dc0018;
    padding: 0 6px 2px 2px;
}

.layout-brand {
    display: flex;
    align-items: center;
    width: 100%;
}

.logo {
    width: 215px;
    padding: 20px 15px;
}

.logo img {
    width: 100%;
    height: auto;
}

.header-title {
    font-family: Roboto, sans-serif;
    font-size: 26.4px;
    color: rgb(117, 117, 117);
    margin: 0;
    padding-left: 20px;
    border-left: 1px solid lightgrey;
    font-weight: 400;
}

main {
    margin-top: var(--header-height);
    padding-top: 32px;
    min-height: calc(100vh - var(--header-height));
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

h1 {
    font-family: Roboto, sans-serif;
    font-size: 2.5rem;
    line-height: 34px;
    font-weight: 400;
    margin: 2.8rem 0 1.68rem 0;
}

h2 {
    font-family: Roboto, sans-serif;
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 500;
    margin-bottom: 1rem;
}

.intro {
    font-size: 1.25em;
    margin-bottom: 3rem;
}

/* API Links (Tool Grid) */
.api-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.api-card {
    position: relative;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 24px;
    max-width: 320px;
    width: 100%;
    height: 100%;
    margin: 0 auto; /* Center cards in their grid cell */
    aspect-ratio: 2/3; /* Playing card ratio */
}

.api-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.card-main-link {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

.api-card h2 {
    margin-top: 1rem;
}

.api-card p {
    color: var(--secondary-text);
    flex-grow: 1;
}

.tool-logo {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.tool-logo img {
    max-width: 100%;
    max-height: 120px;
}

a {
    color: #14516f;
}

/* GitHub Corner */
.github-corner {
    position: absolute;
    top: 0;
    right: 0;
    border: 0;
    z-index: 10;
}

.github-corner svg {
    fill: #151513;
    color: #fff;
    transition: transform 0.3s;
}

.github-corner:hover svg {
    transform: scale(1.1);
}

.github-corner .octo-arm {
    animation: octocat-wave 560ms ease-in-out;
}

@keyframes octocat-wave {
    0%, 100% { transform: rotate(0) }
    20%, 60% { transform: rotate(-25deg) }
    40%, 80% { transform: rotate(10deg) }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .api-card {
        padding: 1.5rem;
    }
    
    .beta-badge {
        font-size: 1rem; /* Still larger than before but responsive */
        padding: 6px 30px;
    }
}

@media only screen and (max-width: 480px) {
    .header-title {
        font-size: 20px;
    }
    
    .logo {
        width: 180px;
        padding: 15px 10px;
    }
}

footer {
    background: var(--background-light);
    padding: 2rem 0;
    margin-top: 4rem;
    width: 100%;
    border-top: 1px solid #d5d5d5;
}

.footer-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-content p {
    margin: 0;
    color: var(--secondary-text);
}

/* Beta Badge - Improved visibility */
.beta-badge {
    position: fixed;
    top: 50px; /* Moved down slightly */
    right: -5px; /* Moved to the left slightly */
    z-index: 10000; /* Increased z-index to ensure it's in the foreground */
    background-color: #dc0018;
    color: white;
    font-size: 1.2rem; /* Larger font size */
    font-weight: 700; /* Bolder text */
    padding: 8px 40px; /* Larger padding */
    text-transform: uppercase;
    box-shadow: -3px 3px 8px rgba(0, 0, 0, 0.3); /* More prominent shadow */
    transform: translateX(20%) translateY(20%) rotate(45deg); /* Adjusted position */
    transform-origin: top right;
    letter-spacing: 1px;
    pointer-events: none; /* Prevents the badge from interfering with clicks */
}

@media (max-width: 500px) {
    .github-corner .octo-arm {
        animation: none;
    }
    .github-corner:hover .octo-arm {
        animation: octocat-wave 560ms ease-in-out;
    }
}
