:root {
    --bg-color: #fcf9f2;
    --primary-text: #333;
    --card-bg: #ffffff;
    --accent-color: #2c3e50;
    --border-radius: 16px;
}

body {
    margin: 0;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background-color: var(--bg-color);
    color: var(--primary-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* ★ ロゴとタイトルを横並びにするラッパー */
.title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.app-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* ★ 画像に寄せた丸みのある太字デザイン */
.app-title {
    font-family: 'Arial Rounded MT Bold', 'Nunito', 'Helvetica Rounded', 'Arial Black', sans-serif;
    font-size: 64px;
    font-weight: 900;
    letter-spacing: 1px;
    margin: 0;
    /* 強いドロップシャドウで立体感を出す */
    filter: drop-shadow(2px 4px 4px rgba(0, 0, 0, 0.15));
}

/* ★ ClassPinの「Class」部分（ネイビー） */
.title-class {
    color: #0f2c4d;
}

/* ★ ClassPinの「Pin」部分（ピンク） */
.title-pin {
    color: #ff6b81;
}

.app-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    justify-content: center;
    align-items: flex-start;
    flex: 1;
}

.app-container.spinning .settings-section {
    display: none;
}

.roulette-section {
    flex: 1 1 500px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 60px 30px 40px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.roulette-section:fullscreen,
.roulette-section:-webkit-full-screen {
    background-color: var(--bg-color);
    width: 100vw;
    height: 100vh;
    justify-content: center;
    overflow-y: auto;
}

.floating-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.icon-btn {
    background: transparent;
    color: #94a3b8; 
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.icon-btn svg {
    width: 26px;
    height: 26px;
}

.icon-btn:hover {
    background: #f1f5f9;
    color: #475569;
}

.canvas-container {
    position: relative;
    margin-bottom: 30px;
    width: 500px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), height 0.3s cubic-bezier(0.25, 1, 0.5, 1); 
}

.pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    color: #ff6b6b;
    z-index: 10;
}

canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 0 10px #888, 0 8px 20px rgba(0,0,0,0.15);
}

.settings-section {
    flex: 1 1 350px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* 使い方カード */
.usage-card {
    background: #fbf7f0;
    border: 1px solid #eaddcf;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.usage-card h3 {
    margin-top: 0;
    font-size: 16px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
}
.usage-card ul {
    padding-left: 20px;
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}
.usage-card li {
    margin-bottom: 8px;
}

button {
    font-family: inherit;
}
.btn-primary {
    font-size: 18px;
    font-weight: bold;
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: opacity 0.2s;
    background-color: var(--accent-color);
    color: white;
    width: 250px;
}
.btn-primary:hover { opacity: 0.8; }

.btn-secondary {
    font-weight: bold;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: opacity 0.2s;
    background-color: #f0f0f0;
    color: var(--primary-text);
    flex: 1;
    font-size: 14px;
    padding: 10px 20px;
}
.btn-secondary:hover { opacity: 0.8; }
.btn-secondary.outline {
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}
.action-buttons { display: flex; gap: 10px; margin-top: 10px; }

input[type="text"], textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
}

.hint { font-size: 12px; color: #888; margin: 0 0 5px 0; }
.history-section { margin-top: 20px; border-top: 1px dashed #ddd; padding-top: 15px; }
.history-section h4 { margin: 0 0 10px 0; font-size: 14px; color: #666; }
.history-container { display: flex; flex-wrap: wrap; gap: 8px; }
.history-item {
    display: flex; align-items: center; background: #eef2f5;
    border-radius: 15px; padding: 5px 12px; font-size: 14px; cursor: pointer;
}
.history-name { flex-grow: 1; }
.delete-btn { margin-left: 8px; color: #ff6b6b; font-weight: bold; font-size: 16px; cursor: pointer; }

.result-box {
    margin-top: 20px;
    padding: 20px;
    width: 80%;
    max-width: 400px;
    text-align: center;
    border: 2px solid #1dd1a1;
    border-radius: var(--border-radius);
    background-color: var(--card-bg);
    font-size: 18px;
    display: none;
}
.result-box span { font-size: 32px; font-weight: bold; display: block; margin-top: 10px; }

/* 下部セクション */
.bottom-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    background-color: #f9f7f4;
    border-top: 1px solid #eee;
}

.share-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    max-width: 700px;
    width: 100%;
}
.share-card h3 {
    margin-top: 0;
    font-size: 18px;
}
.share-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.share-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.share-btn.twitter { background-color: #0f1419; color: white; border: none; }
.share-btn.facebook { background-color: #1877f2; color: white; border: none; }
.share-btn.line { background-color: #06c755; color: white; border: none; }
.share-btn.copy-link { background-color: #f8f9fa; color: #333; }

/* フッター */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: white;
    border-top: 1px solid #eaeaea;
    font-size: 14px;
    color: #666;
}
.footer-links a {
    color: #666;
    text-decoration: none;
    margin-right: 20px;
    font-weight: bold;
}
.footer-links a:hover {
    text-decoration: underline;
}

/* モーダル */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); 
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; 
    padding: 30px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 600px;
    border-radius: 12px;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.modal-body p {
    line-height: 1.6;
    color: #444;
}