/* DDO Tools - Main Landing Page */
/* Matching Flowbite/Tailwind dark theme from qt.ddotools.xyz and cg.ddotools.xyz */

:root {
    /* Dark mode (default) - matches qt.ddotools.xyz */
    --bg-primary: #1a1a1a;      /* dark background */
    --bg-secondary: #2d2d2d;    /* card background */
    --bg-card: #2d2d2d;
    --bg-card-hover: #3a3a3a;
    --text-primary: #e0e0e0;    /* main text */
    --text-secondary: #b0b0b0;  /* secondary text */
    --text-muted: #666666;
    --accent: #d4af37;          /* golden from qt.ddotools */
    --accent-hover: #e6c347;
    --border: #404040;
    --shadow: rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #f5f5f5;
        --bg-secondary: #ffffff;
        --bg-card: #ffffff;
        --bg-card-hover: #fafafa;
        --text-primary: #1a1a1a;
        --text-secondary: #4a4a4a;
        --text-muted: #888888;
        --accent: #b8962e;          /* darker gold for light mode */
        --accent-hover: #a17f26;
        --border: #e0e0e0;
        --shadow: rgba(0, 0, 0, 0.1);
    }
}

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

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

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

/* Tools Grid */
.tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    flex: 1;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--shadow);
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: grayscale(0);
}

img.tool-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.tool-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.tool-card:hover h2 {
    color: var(--accent);
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Latest update info */
.latest-update {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
    width: 100%;
    min-height: 1.5em;
}

.latest-update:empty {
    border-top: none;
    display: none;
}

.update-label {
    color: var(--accent);
    font-weight: 500;
}

.update-date {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Footer */
footer {
    margin-top: 4rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.privacy {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 480px) {
    main {
        padding: 2rem 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .tool-card {
        padding: 1.5rem;
    }
    
    .tool-icon {
        font-size: 2.5rem;
    }
}
