@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;600;700&display=swap');

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

:root {
    --dark: #0a0a0a;
    --primary: #667eea;
    --primary-dark: #764ba2;
    --accent: #4ade80;
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.45);
    --border: rgba(255, 255, 255, 0.09);
    --card-bg: rgba(255, 255, 255, 0.04);
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* 動画背景 */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.45;
}

/* ダークオーバーレイ */
.video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.65);
    z-index: 1;
}

.auth-container {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 440px;
    padding: 48px 40px;
    animation: fadeIn 0.5s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo {
    width: 200px;
    max-width: 100%;
    height: auto;
    margin: 0 auto 14px;
    display: block;
}

.invite-banner {
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.2);
    color: var(--accent);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-header h1 {
    color: var(--text);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header p {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    font-family: 'Noto Sans JP', sans-serif;
    transition: all 0.25s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.form-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.09);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 8px;
    letter-spacing: .03em;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider::before {
    margin-right: 14px;
}

.divider::after {
    margin-left: 14px;
}

.btn-google {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.25s ease;
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

.btn-link {
    margin-top: 14px;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

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

.auth-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.25s ease;
}

.auth-footer a:hover {
    color: var(--accent);
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
}

.alert-error {
    background: rgba(252, 129, 129, 0.1);
    color: #fc8181;
    border: 1px solid rgba(252, 129, 129, 0.2);
}

.alert-success {
    background: rgba(74, 222, 128, 0.08);
    color: var(--accent);
    border: 1px solid rgba(74, 222, 128, 0.18);
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
