body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f4ff;
    color: #333;
    overflow: hidden;
}

.container {
    max-width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

header {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    padding: 15px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.content {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding: 10px;
    background-color: #f0f4ff;
    gap: 10px;
}

.panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    min-width: 200px;
}

.panel:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.panel-header {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    padding: 12px 0;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resizer {
    width: 10px;
    background: linear-gradient(90deg, #6e8efb, #a777e3);
    cursor: col-resize;
    border-radius: 5px;
    position: relative;
}

.resizer:hover {
    background: linear-gradient(90deg, #7da0ff, #b48aec);
}

.visualization-container {
    flex: 2;
    border: 1px solid #e0e5ff;
}

.visualization-content {
    flex: 1;
    padding: 10px;
    position: relative;
}

.sandbox-container {
    flex: 1.2;
    border: 1px solid #e0e5ff;
}

.sandbox-content {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.sandbox-iframe {
    flex: 1;
    border: 1px solid #e0e5ff;
    border-radius: 8px;
    min-height: 200px;
}

.navigation-buttons {
    display: flex;
    gap: 10px;
}

.nav-button {
    flex: 1;
    padding: 10px;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(110, 142, 251, 0.3);
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(110, 142, 251, 0.4);
}

.nav-button:disabled {
    background: #c7c7c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.config-panel {
    background-color: #f8f9ff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e5ff;
}

.config-panel h3 {
    margin-top: 0;
    color: #5a67d8;
    font-size: 1.1rem;
    border-bottom: 1px solid #e0e5ff;
    padding-bottom: 8px;
}

.config-item {
    margin-bottom: 15px;
}

.config-item label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #4a5568;
    font-size: 0.95rem;
}

.config-item input {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e5ff;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 0.95rem;
    background-color: #ffffff;
    transition: border-color 0.2s;
}

.config-item input:focus {
    outline: none;
    border-color: #6e8efb;
    box-shadow: 0 0 0 2px rgba(110, 142, 251, 0.2);
}

.start-button {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(110, 142, 251, 0.3);
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(110, 142, 251, 0.4);
}

.start-button:disabled {
    background: #c7c7c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.status-indicator {
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.status-ready {
    background-color: #e6f0ff;
    color: #4a6cf7;
    border: 1px solid #c7d9ff;
}

.status-building {
    background-color: #f0f4ff;
    color: #6e8efb;
    border: 1px solid #d0daff;
}

.details-panel {
    flex: 1.8;
    border: 1px solid #e0e5ff;
}

.details-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.stats {
    background: linear-gradient(135deg, #f8f9ff, #edf2ff);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e0e5ff;
}

.stats h3 {
    margin-top: 0;
    color: #5a67d8;
    font-size: 1.1rem;
}

.stats p {
    margin: 8px 0;
    font-size: 1rem;
    color: #4a5568;
}

.node {
    cursor: pointer;
    transition: fill 0.2s;
}

.node:hover {
    fill: #ff9800;
}

.link {
    stroke: #999;
    stroke-opacity: 0.6;
    cursor: pointer;
}

.link:hover {
    stroke: #ff5722;
    stroke-width: 3;
}

.node-label {
    pointer-events: none;
    font-weight: bold;
}

.page-visualization-container {
    display: flex;
    justify-content: center;
    margin: 15px 0;
    max-width: 100%;
}

.page-visualization {
    position: relative;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 0 auto;
    width: 100%;
    height: 550px;
    border-radius: 8px;
    border: 1px solid #e0e5ff;
}

.page-element {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
    min-width: 4px;
    min-height: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.page-element:hover {
    opacity: 0.9;
    transform: scale(1.02);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.page-container {
    text-align: center;
    width: 100%;
    margin-bottom: 20px;
}

.page-container h4 {
    margin-bottom: 12px;
    font-size: 1rem;
    color: #4a5568;
}

.action-details {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9ff, #edf2ff);
    border-radius: 8px;
    border: 1px solid #e0e5ff;
}

.action-details h4 {
    margin-top: 0;
    color: #5a67d8;
}

.tap-indicator {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #ff5722;
    border: 2px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
    z-index: 100;
}

.elements-tree {
    margin: 0;
    padding-left: 20px;
}

.elements-tree ul {
    margin: 0;
    padding-left: 20px;
}

.elements-tree li {
    list-style-type: none;
    margin: 8px 0;
    padding: 4px;
    border-left: 1px dashed #c7d2fe;
    font-size: 0.9rem;
}

.node-info-header {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e5ff;
}

.node-info-header h3 {
    color: #5a67d8;
    margin-top: 0;
}

.node-info-header p {
    margin: 5px 0;
    color: #4a5568;
}

/* Element detail popup */
.element-popup {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 1000;
    min-width: 300px;
    max-width: 500px;
    border: 1px solid #e0e5ff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.element-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.element-popup-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #5a67d8;
    margin: 0;
}

.element-popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.element-popup-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.element-popup-content {
    font-size: 0.95rem;
}

.element-popup-content div {
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.element-popup-content div:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.element-popup-label {
    font-weight: 600;
    color: #4a5568;
    display: inline-block;
    width: 100px;
}

.element-popup-value {
    color: #333;
}
