:root {
    --bg-color: #000000;
    --card-bg: #1c1c1e;
    /* Slightly lighter Apple gray for depth */
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent-blue: #0071e3;
    --border-radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 980px;
    width: 90%;
    padding: 80px 20px;
    text-align: center;
}

.logo-box {
    background: #2d2d2e;
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

h1 {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 21px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.4;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    width: 100%;
    /* Now stays within container thanks to border-box */
    max-width: 480px;
    padding: 16px 24px;
    border-radius: 14px;
    border: none;
    background: var(--card-bg);
    color: white;
    font-size: 17px;
    outline: none;
    margin-bottom: 60px;
    transition: all 0.3s ease;

    /* Ensure the font size is at least 16px to prevent iOS auto-zoom */
    appearance: none;
}

.search-input:focus {
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.4);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background-color: var(--card-bg);
    padding: 32px;
    border-radius: var(--border-radius);
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.card:hover {
    background-color: #2c2c2e;
    transform: scale(1.02);
}

.card i {
    font-size: 28px;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

footer {
    margin-top: auto;
    padding: 60px 20px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--accent-blue);
    text-decoration: none;
    margin: 0 8px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 734px) {
    .container {
        padding: 40px 15px;
        /* Slightly less padding for more input room */
        width: 100%;
    }

    h1 {
        font-size: 32px;
    }

    .subtitle {
        font-size: 17px;
    }

    .grid {
        grid-template-columns: 1fr;
        /* Force single column on mobile */
        gap: 16px;
    }

    .card {
        padding: 24px;
    }
}


.search-container {
    width: 100%;
    display: flex;
    justify-content: center;
    /* Keeps the input centered */
    margin: 0 auto;
}