/* ===== CSS Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== CSS Variables ===== */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --black: #000000;
    
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* ===== Base Styles ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--dark-color);
    background-image: url('assets/bg-mb.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */
.header {
    padding: var(--spacing-md) var(--spacing-sm);
    text-align: center;
}

.title-text {
    max-width: 100%;
    height: auto;
    max-height: 80px;
}

/* ===== Main Content ===== */
.main {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-sm);
    padding-bottom: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
}

/* ===== Links Grid ===== */
.links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    width: 100%;
    max-width: 500px;
}

/* ===== PC Links Grid ===== */
.links-grid-pc {
    display: none;
}

/* ===== Mobile Links Grid ===== */
.links-grid-mobile {
    display: grid;
}

.link-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xs);
}

.link-item:nth-child(4),
.link-item:nth-child(5),
.link-item:nth-child(6) {
    margin-top: var(--spacing-md);
}

/* ===== Circle Container ===== */
.circle-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 105px;
    height: 105px;
    border-radius: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(230, 230, 230, 1));
    border: 1px solid #fff;
    overflow: hidden;
    z-index: 10;
}

.circle-image {
    position: absolute;
    width: 93%;
    height: 93%;
    object-fit: contain;
    transition: var(--transition);
    z-index: 10;
}

.circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #4099ff;
    font-weight: 700;
    font-size: 1.3rem;
    z-index: 11;
}

/* ===== Button Container ===== */
.btn-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-container a {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.circle-link {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.btn-image {
    width: 100%;
    max-width: 140px;
    height: auto;
    transition: var(--transition);
    cursor: pointer;
}

.btn-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-weight: bold;
    font-size: 0.8rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ===== Logo Section ===== */
.logo-section {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    height: 80px;
    padding: 0 var(--spacing-md);
    z-index: 50;
}

.juve-logo {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===== Desktop Responsive ===== */
@media (min-width: 769px) {
    body {
        background-image: url('assets/bg-pc.webp');
        background-size: cover;
    }
    
    .header {
        padding: 20px var(--spacing-md);
        margin-bottom: 20px;
        /* margin-top: 50px; */
    }
    
    .title-text {
        max-height: 80px;
    }
    
    .main {
        padding: 0 var(--spacing-md);
        gap: 40px;
        justify-content: flex-start;
        align-items: center;
    }
    
    /* Show PC links, hide mobile links */
    .links-grid-pc {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        max-width: 1200px;
        gap: 20px;
        align-items: start;
        margin-bottom: 20px;
        margin-top: 20px;
    }
    
    .links-grid-mobile {
        display: none;
    }

    .link-item {
        gap: 20px;
    }

    .link-item:nth-child(4),
    .link-item:nth-child(5),
    .link-item:nth-child(6) {
        margin-top: 0;
    }
    
    .circle-container {
        width: 130px;
        height: 130px;
    }
    
    .circle-text {
        font-size: 1.6rem;
    }

    .btn-image {
        max-width: 160px;
    }
    
    .btn-text {
        font-size: 1rem;
    }
    
    .logo-section {
        position: relative;
        bottom: auto;
        height: 80px;
        padding: 0 var(--spacing-lg);
        margin-bottom: 20px;
    }
    
    .main {
        padding-bottom: var(--spacing-md);
    }
}

/* ===== Mobile Responsive ===== */
@media (max-width: 480px) {
    .header {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .title-text {
        max-height: 60px;
    }
    
    .main {
        padding: var(--spacing-sm);
        gap: var(--spacing-sm);
    }
    
    .links-grid {
        gap: var(--spacing-xs);
        max-width: 400px;
    }
    
    .circle-container {
        width: 100px;
        height: 100px;
    }
    
    .link-item:nth-child(4),
    .link-item:nth-child(5),
    .link-item:nth-child(6) {
        margin-top: var(--spacing-sm);
    }
    
    .btn-image {
        max-width: 120px;
    }
    
    .logo-section {
        height: 70px;
    }
}

@media (max-width: 360px) {
    .links-grid {
        max-width: 350px;
    }
    
    .link-item:nth-child(4),
    .link-item:nth-child(5),
    .link-item:nth-child(6) {
        margin-top: var(--spacing-sm);
    }
    
    .circle-container {
        width: 90px;
        height: 90px;
    }
    
    .btn-image {
        max-width: 110px;
    }
    
    .title-text {
        max-height: 50px;
    }
    
    .logo-section {
        height: 60px;
    }
}