/* 基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', 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: 0 20px;
}

/* ヘッダー */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

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

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* メインレイアウト */
.main-layout {
    display: flex;
    gap: 2rem;
    margin: 2rem auto;
    align-items: flex-start;
}

/* メインコンテンツエリア */
.content-area {
    flex: 1;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* セクション */
section {
    margin-bottom: 3rem;
}

h2 {
    color: #4a5568;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

/* データ情報カード */
.data-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.data-card {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.data-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.data-card h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

/* フォーム */
.form-group {
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #4a5568;
}

.predictions-container {
    margin-bottom: 1rem;
}

.prediction-input-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.prediction-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.remove-prediction {
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.remove-prediction:hover {
    background: #c53030;
}

#ticketPrice {
    width: 200px;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.input-help {
    background: #f0f8ff;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.input-help p {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

/* ボタン */
.btn-primary, .btn-secondary {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.2rem;
    padding: 1rem 3rem;
}

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

.btn-secondary {
    background: #48bb78;
    color: white;
}

.btn-secondary:hover {
    background: #38a169;
}

/* ローディング */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 結果表示 */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.summary-card {
    background: #f7fafc;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.summary-card.profit {
    border-color: #48bb78;
}

.summary-card.profit.negative {
    border-color: #e53e3e;
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-top: 0.5rem;
}

.summary-card.profit .summary-value {
    color: #48bb78;
}

.summary-card.profit.negative .summary-value {
    color: #e53e3e;
}

/* テーブル */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #f7fafc;
}

/* アドバイスセクション */
.advice-section {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.advice-section h3 {
    color: #2d3436;
    margin-bottom: 1rem;
}

.advice-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #e17055;
}

/* フッター */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: rgba(255, 255, 255, 0.8);
}

/* レスポンシブ */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }
    
    .cart-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        order: -1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .main-layout {
        margin: 1rem auto;
        gap: 1rem;
    }
    
    .content-area {
        padding: 1.5rem;
    }
    
    .cart-sidebar {
        padding: 1rem;
    }
    
    .prediction-input-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .remove-prediction {
        align-self: flex-end;
    }
    
    .summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .summary-value {
        font-size: 1.5rem;
    }
    
    .cart-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .cart-item-details {
        flex-direction: column;
        gap: 0.3rem;
    }
}

/* 舟券種別選択 */
.ticket-type-section {
    margin-bottom: 2rem;
}

.ticket-type-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.ticket-type-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    border: 3px solid #e2e8f0;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ticket-type-button:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.ticket-type-button.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.ticket-type-button.active::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 15px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.ticket-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    filter: grayscale(50%);
    transition: filter 0.3s ease;
}

.ticket-type-button.active .ticket-icon,
.ticket-type-button:hover .ticket-icon {
    filter: grayscale(0%);
}

.ticket-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 0.3rem;
    transition: color 0.3s ease;
}

.ticket-type-button.active .ticket-name {
    color: #667eea;
}

.ticket-desc {
    font-size: 0.85rem;
    color: #718096;
    line-height: 1.3;
}

.ticket-type-button.active .ticket-desc {
    color: #5a67d8;
}

/* 買い方選択セクション */
.betting-method-section {
    margin-bottom: 1.5rem;
}

/* 買い方選択タブ */
.betting-method-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tab-button {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: #e2e8f0;
    color: #4a5568;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-right: 1px solid #cbd5e0;
}

.tab-button:last-child {
    border-right: none;
}

.tab-button:hover {
    background: #cbd5e0;
}

.tab-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 買い方コンテンツ */
.betting-method-content {
    animation: fadeIn 0.5s ease-in-out;
}

/* 舟券種別ごとのフォーム */
.ticket-specific-form {
    transition: all 0.3s ease;
}

.ticket-specific-form[style*="display: none"] {
    display: none !important;
}

/* 艇番選択 */
.boat-selection, .formation-selection {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.boat-checkboxes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.boat-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.boat-checkbox input {
    display: none;
}

.boat-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e2e8f0;
    font-weight: bold;
    font-size: 1.2rem;
    color: #4a5568;
    transition: all 0.3s ease;
}

.boat-checkbox input:checked + .boat-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.boat-checkbox:hover .boat-number {
    border-color: #667eea;
    transform: scale(1.05);
}

/* 位置別グループ */
.position-group {
    margin-bottom: 2rem;
}

.position-group:last-child {
    margin-bottom: 0;
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.position-group h4 {
    color: #667eea;
    margin: 0;
    font-size: 1.1rem;
}

.selection-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-all, .btn-clear {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-all {
    background: #48bb78;
    color: white;
}

.btn-all:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.btn-clear {
    background: #e53e3e;
    color: white;
}

.btn-clear:hover {
    background: #c53030;
    transform: translateY(-1px);
}

/* プレビュー表示 */
.box-preview, .formation-preview {
    background: #fff5f5;
    border: 2px solid #feb2b2;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.combination-preview {
    min-height: 60px;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px dashed #cbd5e0;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #4a5568;
    max-height: 200px;
    overflow-y: auto;
}

.combination-preview.has-combinations {
    border-color: #48bb78;
    background: #f0fff4;
    color: #2d3748;
}

.combination-item {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin: 0.2rem;
    font-weight: 600;
}

.combination-count {
    color: #667eea;
    font-weight: bold;
    margin-top: 0.5rem;
    text-align: center;
}


/* フォーメーション買い特有のスタイル */
.formation-selection .position-group {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    background: white;
    margin-bottom: 1rem;
}

.formation-selection .position-group:nth-child(1) {
    border-color: #f6ad55;
    background: #fffaf0;
}

.formation-selection .position-group:nth-child(2) {
    border-color: #68d391;
    background: #f0fff4;
}

.formation-selection .position-group:nth-child(3) {
    border-color: #63b3ed;
    background: #ebf8ff;
}

/* 艇番の色分け */
.boat-number[data-boat="1"] { --boat-color: #ff6b6b; }
.boat-number[data-boat="2"] { --boat-color: #4ecdc4; }
.boat-number[data-boat="3"] { --boat-color: #45b7d1; }
.boat-number[data-boat="4"] { --boat-color: #96ceb4; }
.boat-number[data-boat="5"] { --boat-color: #feca57; }
.boat-number[data-boat="6"] { --boat-color: #ff9ff3; }

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .betting-method-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        border-right: none;
        border-bottom: 1px solid #cbd5e0;
    }
    
    .tab-button:last-child {
        border-bottom: none;
    }
    
    .boat-checkboxes {
        gap: 0.3rem;
    }
    
    .boat-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .position-group {
        margin-bottom: 1.5rem;
    }
}

/* グローバル購入金額表示 */
.global-purchase-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem 0;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.purchase-summary h3 {
    color: white;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.4rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.purchase-details {
    display: grid;
    gap: 0.8rem;
}

.purchase-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.purchase-item:last-child {
    border-bottom: none;
}

.purchase-item.total {
    margin-top: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-bottom: none;
}

.purchase-item .label {
    font-size: 1rem;
    opacity: 0.9;
}

.purchase-item .value {
    font-weight: bold;
    font-size: 1.1rem;
    color: #ffd700;
}

.purchase-item.total .value {
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.total-amount {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* プレビュー内の購入詳細スタイル改善 */
.combination-count div[style*="background: #667eea"] {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

/* エラー状態 */
.error-state {
    border-color: #e53e3e !important;
    background: #fed7d7 !important;
}

.error-message {
    color: #e53e3e;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .global-purchase-display {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .purchase-summary h3 {
        font-size: 1.2rem;
    }
    
    .purchase-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .purchase-item .value {
        align-self: flex-end;
        font-size: 1.2rem;
    }
    
    .purchase-item.total .value {
        font-size: 1.4rem;
    }
}

/* カートサイドバー */
.cart-sidebar {
    width: 320px;
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.cart-header h3 {
    margin: 0;
    color: #667eea;
    font-size: 1.3rem;
}

.cart-clear-all {
    background: #e53e3e;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.cart-clear-all:hover {
    background: #c53030;
    transform: scale(1.1);
}

/* カートアイテム */
.cart-items {
    margin-bottom: 1.5rem;
    min-height: 100px;
}

.cart-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #a0aec0;
}

.cart-empty p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.cart-empty small {
    font-size: 0.9rem;
    line-height: 1.4;
}

.cart-item {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cart-item-label {
    font-weight: 600;
    color: #667eea;
    font-size: 1rem;
}

.cart-item-remove {
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.cart-item-remove:hover {
    background: #c53030;
    transform: scale(1.1);
}

.cart-item-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #4a5568;
}

.cart-item-type {
    background: #667eea;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* カート合計 */
.cart-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    margin-top: 0.5rem;
    padding: 1rem 0 0.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: 700;
    font-size: 1.1rem;
}

/* カートボタン */
.add-to-cart-section {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.add-to-cart-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.add-to-cart-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cart-backtest-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.cart-backtest-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* アニメーション */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* 日別結果スタイル */
.daily-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.daily-search {
    flex: 1;
    max-width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.daily-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.sort-select {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: #667eea;
}

.export-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.daily-table-container {
    max-height: 600px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.daily-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #5a67d8;
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
}

.page-info {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

.page-size-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #4a5568;
}

.page-size-control select {
    padding: 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* 日別テーブルの特別スタイル */
#dailyTable {
    font-size: 0.9rem;
}

#dailyTable th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #667eea;
    font-size: 0.8rem;
    text-align: center;
    white-space: nowrap;
}

#dailyTable td {
    text-align: center;
    white-space: nowrap;
    padding: 0.8rem 0.5rem;
}

#dailyTable td:first-child,
#dailyTable td:nth-child(2) {
    text-align: left;
    white-space: normal;
    min-width: 120px;
}

/* 好調・不調の行のハイライト */
#dailyTable tr.profit-positive {
    background: linear-gradient(90deg, rgba(72, 187, 120, 0.1) 0%, rgba(72, 187, 120, 0.05) 100%);
}

#dailyTable tr.profit-negative {
    background: linear-gradient(90deg, rgba(229, 62, 62, 0.1) 0%, rgba(229, 62, 62, 0.05) 100%);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .daily-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .daily-search {
        max-width: none;
    }
    
    .daily-filters {
        justify-content: space-between;
    }
    
    .daily-table-container {
        overflow-x: auto;
        max-height: 400px;
    }
    
    #dailyTable {
        min-width: 800px;
        font-size: 0.8rem;
    }
    
    #dailyTable th,
    #dailyTable td {
        padding: 0.6rem 0.4rem;
    }
    
    .daily-pagination {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .page-size-control {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    #dailyTable {
        font-size: 0.7rem;
        min-width: 700px;
    }
    
    #dailyTable th,
    #dailyTable td {
        padding: 0.4rem 0.3rem;
    }
    
    .pagination-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}