:root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent: #00f2fe;
    --accent-hover: #4facfe;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background: #0f172a;
    overflow-x: hidden;
}

/* Dynamic Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: linear-gradient(45deg, #0f172a, #1e1b4b, #312e81, #1e1b4b);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

.background-animation::before,
.background-animation::after {
    content: '';
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.background-animation::before {
    background: radial-gradient(circle, rgba(79,172,254,0.4) 0%, rgba(0,242,254,0) 70%);
    top: -20%;
    left: -10%;
}

.background-animation::after {
    background: radial-gradient(circle, rgba(161,140,209,0.4) 0%, rgba(251,194,235,0) 70%);
    bottom: -20%;
    right: -10%;
    animation-delay: -10s;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(5%, 5%); }
    66% { transform: translate(-5%, 2%); }
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

header {
    padding: 2rem;
    text-align: center;
    animation: slideDown 0.8s ease-out forwards;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #a18cd1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px 0 rgba(31, 38, 135, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.tool-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.tool-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    flex-grow: 1;
}

.tool-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.btn-open {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(45deg, var(--accent-hover), var(--accent));
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.btn-open:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.empty-state {
    grid-column: 1 / -1;
    padding: 4rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.8s ease-out forwards;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.empty-state h2 {
    font-size: 2rem;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* Stagger card animations */
.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }
.tool-card:nth-child(6) { animation-delay: 0.6s; }
