:root {
    --bg-color: #f9f9f9;
    --text-color: #333333;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --primary-color: #000000;
    --primary-text: #ffffff;
    --hover-color: #f1f1f1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 3rem 1rem;
    text-align: center;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.05em;
}

header p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.header-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

input[type="text"] {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
    max-width: 350px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background-color: #fff;
    cursor: pointer;
    outline: none;
}

.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn:hover {
    background-color: var(--hover-color);
    border-color: #ccc;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--primary-text);
    border: 1px solid var(--primary-color);
}

.primary-btn:hover {
    background-color: #333;
    border-color: #333;
}

main {
    flex: 1;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
    width: 100%;
}

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

.app-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.app-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.app-card p {
    color: #666;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
    flex: 1;
}

.card-action {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: auto;
}

footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 1rem;
    text-align: center;
}

footer p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #555;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.2s;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-size: 1.8rem;
    line-height: 1;
    font-weight: 400;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-color);
}

.modal-content h2 {
    margin-bottom: 1rem;
    padding-right: 2rem;
    font-size: 1.8rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: #444;
    font-size: 1.05rem;
}

.link-container {
    background-color: var(--bg-color);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 1.5rem;
}

.link-container label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.copy-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.copy-group input {
    flex: 1;
    background-color: #fff;
    padding: 0.75rem 1rem;
}

.help-text {
    font-size: 0.9rem !important;
    color: #666 !important;
    margin-bottom: 0 !important;
}

.meta-link {
    display: inline-flex;
    align-items: center;
    margin: 1rem 0 1.5rem;
    color: #0055cc;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.meta-link:hover {
    text-decoration: underline;
}

.dev-mode-instructions {
    background-color: var(--bg-color);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

.dev-mode-instructions h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.dev-mode-instructions ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    color: #444;
}

.dev-mode-instructions li {
    margin-bottom: 0.5rem;
}

.dev-badge {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.developer-tag {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1.5rem;
    font-weight: 500;
    margin-top: -0.5rem;
}

.video-container {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    background-color: #000;
}

.coming-soon-video {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eee;
    color: #666;
    font-weight: 600;
    border: 1px dashed #ccc;
    border-radius: 8px;
}
