@font-face {
    font-family: 'Saira';
    src: url('/assets/fonts/Saira_Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
:root {
    --font: 'Saira', 'Noto Sans SC', sans-serif;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    width: 100%;
    background: #0a0a0a;
    font-family: var(--font), "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse at 30% 30%, #1a1a2e, #080808 75%);
    animation: bgPulse 12s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { opacity: 0.7; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.02); }
}

.bg::after {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 50%;
    height: 70%;
    background: radial-gradient(ellipse, rgba(120, 180, 255, 0.06), transparent 70%);
    pointer-events: none;
    animation: glowDrift 18s ease-in-out infinite alternate;
}

@keyframes glowDrift {
    0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    50% { transform: translate(-30px, 20px) scale(1.2); opacity: 1; }
    100% { transform: translate(20px, -10px) scale(0.9); opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
    .bg, .bg::after, .header h1, .header .tag, .header .sub, .divider, .tool-card, .footer, .footer .sep {
        animation: none !important;
    }
    .tool-card {
        transition: none !important;
    }
}

.container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 8vw;
    min-height: 100vh;
    animation: containerIn 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes containerIn {
    0% { opacity: 0; transform: translateY(24px); }
    100% { opacity: 1; transform: translateY(0); }
}

.header {
    margin-bottom: 4vh;
    animation: headerIn 1s ease 0.2s both;
}

@keyframes headerIn {
    0% { opacity: 0; transform: translateX(-30px); }
    100% { opacity: 1; transform: translateX(0); }
}

.header .tag {
    color: rgba(255, 255, 255, 0.2);
    font-size: clamp(0.65rem, 0.8vw, 0.8rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 0.8vh;
    font-weight: 400;
    animation: tagPulse 3s ease-in-out infinite;
}

@keyframes tagPulse {
    0%, 100% { opacity: 0.2; letter-spacing: 0.25em; }
    50% { opacity: 0.5; letter-spacing: 0.35em; }
}

.header h1 {
    color: #ffffff;
    font-size: clamp(2.8rem, 8vw, 6rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0;
    animation: titleGlow 4s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 20px rgba(255,255,255,0); }
    100% { text-shadow: 0 0 40px rgba(255,255,255,0.05), 0 0 80px rgba(255,255,255,0.02); }
}

.header .sub {
    color: rgba(255, 255, 255, 0.4);
    font-size: clamp(0.9rem, 1.4vw, 1.2rem);
    margin-top: 0.6vh;
    font-weight: 300;
    letter-spacing: 0.02em;
    animation: subIn 1.2s ease 0.5s both;
}

@keyframes subIn {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

.divider {
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 2vh 0 3vh 0;
    animation: dividerGrow 1.2s ease 0.4s both;
}

@keyframes dividerGrow {
    0% { width: 0; opacity: 0; }
    100% { width: 40px; opacity: 1; }
}

.tool-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 600px;
    width: 100%;
}

.tool-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px 18px 20px;
    color: #ffffff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    animation: itemFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@supports not (backdrop-filter: blur(6px)) {
    .tool-card {
        background: rgba(255, 255, 255, 0.05);
    }
}

.tool-card:nth-child(1) { animation-delay: 0.10s; }
.tool-card:nth-child(2) { animation-delay: 0.18s; }
.tool-card:nth-child(3) { animation-delay: 0.26s; }
.tool-card:nth-child(4) { animation-delay: 0.34s; }

@keyframes itemFadeUp {
    0% { opacity: 0; transform: translateY(30px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-card:hover::after {
    width: 100%;
}

.tool-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.tool-card:active {
    transform: scale(0.97) translateY(0);
    transition-duration: 0.08s;
}

.tool-card .info {
    display: flex;
    flex-direction: column;
}

.tool-card .name {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    transition: all 0.3s ease;
}

.tool-card:hover .name {
    letter-spacing: 0.04em;
}

.tool-card .desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 2px;
}

.tool-card .preview {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.tool-card .preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 600px) {
    .container {
        padding: 32px 6vw;
        justify-content: flex-start;
        padding-top: 40px;
    }
    .header {
        margin-bottom: 3vh;
    }
    .header .tag {
        margin-bottom: 0.4vh;
    }
    .header .sub {
        margin-top: 0.3vh;
    }
    .divider {
        margin: 1.2vh 0 2vh 0;
    }
    .tool-grid {
        gap: 0.6rem;
    }
    .tool-card {
        padding: 12px 14px 14px 14px;
        gap: 8px;
    }
    .tool-card .name {
        font-size: 16px;
    }
    .tool-card .desc {
        font-size: 12px;
    }
}

@media (max-width: 320px) {
    .container {
        padding: 20px 4vw;
        padding-top: 28px;
    }
    .tool-card {
        padding: 10px 10px 12px 10px;
        gap: 6px;
    }
    .tool-card .name {
        font-size: 14px;
    }
    .tool-card .desc {
        font-size: 11px;
    }
}