* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    background-image: url('./ik7.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.auth-buttons-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 90vw;
    max-width: 340px;
    padding: 10px;
    margin: 0 auto;
    animation: slideUp 0.5s ease-out;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    text-align: center;
    min-height: 52px;
    width: 100%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

.btn-type1 { background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); }
.btn-type2 { background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); }
.btn-type3 { background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%); }
.btn-type4 { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); }
.btn-type5 { background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%); }
.btn-type6 { background: linear-gradient(135deg, #e67e22 0%, #d35400 100%); }
.btn-type7 { background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%); }
.btn-type8 { background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%); }
.btn-type11 { background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%); }
.btn-type12 { background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); }
.btn-type14 { background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%); }

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    filter: brightness(110%);
}

.auth-btn:active {
    transform: translateY(0);
}

.button-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
    line-height: 1;
}

.button-text {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 1.2;
    font-weight: 500;
}

/* ===== PC Layout (>=769px) ===== */
@media (min-width: 769px) {
    body {
        padding: 40px 20px;
    }

    .auth-buttons-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        width: 90%;
        max-width: 560px;
        padding: 0;
    }

    .auth-btn {
        flex: 0 0 calc(50% - 6px);
        max-width: calc(50% - 6px);
        padding: 16px 18px;
        font-size: 15px;
        min-height: 54px;
        border-radius: 10px;
        gap: 10px;
    }

    .auth-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    }
}

/* ===== Large PC (>=1200px) ===== */
@media (min-width: 1200px) {
    .auth-buttons-container {
        max-width: 700px;
        gap: 14px;
    }

    .auth-btn {
        padding: 18px 20px;
        font-size: 16px;
        min-height: 58px;
        border-radius: 12px;
    }

    .button-icon {
        font-size: 20px;
        width: 24px;
    }

    .button-text {
        font-size: 16px;
    }
}

/* ===== Mobile (<=768px) ===== */
@media (max-width: 768px) {
    body {
        padding: env(safe-area-inset-top) env(safe-area-inset-right)
                 env(safe-area-inset-bottom) env(safe-area-inset-left);
        align-items: center;
        justify-content: center;
    }

    .auth-buttons-container {
        width: 92vw;
        max-width: 320px;
        padding: 12px 8px;
        gap: 10px;
        margin-top: -20px;
    }

    .auth-btn {
        padding: 16px 12px;
        font-size: 17px;
        min-height: 56px;
        border-radius: 10px;
        gap: 12px;
    }

    .button-icon {
        font-size: 20px;
        width: 24px;
    }

    .button-text {
        font-size: 17px;
        font-weight: 600;
    }
}

@media (max-width: 480px) and (max-height: 800px) {
    .auth-buttons-container {
        width: 94vw;
        max-width: 300px;
        padding: 10px 6px;
        gap: 8px;
    }

    .auth-btn {
        padding: 14px 10px;
        font-size: 16px;
        min-height: 50px;
        border-radius: 8px;
        gap: 10px;
    }

    .button-icon {
        font-size: 18px;
        width: 22px;
    }

    .button-text {
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .auth-buttons-container {
        width: 96vw;
        max-width: 280px;
        padding: 8px 4px;
        gap: 6px;
    }

    .auth-btn {
        padding: 12px 8px;
        font-size: 15px;
        min-height: 46px;
        border-radius: 7px;
        gap: 8px;
    }

    .button-icon {
        font-size: 16px;
        width: 20px;
    }

    .button-text {
        font-size: 15px;
    }
}

/* ===== Mobile Landscape ===== */
@media (orientation: landscape) and (max-height: 500px) {
    body {
        align-items: center;
        justify-content: center;
        padding: 5px;
    }

    .auth-buttons-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 90vw;
        gap: 8px;
        padding: 8px;
    }

    .auth-btn {
        flex: 0 0 calc(50% - 4px);
        max-width: calc(50% - 4px);
        min-height: 44px;
        padding: 10px 8px;
        font-size: 14px;
        gap: 6px;
    }

    .button-icon {
        font-size: 15px;
        width: 18px;
    }

    .button-text {
        font-size: 14px;
    }
}

/* ===== Safe Area ===== */
@supports (padding: max(0px)) {
    body {
        padding-top: max(0px, env(safe-area-inset-top));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .auth-btn {
        transition: none;
    }

    .auth-btn:hover {
        transform: none;
    }

    .auth-buttons-container {
        animation: none;
    }
}

/* ===== Touch Devices ===== */
@media (hover: none) and (pointer: coarse) {
    .auth-btn:hover {
        transform: none;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    }

    .auth-btn:active {
        transform: scale(0.97);
        opacity: 0.9;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
