body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7f7f7;
    color: #333;
}

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

h4 {
    color: #2D3748;
    text-align: center;
    margin-bottom: 10px;
}

.filter-form {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    overflow: hidden;
}

.filter-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.filter-header:hover {
    background-color: #e9ecef;
}

.filter-title {
    font-weight: 600;
    color: #4A5568;
    margin: 0;
}

.filter-icon {
    width: 20px;
    height: 20px;
    position: relative;
    transition: transform 0.3s;
}

.filter-icon::before,
.filter-icon::after {
    content: '';
    position: absolute;
    background-color: #4A5568;
    top: 50%;
    left: 0;
    transition: transform 0.3s;
}

.filter-icon::before {
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

.filter-icon::after {
    width: 2px;
    height: 100%;
    transform: translateX(9px) translateY(-50%);
}

.filter-form.active .filter-icon::after {
    transform: translateX(9px) translateY(-50%) rotate(90deg);
}

.filter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.filter-form.active .filter-content {
    max-height: 300px;
}

.filter-body {
    padding: 20px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

.filter-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #4A5568;
}

.filter-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #E2E8F0;
    border-radius: 5px;
    background-color: white;
    box-sizing: border-box;
}

.filter-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}

.filter-button {
    background-color: #4299E1;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
    flex-grow: 1;
    font-size: 12px;
    transition: background-color 0.2s;
}

.filter-button:hover {
    background-color: #3182CE;
}

.clear-button {
    background-color: #E2E8F0;
    color: #4A5568;
}

.clear-button:hover {
    background-color: #CBD5E0;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.image-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.image-card:hover {
    transform: translateY(-5px);
}

.image-container {
    position: relative;
    padding-top: 75%; /* 4:3のアスペクト比 */
    overflow: hidden;
    cursor: pointer;
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f0f0f0;
    transition: transform 0.3s ease;
}

.image-card:hover .image-container img {
    transform: scale(1.05);
}

/* 動画アイコンのスタイル */
.video-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    pointer-events: none;
}

.video-icon::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 6px solid white;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    margin-left: 2px;
}

.card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.card-model {
    margin-bottom: 10px;
    font-size: 0.7em;
    border-radius: 12px;
    padding: 3px 8px;
}

.card-model-name {
    background-color: #facbb7;
    color: white;
    font-size: 0.75em;
    border-radius: 12px;
    padding: 3px 8px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.card-tag {
    background-color: #EDF2F7;
    font-size: 0.7em;
    border-radius: 12px;
    padding: 3px 8px;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 10px;
    align-items: center;
}

.page-button {
    display: inline-block;
    padding: 8px 16px;
    background: white;
    color: #4A5568;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.page-button:hover {
    background-color: #E2E8F0;
}

.page-button.disabled {
    color: #A0AEC0;
    cursor: not-allowed;
    background-color: #EDF2F7;
    box-shadow: none;
}

.page-info {
    margin-top: 10px;
    text-align: center;
    color: #718096;
    font-size: 0.9em;
}

.empty-state {
    text-align: center;
    padding: 50px;
    color: #718096;
    grid-column: span 4;
}

.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #718096;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4299E1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

.load-more-container {
    text-align: center;
    padding: 20px;
}

.load-more-button {
    background-color: #4299E1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
}

.load-more-button:hover {
    background-color: #3182CE;
    transform: translateY(-1px);
}

.load-more-button:active {
    transform: translateY(0);
}

.end-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.end-message p {
    margin: 0;
    font-size: 14px;
}

/* アプリタグ機能のスタイル */
.app-tags-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.app-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.app-tag {
    background-color: #4299E1;
    color: white;
    font-size: 0.75em;
    border-radius: 12px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.remove-app-tag {
    background: none;
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-app-tag:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.add-app-tag {
    background-color: #E2E8F0;
    color: #4A5568;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.add-app-tag:hover {
    background-color: #CBD5E0;
}

/* アプリ選択ドロップダウンのスタイル */
.app-selector {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-selector-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    max-width: 300px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.app-selector-content h3 {
    margin: 0 0 15px 0;
    color: #2D3748;
    text-align: center;
}

.app-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.app-option {
    background-color: #F7FAFC;
    border: 1px solid #E2E8F0;
    color: #4A5568;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.app-option:hover {
    background-color: #EDF2F7;
    border-color: #CBD5E0;
}

.app-option.disabled {
    background-color: #F7FAFC;
    color: #A0AEC0;
    cursor: not-allowed;
    opacity: 0.6;
}

.close-app-selector {
    width: 100%;
    background-color: #E2E8F0;
    color: #4A5568;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.close-app-selector:hover {
    background-color: #CBD5E0;
}

.status-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.status-button {
    background-color: #E2E8F0;
    color: #4A5568;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.status-button:hover {
    background-color: #CBD5E0;
}

.status-button.active {
    background-color: #4299E1;
    color: white;
}

/* ステータス通知スタイル */
.status-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background-color: #4299E1;
    color: white;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    display: none;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.status-notification.error {
    background-color: #E53E3E;
}

.status-notification.show {
    display: block;
    animation: fadeInOut 3s forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; display: none; }
}

.reload-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #4299E1;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: background-color 0.2s, transform 0.3s;
}

.reload-button:hover {
    background-color: #3182CE;
    transform: scale(1.1);
}

.reload-button .reload-icon {
    position: relative;
    width: 24px;
    height: 24px;
}

.reload-button .reload-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
}

.reload-button:hover .reload-icon::before {
    animation: spin 5s linear infinite;
}

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

.reload-button .reload-icon::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -2px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 6px 6px 0;
    border-color: transparent white transparent transparent;
    transform: rotate(-45deg);
}

/* モーダルスタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    max-width: 95%;
    max-height: 90%;
    overflow: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease;
    position: relative;
    width: 90vw;
}

.modal-header {
    padding: 20px 20px 10px;
    border-bottom: 1px solid #E2E8F0;
}

.modal-title {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #2D3748;
}

.modal-body {
    padding: 20px;
    text-align: center;
}

/* モーダルレイアウトのスタイル */
.modal-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    min-height: 60vh;
}

.modal-left {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.modal-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 8px;
}

.modal-video {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
}

.video-placeholder {
    text-align: center;
    color: #718096;
    font-style: italic;
}

.video-placeholder p {
    margin: 0;
    font-size: 16px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .modal-layout {
        flex-direction: column;
    }
    
    .modal-left,
    .modal-right {
        flex: none;
        width: 100%;
    }
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #718096;
    transition: color 0.2s;
}

.close-button:hover {
    color: #2D3748;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.7);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
} 