:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --background: #fafafa;
    --surface: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* ヘッダー */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.language-selector {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.lang-btn {
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

/* カラーピッカーセクション */
.color-picker-section {
    background: var(--surface);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 30px;
}

.color-picker-section h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.picker-container {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

#colorPicker {
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 2px 8px var(--shadow);
}

#colorHex {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    transition: var(--transition);
}

#colorHex:focus {
    outline: none;
    border-color: var(--primary-color);
}

.color-preview {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: var(--transition);
}

.color-values {
    display: flex;
    gap: 20px;
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ハーモニータイプ */
.harmony-types {
    background: var(--surface);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 30px;
}

.harmony-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.harmony-btn {
    padding: 12px 20px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
}

.harmony-btn:hover {
    background: var(--background);
    transform: translateY(-2px);
}

.harmony-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 結果セクション */
.result-section {
    background: var(--surface);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 30px;
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.color-box {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.color-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px var(--shadow);
}

.color-sample {
    height: 100px;
    width: 100%;
}

.color-info {
    padding: 15px;
    text-align: center;
}

.color-hex {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
}

.color-rgb {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

.palette-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
}

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

/* プレビューセクション */
.preview-section {
    background: var(--surface);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 30px;
}

.preview-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.preview-tab {
    padding: 10px 20px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.preview-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.preview-container {
    background: var(--background);
    padding: 20px;
    border-radius: 8px;
    min-height: 300px;
}

/* プレビューコンテンツ */
.website-preview {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
}

.preview-header {
    padding: 20px;
}

.preview-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-items {
    display: flex;
    gap: 20px;
}

.preview-hero {
    padding: 60px 20px;
    text-align: center;
}

.preview-hero h2 {
    margin-bottom: 20px;
}

.preview-hero button {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

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

.content-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid;
}

.graphic-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.ui-preview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ui-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ui-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
}

.ui-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ui-form input[type="text"] {
    padding: 10px;
    border: 2px solid;
    border-radius: 6px;
    font-size: 1rem;
}

.ui-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ui-progress {
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.ui-progress-bar {
    height: 100%;
    transition: width 0.3s ease;
}

.ui-card {
    border: 2px solid;
    border-radius: 8px;
    overflow: hidden;
}

.ui-card-header {
    padding: 12px;
    font-weight: 600;
}

.ui-card-content {
    padding: 16px;
}

/* ヒントセクション */
.tips-section {
    background: var(--surface);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 30px;
}

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

.tip-card {
    background: var(--background);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.tip-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.tip-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* フッター */
footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

/* トースト */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* レスポンシブ */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .picker-container {
        flex-direction: column;
    }
    
    #colorPicker, .color-preview {
        width: 100%;
        max-width: 200px;
    }
    
    .harmony-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .palette-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}