body {
    margin: 0;
    padding: 20px;
    background: #0f0f0f;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#viz-container {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 30px;
}

h1 {
    text-align: center;
    margin: 0 0 30px 0;
    font-size: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step-box {
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-box:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.arrow-path {
    fill: none;
    stroke: #667eea;
    stroke-width: 3;
    marker-end: url(#arrowhead);
    opacity: 0.8;
}

.center-warning {
    filter: drop-shadow(0 4px 8px rgba(76, 175, 80, 0.3));
}

.solution {
    text-align: center;
    margin-top: 30px;
    padding: 15px 30px;
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid #4caf50;
    border-radius: 25px;
    font-size: 18px;
    color: #4caf50;
    font-weight: 600;
}

.step-number {
    font-size: 24px;
    font-weight: bold;
    fill: #fff;
}

.step-text {
    font-size: 14px;
    font-weight: 600;
    fill: #fff;
}

.step-subtext {
    font-size: 12px;
    fill: #aaa;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: #1a1a1a;
    margin: 10% auto;
    padding: 30px;
    border: 2px solid #444;
    border-radius: 20px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.close:hover {
    color: #fff;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.modal-number {
    font-size: 32px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 50%;
    background: #333;
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
}

.modal-body {
    line-height: 1.6;
    color: #e0e0e0;
}

.modal-body ul {
    margin: 15px 0;
    padding-left: 25px;
}

.modal-body li {
    margin: 8px 0;
}

.modal-warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid #ff9800;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    color: #ff9800;
}

/* Footer */
.footer {
    text-align: center;
    color: #666;
    font-size: 14px;
    padding: 20px;
    max-width: 800px;
}

.footer a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #764ba2;
}
/* Theme toggle button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
    border: 2px solid #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

/* Light theme styles */
body.light-theme {
    background: #ffffff;
    color: #333;
}

body.light-theme #viz-container {
    background: #f5f5f5;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

body.light-theme h1 {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-theme .step-box {
    opacity: 0.9;
}

body.light-theme .step-box[fill="#2a3f5f"] {
    fill: #e3f2fd;
    stroke: #1976d2;
}

body.light-theme .step-box[fill="#4a3320"] {
    fill: #fff3e0;
    stroke: #f57c00;
}

body.light-theme .step-box[fill="#4a2a2a"] {
    fill: #ffebee;
    stroke: #d32f2f;
}

body.light-theme .step-box[fill="#3a1515"] {
    fill: #ffcdd2;
    stroke: #c62828;
}

body.light-theme .step-box[fill="#3a1525"] {
    fill: #fce4ec;
    stroke: #c2185b;
}

body.light-theme .step-box[fill="#351010"] {
    fill: #ef9a9a;
    stroke: #b71c1c;
}

body.light-theme .step-text {
    fill: #333;
}

body.light-theme .step-number {
    fill: #333;
}

body.light-theme .step-subtext {
    fill: #666;
}

body.light-theme .modal-content {
    background-color: #ffffff;
    border: 2px solid #ddd;
    color: #333;
}

body.light-theme .modal-header {
    border-bottom: 2px solid #eee;
}

body.light-theme .modal-number {
    background: #f0f0f0;
    color: #333;
}

body.light-theme .modal-body {
    color: #333;
}

body.light-theme .close {
    color: #666;
}

body.light-theme .close:hover {
    color: #333;
}

body.light-theme .footer {
    color: #666;
}

body.light-theme .footer a {
    color: #5a67d8;
}

body.light-theme .footer a:hover {
    color: #6b46c1;
}

body.light-theme .theme-toggle {
    background: #f0f0f0;
    border-color: #ddd;
    color: #333;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

body.light-theme svg circle {
    stroke: #ccc !important;
}

body.light-theme svg text {
    fill: #333;
}

body.light-theme .center-warning text {
    fill: #333 !important;
}

body.light-theme .arrow-path {
    stroke: #5a67d8;
}

body.light-theme #arrowhead polygon {
    fill: #5a67d8;
}

/* Nové styly pro obíhající "konec chatu" */
.chat-end-warning-triangle {
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.5));
}

.chat-end-warning-triangle:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.8));
}

.chat-end-text {
    font-size: 18px;
    font-weight: bold;
    fill: #fff;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.8);
}

.chat-end-subtext {
    font-size: 14px;
    fill: #ff6b6b;
}

.chat-end-warning {
    font-size: 24px;
}

/* Světlý motiv pro nové prvky */
body.light-theme .chat-end-text {
    fill: #fff;
}

body.light-theme .chat-end-subtext {
    fill: #ffcccc;
}

@keyframes glow {
    0% { filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.5)); }
    50% { filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.8)); }
    100% { filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.5)); }
}

.glow-animation {
    animation: glow 2s infinite;
}
