html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#footer {
    margin-top: auto;
    background: #1a1a1a;
    color: #ffffff;
    position: relative;
    overflow: visible;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.f-group {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 40px 40px;
    position: relative;
    z-index: 1;
    min-height: auto;
    overflow: visible;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    padding-right: 200px; /* time-popup 공간 확보 */
}

.footer-info {
    width: 100%;
    text-align: left;
}

.footer-version {
    text-align: left;
    width: 100%;
}

.footer-website,
.footer-copy,
.footer-version p {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.6;
    font-size: 15px;
}

.footer-copy {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 12px;
    margin-bottom: 0;
}

.label {
    display: inline-block;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.6);
    margin-right: 10px;
    font-weight: 500;
}

.version-number {
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.12);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.9em;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.link-hover-effect {
    color: #ffffff;
    text-decoration: none;
    position: relative;
    padding: 4px 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    border-radius: 4px;
}

.link-hover-effect::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(52, 152, 219, 0.25);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: 4px;
}

.link-hover-effect:hover {
    color: #7ec8ff;
    transform: translateY(-1px);
}

.link-hover-effect:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.link-hover-effect:active {
    transform: translateY(0);
}

/* 다크 모드 지원 */
body.dark-mode #footer {
    background: #0f0f0f;
    border-top-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .footer-website,
body.dark-mode .footer-copy,
body.dark-mode .footer-version p {
    color: rgba(255, 255, 255, 0.85);
}

body.dark-mode .footer-copy {
    color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .label {
    color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .version-number {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .link-hover-effect::before {
    background: rgba(52, 152, 219, 0.2);
}

/* 태블릿 크기 (768px ~ 1024px) */
@media screen and (max-width: 1024px) {
    .f-group {
        padding: 28px 30px 35px;
    }

    .footer-content {
        gap: 16px;
        padding-right: 150px; /* time-popup 공간 확보 */
    }

    .footer-website,
    .footer-copy,
    .footer-version p {
        margin: 6px 0;
    }

    .footer-copy {
        margin-top: 10px;
    }
}

/* 모바일 크기 (768px 이하) */
@media screen and (max-width: 768px) {
    .f-group {
        padding: 30px 24px 40px;
        padding-top: 20px;
        padding-bottom: 35px;
    }

    .footer-content {
        flex-direction: column;
        text-align: left;
        gap: 20px;
        align-items: flex-start;
        padding-right: 0; /* 모바일에서는 time-popup이 숨겨지므로 패딩 제거 */
    }

    .footer-version {
        text-align: left;
        width: 100%;
        margin-top: 4px;
    }

    .footer-info {
        width: 100%;
        text-align: left;
    }

    .footer-website,
    .footer-copy,
    .footer-version p {
        font-size: 14px;
        margin: 8px 0;
        line-height: 1.6;
    }

    .footer-copy {
        font-size: 13px;
        margin-top: 12px;
        margin-bottom: 0;
    }

    .label {
        font-size: 0.75em;
        margin-right: 8px;
    }

    .version-number {
        font-size: 0.85em;
        padding: 3px 8px;
    }

    .link-hover-effect {
        padding: 6px 8px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* 작은 모바일 (480px 이하) */
@media screen and (max-width: 480px) {
    .f-group {
        padding: 25px 20px 32px;
        padding-top: 18px;
        padding-bottom: 30px;
    }

    .footer-content {
        flex-direction: column;
        gap: 18px;
        align-items: flex-start;
        padding-right: 0; /* 모바일에서는 time-popup이 숨겨지므로 패딩 제거 */
    }

    .footer-info {
        min-width: 100%;
    }

    .footer-version {
        margin-top: 4px;
    }

    .footer-website,
    .footer-copy,
    .footer-version p {
        font-size: 13px;
        margin: 7px 0;
        line-height: 1.6;
    }

    .footer-copy {
        font-size: 12px;
        margin-top: 10px;
        margin-bottom: 0;
    }

    .label {
        display: block;
        margin-bottom: 6px;
        margin-right: 0;
        font-size: 0.7em;
    }

    .version-number {
        font-size: 0.8em;
        padding: 3px 6px;
    }

    .link-hover-effect {
        padding: 8px 10px;
        min-height: 44px;
    }
}