/* 基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.8;
    color: #333;
    background-color: #F0F9FF;
    background-image: 
        linear-gradient(45deg, #E0F2FE 25%, transparent 25%, transparent 75%, #E0F2FE 75%, #E0F2FE),
        linear-gradient(45deg, #E0F2FE 25%, transparent 25%, transparent 75%, #E0F2FE 75%, #E0F2FE),
        linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%, white),
        linear-gradient(45deg, white 25%, transparent 25%, transparent 75%, white 75%, white);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px, 20px 20px, 40px 40px;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ヘッダー */
header {
    background: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.95;
}

/* セクション */
section {
    background: white;
    margin-bottom: 25px;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

h2 {
    color: #4C1D95;
    font-size: 1.8em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #E0F2FE;
}

h3 {
    color: #4C1D95;
    margin: 15px 0;
}

/* プロフィール - 必ず縦並び！ */
.profile-section {
    display: block !important;
    text-align: center !important;
}

.profile-image {
    display: block !important;
    text-align: center !important;
    margin: 0 auto 20px auto !important;
    width: 100% !important;
}

.profile-image img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid #7C3AED;
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.2);
    object-fit: cover;
    display: inline-block;
}

.profile-content {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}

.profile-content p {
    text-align: left;
    max-width: 600px;
    margin: 0 auto 15px auto;
}

/* 機材グリッド */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.equipment-item {
    background: #F8FBFF;
    padding: 12px 18px;
    border-radius: 10px;
    border-left: 4px solid #7C3AED;
    font-size: 0.95em;
    transition: all 0.3s;
}

.equipment-item:hover {
    background: #E0F2FE;
    transform: translateX(5px);
}

/* リンクボタン */
.links {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.link-btn {
    display: inline-block;
    background: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
    color: white;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.95em;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

/* 今後の展開セクション */
.future-features {
    background: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
    color: white;
    text-align: center;
}

.future-features h2 {
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.future-features p {
    margin-bottom: 15px;
}

.future-features .links {
    margin-top: 30px;
}

.future-features .link-btn {
    background: #1E3A8A;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

/* PROJECT X バナー */
.project-x-banner {
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
    border: 1px solid #374151;
    border-radius: 15px;
    padding: 30px;
    margin: 30px auto;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* ルーレット */
.roulette-section {
    text-align: center;
}

.roulette-display {
    background: white;
    border: 3px solid #E0F2FE;
    padding: 40px;
    margin: 25px auto;
    border-radius: 15px;
    font-size: 24px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 500px;
}

.roulette-button {
    background: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(124, 58, 237, 0.4);
}

.roulette-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
}

.roulette-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #B0BEC5;
}

.roulette-actions {
    margin-top: 20px;
}

.roulette-actions .social-btn {
    background: #FF6B6B;
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    margin: 8px;
}

/* お題グリッド */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin: 25px 0;
}

.topic-item {
    background: white;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #7C3AED;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s;
}

.topic-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    background: #F3F4F6;
}

.topic-count {
    font-size: 1.2em;
    color: #4C1D95;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
}

/* お知らせ */
.notice {
    background: #FEF3C7;
    padding: 18px;
    border-radius: 10px;
    border-left: 4px solid #F59E0B;
    margin: 25px 0;
}

/* ソーシャル */
.social-links {
    text-align: center;
    margin: 25px 0;
}

.social-btn {
    background: linear-gradient(135deg, #1DA1F2 0%, #1A8CD8 100%);
    color: white;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 50px;
    display: inline-block;
    margin: 8px;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(29, 161, 242, 0.4);
}

/* フッター */
footer {
    text-align: center;
    padding: 30px;
    background: white;
    color: #666;
    margin-top: 40px;
    border-radius: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 35px;
    width: 90%;
    max-width: 450px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-buttons {
    margin-top: 25px;
    text-align: center;
}

.modal-btn {
    padding: 12px 32px;
    margin: 0 8px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
    transition: all 0.3s;
}

.modal-btn.confirm {
    background: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
    color: white;
}

.modal-btn.cancel {
    background: #E0E0E0;
    color: #666;
}

.modal-btn:hover {
    transform: scale(1.05);
}

/* その他 */
.daily-limit-info {
    background: #F3E8FF;
    padding: 12px;
    border-radius: 10px;
    margin: 20px 0;
    color: #4C1D95;
    font-size: 0.9em;
}

.usage-status {
    margin-top: 20px;
}

.placeholder {
    color: #9E9E9E;
}

.spinning {
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* モーダル非表示 */
#postModal,
#submitModal {
    display: none !important;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    /* プロフィールは既に縦並びなので追加調整のみ */
    .profile-image img {
        width: 120px;
        height: 120px;
    }
    
    .profile-content p {
        text-align: left;
        padding: 0 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    .equipment-grid {
        grid-template-columns: 1fr;
    }
    
    .link-btn {
        width: 100%;
        text-align: center;
    }
    
    .topics-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    body {
        background-size: 30px 30px;
    }
    
    section {
        padding: 20px;
    }
    
    .roulette-button {
        padding: 15px 40px;
        font-size: 16px;
        width: 100%;
        max-width: 300px;
    }
}