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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    margin: 0 auto;
}

/* ログイン画面用のラッパー */
.login-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ヘッダー */
header {
    padding: 40px 30px 30px;
    text-align: center;
}

header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 14px;
}

/* トップページ用ヘッダー */
.top-header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-header h1 {
    font-size: 32px;
    color: #333;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.welcome-message {
    font-size: 16px;
    color: #667eea;
    font-weight: 600;
    min-width: 150px;
    text-align: right;
}

/* メインコンテンツ */
main {
    padding: 30px;
}

.login-form {
    padding: 0 30px 30px;
}

/* フォームグループ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* 入力フィールド */
.input-field {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
    background-color: #f8f9ff;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-top: 10px;
}

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

.btn-secondary {
    background-color: #e74c3c;
    color: white;
}

.btn-secondary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* メッセージ */
.message {
    margin-top: 20px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.message:not(:empty) {
    display: block;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* カード */
.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.card ul {
    list-style: none;
    padding-left: 0;
}

.card ul li {
    padding: 8px 0;
    color: #666;
    position: relative;
    padding-left: 25px;
}

.card ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* フッター */
footer {
    text-align: center;
    padding: 30px;
    color: white;
    font-size: 14px;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .user-info {
        width: 100%;
        flex-direction: column;
    }

    .welcome-message {
        text-align: left;
        min-width: auto;
    }

    .btn-secondary {
        width: 100%;
    }

    .card {
        padding: 20px;
    }

    header {
        padding: 30px 20px 20px;
    }

    main {
        padding: 20px;
    }

    header h1 {
        font-size: 24px;
    }

    .top-header h1 {
        font-size: 24px;
    }
}
