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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    font-size: 2em;
    margin-bottom: 20px;
    font-weight: 700;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
    margin-right: 10px;
}

.stat-value {
    font-size: 1.2em;
    font-weight: bold;
}

.controls {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.date-range, .search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.date-range label {
    font-weight: 600;
    color: #555;
}

.date-range input[type="date"],
.search-box input[type="text"] {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.date-range input[type="date"]:focus,
.search-box input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
}

button:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

.search-box input[type="text"] {
    flex: 1;
    min-width: 200px;
}

.severity-filters {
    padding: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.severity-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.severity-btn.active {
    background: #667eea;
    color: white;
}

.severity-btn[data-severity="Critical"] {
    border-color: #dc3545;
    color: #dc3545;
}

.severity-btn[data-severity="Critical"].active {
    background: #dc3545;
    color: white;
}

.severity-btn[data-severity="High"] {
    border-color: #fd7e14;
    color: #fd7e14;
}

.severity-btn[data-severity="High"].active {
    background: #fd7e14;
    color: white;
}

.severity-btn[data-severity="Medium"] {
    border-color: #ffc107;
    color: #856404;
}

.severity-btn[data-severity="Medium"].active {
    background: #ffc107;
    color: #856404;
}

.severity-btn[data-severity="Low"] {
    border-color: #28a745;
    color: #28a745;
}

.severity-btn[data-severity="Low"].active {
    background: #28a745;
    color: white;
}

.loading {
    text-align: center;
    padding: 40px;
}

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

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

.cve-list {
    padding: 20px;
}

.cve-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
    cursor: pointer;
}

.cve-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.cve-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.cve-id {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
    word-break: break-all;
}

.cve-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}

.badge-critical {
    background: #dc3545;
    color: white;
}

.badge-high {
    background: #fd7e14;
    color: white;
}

.badge-medium {
    background: #ffc107;
    color: #856404;
}

.badge-low {
    background: #28a745;
    color: white;
}

.badge-warning {
    background: #ffc107;
    color: #856404;
}

.badge-updated {
    background: #17a2b8;
    color: white;
}

.cve-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.cve-summary {
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.cve-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.9em;
    color: #888;
    margin-top: 15px;
}

.cve-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination {
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination button {
    min-width: 40px;
    padding: 8px 12px;
}

.pagination button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.pagination button:disabled:hover {
    transform: none;
    box-shadow: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2em;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #000;
}

.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.modal-body {
    line-height: 1.8;
}

.modal-body h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #667eea;
}

.modal-body p {
    margin-bottom: 15px;
    color: #555;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state h2 {
    margin-bottom: 10px;
    color: #666;
}

/* iPhone対応のレスポンシブデザイン */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .stats {
        flex-direction: column;
        gap: 10px;
    }

    .stat-item {
        width: 100%;
        text-align: center;
    }

    .date-range,
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }

    .date-range input[type="date"],
    .search-box input[type="text"],
    button {
        width: 100%;
    }

    .severity-filters {
        justify-content: center;
    }

    .severity-btn {
        flex: 1;
        min-width: 80px;
    }

    .cve-header {
        flex-direction: column;
    }

    .cve-item {
        padding: 15px;
    }

    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }

    .pagination {
        gap: 5px;
    }

    .pagination button {
        min-width: 35px;
        padding: 6px 10px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    header {
        padding: 20px;
    }

    header h1 {
        font-size: 1.2em;
    }

    .stat-item {
        padding: 8px 15px;
    }

    .stat-label {
        font-size: 0.8em;
    }

    .stat-value {
        font-size: 1em;
    }
}
