[v-cloak] {
    display: none !important;
}

* {
    box-sizing: border-box;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.v3-menu-card,
.v3-submenu-card {
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

body {
    margin: 0;
    padding: 0;
    background: #AED5C2 url("../../images/bg_main.jpg") repeat-x;
}

#app {
    font-family: Microsoft JhengHei, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.v3-header {
    padding: 0 20px;
    height: 100px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1000;
}

.v3-header-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.v3-header-left {
    display: flex;
    align-items: center;
}

.v3-logo {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
    cursor: pointer;
}

.v3-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.v3-loading-text {
    color: #666;
    font-size: 14px;
}

.v3-username {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin-right: 16px;
}

.v3-btn {
    font-weight: bolder;
    padding: 8px 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    outline: none;
    position: relative;
}

.v3-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.v3-btn:active::before {
    width: 300px;
    height: 300px;
}

.v3-btn-danger {
    background-color: #dc3545;
    color: white;
}

.v3-btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.v3-btn-primary {
    background-color: #007bff;
    color: white;
}

.v3-btn-primary:hover {
    background-color: #0069d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.v3-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.v3-btn-secondary:hover {
    background-color: #5a6268;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.v3-breadcrumb {
    background: #AFD6C2;
    height: 40px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 999;
}

.v3-breadcrumb-btn {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.v3-breadcrumb-btn:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.v3-icon {
    display: none;
}

.v3-breadcrumb-separator {
    margin: 0 10px;
    color: #6b7280;
    font-weight: 300;
}

.v3-breadcrumb-current {
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.v3-main {
    flex: 1;
    width: 100%;
    padding: 20px;
    margin-top: 0;
}

.v3-menu-container {
    display: grid;
    grid-template-columns: repeat(4, 200px);
    gap: 50px;
    justify-content: center;
    animation: fadeIn 0.8s ease-out;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 350px;
    position: relative;
}

.v3-menu-item-wrapper {
    position: relative;
    z-index: 1;
}

.v3-menu-item-wrapper:hover {
    z-index: 1000;
}

.v3-menu-card {
    cursor: pointer;
    width: 200px;
    color: #FFFFFF;
    align-items: center;
    justify-content: center;
    height: 120px;
    font-size: 24px;
    position: relative;
    display: flex;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
}

.v3-menu-card.v3-white-bg {
    background: #f8f9fa !important;
    border: 2px solid #46b5fe;
    box-shadow: 0 4px 6px rgba(70, 181, 254, 0.2);
}

.v3-menu-card.v3-white-bg .v3-menu-title {
    color: #2c3e50 !important;
    font-weight: 600;
}

.v3-menu-card.v3-white-bg:hover {
    background: #e9ecef !important;
    border-color: #2196F3;
    box-shadow: 0 12px 24px rgba(33, 150, 243, 0.3);
}

.v3-menu-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    z-index: -1;
    pointer-events: none;
}

.v3-menu-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    z-index: 1001;
}

.v3-menu-card:hover::after {
    top: -25%;
    right: -25%;
}

.v3-menu-title {
    color: white;
    font-size: 24px;
    margin: 0;
    font-weight: normal;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.v3-menu-dropdown {
    position: absolute;
    top: 130px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 16px;
    min-width: 260px;
    max-width: 320px;
}

.v3-menu-card:hover .v3-menu-dropdown {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.v3-menu-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid white;
}

.v3-groups-preview {
    /* 移除高度限制和卷軸，讓內容完全顯示 */
}


.v3-preview-section {
    margin-bottom: 16px;
}

.v3-preview-section:first-child {
    margin-top: 0;
}

.v3-preview-section:last-child {
    margin-bottom: 0;
}

.v3-preview-header {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
}

.v3-preview-icon {
    width: 4px;
    height: 4px;
    background: #46b5fe;
    border-radius: 50%;
    margin-right: 8px;
}

.v3-preview-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.v3-preview-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f8ff;
    color: #4a5568;
    font-size: 12px;
    border-radius: 10px;
    border: 1px solid #e0e7ff;
    transition: all 0.2s ease;
}

.v3-preview-tag:hover {
    background: #e0f2ff;
    border-color: #46b5fe;
    color: #2196F3;
    transform: scale(1.05);
}

.v3-menu-item-wrapper:nth-child(4n-1) .v3-menu-dropdown,
.v3-menu-item-wrapper:nth-child(4n) .v3-menu-dropdown {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(-10px);
}

.v3-menu-item-wrapper:nth-child(4n-1) .v3-menu-card:hover .v3-menu-dropdown,
.v3-menu-item-wrapper:nth-child(4n) .v3-menu-card:hover .v3-menu-dropdown {
    transform: translateX(0) translateY(0);
}

.v3-menu-item-wrapper:nth-child(4n-1) .v3-menu-dropdown::before,
.v3-menu-item-wrapper:nth-child(4n) .v3-menu-dropdown::before {
    left: auto;
    right: 50px;
    transform: none;
}

.v3-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

.v3-modal-container {
    background: white;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    max-height: 800px;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.v3-modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.v3-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.v3-close-modal {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v3-close-modal:hover {
    background: #e9ecef;
    color: #495057;
    transform: rotate(90deg);
}

.v3-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background: #f8f9fa;
}

.v3-modal-content {
    display: flex;
    gap: 32px;
    height: 100%;
}

.v3-groups-panel {
    width: 280px;
    flex-shrink: 0;
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

.v3-groups-panel-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
}

.v3-group-section {
    margin-bottom: 24px;
}

.v3-group-section:last-child {
    margin-bottom: 0;
}

.v3-group-header {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
}

.v3-group-icon {
    width: 6px;
    height: 6px;
    background: #46b5fe;
    border-radius: 50%;
    margin-right: 10px;
}

.v3-group-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.v3-group-tag {
    display: inline-block;
    padding: 6px 12px;
    background: #f0f8ff;
    color: #4a5568;
    font-size: 13px;
    border-radius: 12px;
    border: 1px solid #e0e7ff;
    transition: all 0.2s ease;
}

.v3-group-tag:hover {
    background: #e0f2ff;
    border-color: #46b5fe;
    color: #2196F3;
    transform: scale(1.05);
}

.v3-functions-panel {
    flex: 1;
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

.v3-functions-panel-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
}

.v3-functions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.v3-function-card {
    cursor: pointer;
    border-radius: 12px;
    height: 100px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg-color, #888888);
}

.v3-function-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.v3-function-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: relative;
}

.v3-function-icon::before {
    content: '';
    position: absolute;
    inset: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.v3-function-title {
    color: white;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    padding: 0 12px;
}

.v3-function-card.v3-white-bg {
    background: #f0f4f8 !important;
    border: 2px solid #46b5fe !important;
    box-shadow: 0 2px 8px rgba(70, 181, 254, 0.2);
}

.v3-function-card.v3-white-bg .v3-function-title {
    color: #2c3e50 !important;
    font-weight: 600;
}

.v3-function-card.v3-white-bg .v3-function-icon {
    background: rgba(70, 181, 254, 0.3) !important;
}

.v3-function-card.v3-white-bg .v3-function-icon::before {
    background: #46b5fe !important;
}

.v3-function-card.v3-white-bg:hover {
    background: #e1e8ef !important;
    border-color: #2196F3 !important;
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.25);
}

.v3-function-card[style*="background-color: rgb(255, 255, 255)"],
.v3-function-card[style*="backgroundColor: rgb(255, 255, 255)"],
.v3-function-card[style*="background-color:#FFFFFF"],
.v3-function-card[style*="backgroundColor:#FFFFFF"],
.v3-function-card[style*="background-color:#ffffff"],
.v3-function-card[style*="backgroundColor:#ffffff"],
.v3-function-card[style*="background-color: #FFFFFF"],
.v3-function-card[style*="backgroundColor: #FFFFFF"],
.v3-function-card[style*="background-color: #ffffff"],
.v3-function-card[style*="backgroundColor: #ffffff"],
.v3-function-card[style*="background-color: white"],
.v3-function-card[style*="backgroundColor: white"] {
    background: #f0f4f8 !important;
    border: 2px solid #46b5fe !important;
}

.v3-function-card[style*="background-color: rgb(255, 255, 255)"] .v3-function-title,
.v3-function-card[style*="backgroundColor: rgb(255, 255, 255)"] .v3-function-title,
.v3-function-card[style*="background-color:#FFFFFF"] .v3-function-title,
.v3-function-card[style*="backgroundColor:#FFFFFF"] .v3-function-title,
.v3-function-card[style*="background-color:#ffffff"] .v3-function-title,
.v3-function-card[style*="backgroundColor:#ffffff"] .v3-function-title,
.v3-function-card[style*="background-color: #FFFFFF"] .v3-function-title,
.v3-function-card[style*="backgroundColor: #FFFFFF"] .v3-function-title,
.v3-function-card[style*="background-color: #ffffff"] .v3-function-title,
.v3-function-card[style*="backgroundColor: #ffffff"] .v3-function-title,
.v3-function-card[style*="background-color: white"] .v3-function-title,
.v3-function-card[style*="backgroundColor: white"] .v3-function-title {
    color: #2c3e50 !important;
    font-weight: 600;
}

.v3-function-card {
    animation: cardSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.v3-function-card:nth-child(1) { animation-delay: 0.05s; }
.v3-function-card:nth-child(2) { animation-delay: 0.1s; }
.v3-function-card:nth-child(3) { animation-delay: 0.15s; }
.v3-function-card:nth-child(4) { animation-delay: 0.2s; }
.v3-function-card:nth-child(5) { animation-delay: 0.25s; }
.v3-function-card:nth-child(6) { animation-delay: 0.3s; }
.v3-function-card:nth-child(7) { animation-delay: 0.35s; }
.v3-function-card:nth-child(8) { animation-delay: 0.4s; }

.v3-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    animation: fadeIn 0.2s ease-out;
}

.v3-dialog {
    background-color: white;
    border-radius: 24px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: bounceIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: scale(1);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.v3-dialog-header {
    padding: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 24px 24px 0 0;
}

.v3-dialog-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.5px;
}

.v3-dialog-body {
    padding: 24px;
}

.v3-dialog-body p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
    font-size: 15px;
}

.v3-dialog-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 0 0 24px 24px;
}

@media (max-width: 1000px) {
    .v3-menu-container {
        grid-template-columns: repeat(3, 200px);
    }
}

@media (max-width: 768px) {
    .v3-menu-container {
        grid-template-columns: repeat(2, 200px);
        gap: 30px;
    }
    
    .v3-modal-content {
        flex-direction: column;
    }
    
    .v3-groups-panel {
        width: 100%;
        max-height: 200px;
    }
    
    .v3-functions-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 480px) {
    .v3-menu-container {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    
    .v3-header {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .v3-main {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .v3-modal-container {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}

.v3-loading-text {
    position: relative;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.v3-loading-text::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(70, 181, 254, 0.2);
    border-top: 2px solid #46b5fe;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}


@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.v3-menu-card:nth-child(1) { animation-delay: 0.1s; }
.v3-menu-card:nth-child(2) { animation-delay: 0.15s; }
.v3-menu-card:nth-child(3) { animation-delay: 0.2s; }
.v3-menu-card:nth-child(4) { animation-delay: 0.25s; }
.v3-menu-card:nth-child(5) { animation-delay: 0.3s; }
.v3-menu-card:nth-child(6) { animation-delay: 0.35s; }
.v3-menu-card:nth-child(7) { animation-delay: 0.4s; }
.v3-menu-card:nth-child(8) { animation-delay: 0.45s; }

html {
    scroll-behavior: smooth;
}