/* 諭吉DAO 会員管理システム - スタイルシート */

/* 基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #a78bfa 0%, #e879f9 50%, #f472b6 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 50px rgba(0,0,0,0.1);
}

/* ヘッダー */
.header {
    background: linear-gradient(135deg, #a78bfa 0%, #e879f9 50%, #f472b6 100%);
    color: white;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h1 {
    font-size: 1.5em;
    margin: 0;
}

.header h1 img {
    max-height: 80px;
    width: auto;
    height: auto;
}

.header h1 a {
    color: white;
    text-decoration: none;
}

.tagline {
    font-size: 1em;
    opacity: 0.9;
}

.main-nav {
    display: flex;
    gap: 15px;
    margin: 0;
    flex-wrap: wrap;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background 0.3s;
    font-size: 0.95em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a .menu-icon {
    font-size: 1.2em;
}

.main-nav a .menu-text {
    display: inline;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255,255,255,0.2);
}

/* メインコンテンツ */
.main-content {
    padding: 40px 30px;
    max-width: 900px;
    margin: 0 auto;
}

.welcome-section {
    text-align: center;
    margin: 40px 0;
}

.welcome-section h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #a78bfa;
}

.notice {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #ffeaa7;
}

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

.btn-primary {
    background: linear-gradient(135deg, #a78bfa 0%, #e879f9 50%, #f472b6 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.4);
}

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

.btn-secondary:hover {
    background: #5a6268;
}

.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
}

/* 機能紹介 */
.features {
    margin: 60px 0;
}

.features h3 {
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 30px;
    color: #a78bfa;
}

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

.feature-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.feature-item h4 {
    font-size: 1.3em;
    margin-bottom: 10px;
}

/* フォーム */
.form-container {
    max-width: 700px;
    margin: 0 auto;
}

.form-container h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #a78bfa;
    text-align: center;
}

fieldset {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 25px;
    margin: 25px 0;
}

legend {
    font-weight: bold;
    color: #a78bfa;
    padding: 0 10px;
    font-size: 1.2em;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.required {
    color: #dc3545;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #a78bfa;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.9em;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* メッセージ */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #f5c6cb;
}

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

.error-message li {
    margin: 5px 0;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #c3e6cb;
    text-align: center;
}

.success-message h3 {
    margin-bottom: 10px;
}

/* 紹介者情報 */
.referrer-info {
    background: #f3e8ff;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    border: 2px solid #a78bfa;
}

/* ログイン */
.login-container {
    max-width: 450px;
}

.login-links {
    text-align: center;
    margin-top: 30px;
}

.login-links p {
    margin: 10px 0;
}

.demo-info {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-top: 20px;
}

/* ダッシュボード */
.welcome-message {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #a78bfa 0%, #e879f9 50%, #f472b6 100%);
    color: white;
    border-radius: 10px;
}

.welcome-message h2 {
    font-size: 2em;
    margin-bottom: 10px;
}

.user-id {
    opacity: 0.9;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #a78bfa;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 3em;
    font-weight: bold;
    color: #e879f9;
    margin: 10px 0;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9em;
}

.dashboard-section {
    margin: 40px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
}

.dashboard-section h3 {
    color: #a78bfa;
    margin-bottom: 20px;
}

.affiliate-box {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.affiliate-box input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
}

.affiliate-code {
    margin: 10px 0;
    font-size: 1.1em;
}

.help-text {
    color: #6c757d;
    font-size: 0.9em;
}

.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: linear-gradient(135deg, #a78bfa, #e879f9);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

.referral-list {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.data-table th {
    background: linear-gradient(135deg, #a78bfa, #e879f9);
    color: white;
    font-weight: bold;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.dashboard-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 40px 0;
}

/* プロフィール */
.readonly-field {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    color: #495057;
}

/* フッター */
.footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .header {
        padding: 10px 15px;
    }
    
    .header h1 {
        font-size: 0.85em;
    }
    
    /* モバイル時にサイト名を小さく表示 */
    .site-name {
        font-size: 0.95em;
    }
    
    .header h1 img {
        max-height: 50px !important;
        width: auto !important;
        height: auto !important;
    }
    
    .main-nav {
        gap: 8px;
    }
    
    .main-nav a {
        padding: 8px 12px;
        min-width: 44px;
        justify-content: center;
    }
    
    /* スマホではテキストを非表示、アイコンのみ */
    .main-nav a .menu-text {
        display: none;
    }
    
    .main-nav a .menu-icon {
        font-size: 1.4em;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .affiliate-box {
        flex-direction: column;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}
