:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-sub: #94a3b8;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-sub);
    margin-left: 8px;
}

.nav-links a {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-left: 1rem;
    transition: all 0.2s;
}

.btn-login { color: var(--text-main); }
.btn-register {
    background: var(--text-main);
    color: var(--bg-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
}
.btn-register:hover { opacity: 0.9; }

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-sub);
    font-size: 1.2rem;
}

/* App Grid */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.app-card {
    background: var(--card-bg);
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.app-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.app-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.emoji-fallback {
    font-size: 40px;
    display: none; /* JS/onerrorで表示制御 */
}

.app-info h3 { margin: 0 0 0.5rem 0; }
.app-info p { margin: 0; color: var(--text-sub); font-size: 0.9rem; }

/* Auth Forms */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    margin-top: 2rem;
}

.auth-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.input-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-sub);
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid #475569;
    background: #0f172a;
    color: white;
    box-sizing: border-box;
}

.btn-primary {
    width: 100%;
    padding: 0.8rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover { background: var(--accent-hover); }

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-sub);
    font-size: 0.8rem;
    border-top: 1px solid #1e293b;
    margin-top: 4rem;
}