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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

h2 {
    color: #34495e;
    margin-bottom: 15px;
}

.input-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

#prdInput {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

#analyzeBtn {
    margin-top: 15px;
    padding: 12px 30px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#analyzeBtn:hover {
    background-color: #2980b9;
}

#analyzeBtn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

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

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    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); }
}

.result-section {
    display: grid;
    gap: 30px;
}

.event-storming-section,
.discussion-section,
.example-mapping-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.details {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.discussion-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.discussion-message {
    margin-bottom: 15px;
    padding: 10px;
    background-color: white;
    border-radius: 4px;
    border-left: 3px solid #3498db;
}

.discussion-message .author {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.example-mapping {
    display: grid;
    gap: 15px;
}

.example-card {
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.example-card.story {
    background-color: #fff3cd;
    border-color: #ffc107;
}

.example-card.rule {
    background-color: #d1ecf1;
    border-color: #17a2b8;
}

.example-card.example {
    background-color: #d4edda;
    border-color: #28a745;
}

.example-card.question {
    background-color: #f8d7da;
    border-color: #dc3545;
}

.example-card h3 {
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mermaid {
    text-align: center;
    margin: 0;
    background: white;
    padding: 20px;
    border-radius: 8px;
    display: inline-block;
    cursor: move;
}

.mermaid svg {
    display: block;
}

.mermaid-container {
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    height: 500px;
    border: 2px solid #ddd;
    user-select: none;
}

.diagram-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.diagram-controls button {
    padding: 8px 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.diagram-controls button:hover {
    background-color: #e0e0e0;
}

.diagram-controls .zoom-info {
    margin-left: auto;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

#eventStormingDiagram pre {
    background: white;
    padding: 15px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    overflow-x: auto;
}

/* Event Storming Board Styles */
.event-storming-board {
    margin-top: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#eventStormingBoard {
    width: 100%;
    height: 600px;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.board-legend {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.sticky-note {
    width: 20px;
    height: 20px;
    display: inline-block;
    border-radius: 2px;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.event-note {
    background-color: #ff9800;
}

.command-note {
    background-color: #2196f3;
}

.actor-note {
    background-color: #ffeb3b;
}

.policy-note {
    background-color: #e1bee7;
}

.aggregate-note {
    background-color: #4caf50;
}

.mermaid-error {
    padding: 20px;
    background-color: #ffebee;
    border: 1px solid #ef5350;
    border-radius: 4px;
}

.mermaid-error pre {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin-top: 10px;
}
.share-section {
    margin-bottom: 20px;
    text-align: center;
}

.share-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.share-btn:hover {
    background-color: #45a049;
}

.share-result {
    margin-top: 10px;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    display: inline-block;
}

.share-result input {
    width: 300px;
    padding: 5px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.share-result button {
    padding: 5px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.share-result button:hover {
    background-color: #0056b3;
}

/* Progress tracking styles */
.progress-container {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.progress-step {
    flex: 1;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.progress-step.active {
    background: #e3f2fd;
    border-color: #3498db;
    transform: scale(1.05);
}

.progress-step.completed {
    background: #e8f5e9;
    border-color: #4caf50;
}

.step-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.step-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.progress-step.active .step-label {
    color: #2980b9;
    font-weight: bold;
}

.progress-step.completed .step-label {
    color: #388e3c;
}

/* 유비쿼터스 언어 섹션 스타일 */
.ubiquitous-language-section {
    margin-top: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.ubiquitous-language-content {
    overflow-x: auto;
    margin-top: 20px;
}

.ubiquitous-language-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.ubiquitous-language-table thead {
    background-color: #3498db;
    color: white;
}

.ubiquitous-language-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.ubiquitous-language-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.ubiquitous-language-table tbody tr:hover {
    background-color: #f5f5f5;
}

.ubiquitous-language-table tbody tr:last-child {
    border-bottom: none;
}

.ubiquitous-language-table td {
    padding: 12px 15px;
    font-size: 14px;
    line-height: 1.5;
}

.ubiquitous-language-table td:first-child {
    font-weight: 500;
    color: #2c3e50;
    background-color: #f8f9fa;
}

.ubiquitous-language-table td:nth-child(2) {
    font-family: 'Courier New', monospace;
    color: #e74c3c;
    font-weight: 500;
}

.ubiquitous-language-table td:nth-child(3) {
    color: #27ae60;
    font-weight: 500;
}

.ubiquitous-language-table td:last-child {
    color: #555;
    font-size: 13px;
}

/* 반응형 테이블 스타일 */
@media (max-width: 768px) {
    .ubiquitous-language-table {
        font-size: 12px;
    }
    
    .ubiquitous-language-table th,
    .ubiquitous-language-table td {
        padding: 8px 10px;
    }
}

/* 작업 티켓 및 타임라인 스타일 */
.work-tickets-section {
    margin-top: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.timeline-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.timeline-controls button {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.timeline-controls button:hover {
    background-color: #2980b9;
}

.timeline-controls select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background-color: white;
}

.timeline-container {
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: white;
    margin-bottom: 30px;
    overflow: hidden;
}

.work-tickets-grid {
    margin-top: 30px;
}

.work-tickets-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.work-ticket-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.work-ticket-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.ticket-id {
    font-weight: bold;
    color: #3498db;
    font-size: 14px;
}

.ticket-priority {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.priority-high {
    background-color: #ffebee;
    color: #c62828;
}

.priority-medium {
    background-color: #fff3e0;
    color: #ef6c00;
}

.priority-low {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.ticket-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.ticket-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.ticket-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #666;
}

.ticket-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.ticket-tag {
    padding: 3px 8px;
    background-color: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 12px;
}

.ticket-dates {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 10px;
}

.milestones-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.milestone-card {
    background-color: white;
    border-left: 4px solid #9c27b0;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.milestone-title {
    font-weight: 600;
    color: #9c27b0;
    margin-bottom: 5px;
}

.milestone-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.milestone-description {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

/* vis-timeline 커스텀 스타일 */
.vis-item {
    border-radius: 4px;
    border-width: 2px;
}

.vis-item.vis-selected {
    border-color: #2980b9;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.vis-item.feature {
    background-color: #3498db;
    border-color: #2980b9;
    color: white;
}

.vis-item.bug {
    background-color: #e74c3c;
    border-color: #c0392b;
    color: white;
}

.vis-item.improvement {
    background-color: #f39c12;
    border-color: #d68910;
    color: white;
}

.vis-item.task {
    background-color: #95a5a6;
    border-color: #7f8c8d;
    color: white;
}

.vis-item.milestone {
    background-color: #9c27b0;
    border-color: #7b1fa2;
    color: white;
    border-width: 3px;
}
