/* デジタル名刺システム スタイルシート */

/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* ヘッダー */
.header, .display-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1, .display-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p, .display-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* メインコンテンツ */
.main-content, .display-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    width: 100%;
    overflow-x: hidden;
}

/* カードセクション */
.card-section {
    margin-bottom: 40px;
    padding: 30px;
    border: 1px solid #e1e5e9;
    border-radius: 15px;
    background: #fafbfc;
}

.card-section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* SNSリンク項目 */
.sns-item, .custom-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.sns-header, .custom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.sns-type {
    flex: 1;
    margin-right: 15px;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.btn-remove:hover {
    background: #c82333;
}

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

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

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

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

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* アクションボタン */
.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* プレビュー */
.preview-container {
    text-align: center;
}

.preview-card {
    display: inline-block;
    width: 300px;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin: 20px auto;
    transition: all 0.3s ease;
}

.preview-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: white;
}

.preview-content p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 5px;
}

/* テーマカラー */
.theme-blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.theme-green { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.theme-purple { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.theme-orange { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.theme-red { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }

/* フッター */
.footer, .display-footer {
    text-align: center;
    color: white;
    opacity: 0.8;
}

.footer a, .display-footer a {
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.5);
}

.footer a:hover, .display-footer a:hover {
    border-bottom-color: white;
}

/* 表示画面専用スタイル */
.business-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

/* モダンレイアウト */
.layout-modern .card-header.modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.avatar {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    border: 3px solid rgba(255,255,255,0.3);
}

.header-info .name {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.header-info .name-en {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 8px;
}

.header-info .position {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.header-info .department {
    font-size: 1.1rem;
    opacity: 0.7;
}

.layout-modern .card-body {
    padding: 40px;
}

.layout-modern .card-body h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 2px solid #e1e5e9;
    padding-bottom: 10px;
}

.company-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.company-en {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 15px;
}

.address {
    color: #495057;
    font-size: 1rem;
}

.contact-section {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.contact-item .icon {
    font-size: 1.2rem;
    min-width: 30px;
}

.contact-item a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* クラシックレイアウト */
.layout-classic .card-header.classic {
    background: #2c3e50;
    color: white;
    padding: 40px;
    text-align: center;
}

.layout-classic .card-header.classic .name {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.layout-classic .card-header.classic .position,
.layout-classic .card-header.classic .department {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 10px;
}

.layout-classic .card-header.classic .company-name {
    font-size: 1.8rem;
    margin-top: 20px;
    color: #3498db;
}

.layout-classic .card-header.classic .company-en {
    font-size: 1rem;
    opacity: 0.7;
    margin-top: 5px;
}

.layout-classic .card-body {
    padding: 40px;
}

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

.contact-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* ミニマルレイアウト */
.layout-minimal .card-header.minimal {
    background: #f8f9fa;
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid #e1e5e9;
}

.layout-minimal .card-header.minimal .name {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.layout-minimal .card-header.minimal .company {
    font-size: 1.2rem;
    color: #6c757d;
}

.layout-minimal .card-body {
    padding: 30px;
}

.minimal-contact {
    text-align: center;
    margin-bottom: 30px;
}

.minimal-link {
    display: block;
    color: #667eea;
    text-decoration: none;
    font-size: 1.1rem;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.minimal-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* SNSセクション */
.sns-section {
    margin-bottom: 30px;
}

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

.sns-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
    border: 1px solid #e1e5e9;
}

.sns-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.minimal-sns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.minimal-sns-link {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.minimal-sns-link:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

/* カスタムセクション */
.custom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.custom-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.custom-item .label {
    font-weight: bold;
    color: #495057;
}

.custom-item .value {
    color: #6c757d;
    margin-left: 10px;
}

.minimal-custom {
    text-align: center;
}

.minimal-custom-item {
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.minimal-custom-item .label {
    font-weight: bold;
    color: #495057;
}

/* カードアクション */
.card-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* NFC情報 */
.nfc-info {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.nfc-info h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.nfc-info ol {
    padding-left: 20px;
}

.nfc-info li {
    margin-bottom: 8px;
    color: #495057;
}

/* データなし表示 */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-data h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #495057;
}

.no-data p {
    margin-bottom: 25px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .main-content, .display-content {
        padding: 25px;
    }
    
    .card-section {
        padding: 20px;
    }
    
    .header h1, .display-header h1 {
        font-size: 2rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .preview-card {
        width: 100%;
        max-width: 300px;
    }
    
    .layout-modern .card-header.modern {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .avatar {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .header-info .name {
        font-size: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .sns-grid {
        grid-template-columns: 1fr;
    }
    
    .custom-grid {
        grid-template-columns: 1fr;
    }
    
    .card-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .main-content, .display-content {
        padding: 20px;
    }
    
    .card-section {
        padding: 15px;
    }
    
    .header h1, .display-header h1 {
        font-size: 1.8rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px 12px;
        font-size: 16px; /* iOSでズームを防ぐ */
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.business-card {
    animation: fadeIn 0.6s ease-out;
}

/* ホバーエフェクト */
.card-section:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.sns-item:hover,
.custom-item:hover {
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    border-color: #667eea;
}

/* フォーカス状態 */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    transform: translateY(-1px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

/* ローディング状態 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 成功・エラーメッセージ */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* スマホ用レスポンシブ対応 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-content, .display-content {
        padding: 20px;
        border-radius: 15px;
    }
    
    .card-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .header h1, .display-header h1 {
        font-size: 2rem;
    }
    
    .header p, .display-header p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .main-content, .display-content {
        padding: 15px;
        border-radius: 10px;
    }
    
    .card-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .header h1, .display-header h1 {
        font-size: 1.5rem;
    }
    
    .header p, .display-header p {
        font-size: 0.9rem;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px;
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 14px;
    }
}
