/* Hub Page Styles with Light/Dark Mode Support */

/* CSS Variables for Light Mode (default) */
:root {
    --hub-bg: #f5f5f5;
    --hub-surface: #ffffff;
    --hub-text: #333333;
    --hub-text-light: #666666;
    --hub-border: #dddddd;
    --hub-primary: #1a472a;
    --hub-primary-light: #2d5a3d;
    --hub-accent: #d4af37;
    --hub-shadow: rgba(0, 0, 0, 0.1);
    --hub-shadow-hover: rgba(0, 0, 0, 0.15);
    --hub-card-bg: #ffffff;
    --hub-card-hover-bg: #f8f9fa;
}

/* CSS Variables for Dark Mode */
.dark-mode {
    --hub-bg: #1a1a1a;
    --hub-surface: #2d2d2d;
    --hub-text: #e0e0e0;
    --hub-text-light: #b0b0b0;
    --hub-border: #404040;
    --hub-primary: #4a9b5f;
    --hub-primary-light: #5cb377;
    --hub-accent: #f4d03f;
    --hub-shadow: rgba(0, 0, 0, 0.3);
    --hub-shadow-hover: rgba(0, 0, 0, 0.4);
    --hub-card-bg: #2d2d2d;
    --hub-card-hover-bg: #353535;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--hub-text);
    background-color: var(--hub-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.hub-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
.hub-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--hub-border);
}

.header-content h1 {
    color: var(--hub-primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.header-subtitle {
    color: var(--hub-text-light);
    font-size: 1.1rem;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--hub-surface);
    border: 2px solid var(--hub-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    min-height: 56px;
}

.theme-toggle:hover {
    background: var(--hub-card-hover-bg);
    border-color: var(--hub-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--hub-shadow);
}

.theme-toggle:active {
    transform: translateY(0);
}

.theme-icon {
    display: block;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(15deg);
}

/* Main Content */
.hub-main {
    flex: 1;
}

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

/* Tool Cards */
.tool-card {
    background: var(--hub-card-bg);
    border: 2px solid var(--hub-border);
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 4px var(--hub-shadow);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--hub-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--hub-shadow-hover);
    border-color: var(--hub-primary);
    background: var(--hub-card-hover-bg);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.tool-card.coming-soon::after {
    content: 'Coming Soon';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--hub-accent);
    color: var(--hub-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tool-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
}

.tool-title {
    color: var(--hub-primary);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.tool-description {
    color: var(--hub-text-light);
    font-size: 1rem;
    line-height: 1.6;
}

/* Footer */
.hub-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 2px solid var(--hub-border);
    text-align: center;
    color: var(--hub-text-light);
    font-size: 0.9rem;
}

/* Responsive Design */

/* Tablet */
@media (max-width: 1024px) {
    .hub-container {
        padding: 1.5rem;
    }

    .header-content h1 {
        font-size: 2rem;
    }

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

    .tool-card {
        padding: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hub-container {
        padding: 1rem;
    }

    .hub-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .theme-toggle {
        align-self: flex-end;
    }

    .header-content h1 {
        font-size: 1.75rem;
    }

    .header-subtitle {
        font-size: 1rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tool-card {
        padding: 1.5rem;
    }

    .tool-icon {
        font-size: 3rem;
    }

    .tool-title {
        font-size: 1.25rem;
    }

    .tool-description {
        font-size: 0.9rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hub-container {
        padding: 0.75rem;
    }

    .header-content h1 {
        font-size: 1.5rem;
    }

    .tool-card {
        padding: 1.25rem;
    }

    .tool-icon {
        font-size: 2.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--hub-primary);
    outline-offset: 2px;
}
