:root {
    --primary-color: #2c3e50;
    --accent-color: #e74c3c;
    --background-color: #f8f9fa;
    --text-color: #2c3e50;
    --link-color: #3498db;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    text-align: center;
    background-color: var(--background-color);
    padding: 20px;
    line-height: 1.6;
    color: var(--text-color);
}

h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.site-title {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

p, a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    width: 100%;
    max-width: 300px;
    margin: 40px auto;
}

.link-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.link-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: white;
    color: var(--text-color);
    padding: 15px 25px;
    text-align: left;
    text-decoration: none;
    font-size: 16px;
    width: 80%;
    max-width: 600px;
    height: 80px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    transform: translateY(0);
    gap: 20px;
}

.link-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.link-box .thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.link-box .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-box .content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.link-box span {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.link-box small {
    color: #666;
    margin-top: 4px;
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
}

.project-section {
    text-align: left;
    max-width: 800px;
    margin: 40px auto;
    width: 100%;
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.project-thumbnail {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    flex-grow: 1;
}

.project-title {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: 600;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.product-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    aspect-ratio: 1;
    width: 100%;
}

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

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.topoco-link-container {
    display: inline-flex;
    gap: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 15px 25px;
    background-color: white;
    font-weight: 500;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    margin-top: 20px;
    margin-bottom: 10px;
}

.topoco-link-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.topoco-link-container a {
    color: var(--primary-color);
    transition: var(--transition);
}

.topoco-link-container:hover a {
    color: var(--accent-color);
}

@media (max-width: 800px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

.content-with-image {
    display: flex;
    gap: 30px;
    align-items: center;
    margin: 60px 0;
}

.content-with-image .text-content {
    flex: 1;
}

.content-with-image .side-image {
    width: 300px;
    flex-shrink: 0;
}

.content-with-image .side-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    display: block;
}

.content-with-image.image-left {
    flex-direction: row-reverse;
}

.fade-bottom {
    position: relative;
    max-height: 400px;
    overflow: hidden;
}

.fade-bottom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
}

.fade-bottom img {
    width: 100%;
    display: block;
}

.article-content {
    text-align: left;
    max-width: 800px;
    margin: 40px auto;
    width: 100%;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--box-shadow);
}

.article-content h2 {
    color: var(--primary-color);
    margin-top: 80px;
    margin-bottom: 25px;
    font-size: 1.6rem;
}

.article-content .content-with-image h2 {
    margin-top: 0;
}

.article-content h3 {
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.article-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.article-content ul {
    margin-bottom: 15px;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.screenshot {
    width: 80%;
    max-width: 80%;
    border-radius: 12px;
    margin: 30px auto;
    box-shadow: var(--box-shadow);
    display: block;
}

.hero-container {
    width: 100%;
    min-height: 400px;
    max-height: 400px;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-container::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.6);
    z-index: 1;
}

.hero-container img {
    width: 75%;
    max-width: 75%;
    height: auto;
    max-height: 400px;
    position: relative;
    z-index: 2;
    object-fit: contain;
    object-position: top center;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--link-color);
    text-align: left;
}

.back-link:hover {
    color: var(--accent-color);
}

.disclaimer {
    background-color: #f5f5f5;
    border-left: 3px solid #999;
    padding: 12px 20px;
    margin: 20px 0 30px 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    border-radius: 4px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--link-color);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    margin-top: 15px;
}

.btn:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.content-with-image .side-image {
    position: relative;
}

.content-with-image .side-image a {
    display: block;
    cursor: pointer;
}

.content-with-image .side-image a img {
    transition: var(--transition);
}

.content-with-image .side-image a:hover img {
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    .link-box {
        width: 90%;
        padding: 12px 20px;
        height: 70px;
    }

    .link-box .thumbnail {
        width: 50px;
        height: 50px;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-thumbnail {
        width: 80px;
        height: 80px;
    }

    .project-section {
        padding: 20px 15px;
        margin: 20px auto;
        width: 100%;
        box-sizing: border-box;
    }

    .product-grid {
        gap: 15px;
        margin: 20px 0;
    }

    .content-with-image {
        flex-direction: column;
    }

    .content-with-image .side-image {
        width: 100%;
    }

    .content-with-image.image-left {
        flex-direction: column;
    }

    .article-content {
        padding: 25px 20px;
        margin: 20px auto;
        width: calc(100% - 30px);
        box-sizing: border-box;
    }

    .article-content h2 {
        font-size: 1.4rem;
        margin-top: 50px;
        margin-bottom: 20px;
    }

    .article-content h3 {
        font-size: 1.2rem;
        margin-top: 30px;
        margin-bottom: 12px;
    }

    .screenshot {
        width: 100%;
        max-width: 100%;
        margin: 20px auto;
    }

    .hero-container {
        min-height: 250px;
        max-height: 250px;
        margin: 20px 0;
    }

    .hero-container img {
        width: 90%;
        max-width: 90%;
        max-height: 250px;
    }

    .fade-bottom {
        max-height: 300px;
    }

    .fade-bottom::after {
        height: 80px;
    }
}
