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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #243e66 0%, #FCA625 100%);
    height: 100vh;
    overflow: hidden;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid black;
}

.header h1 {
    color: #243e66;
    font-size: 1.8rem;
    font-weight: 600;
}

.header .logo {
    background: linear-gradient(135deg, #243e66 20%, #FCA625 70%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.toolbar {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #243e66 0%, #FCA625 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.main-container {
    display: flex;
    height: calc(100vh - 80px);
}

.sidebar {
    display: flex;
    flex-direction: column;
    width: 300px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem;
    overflow-y: auto;
}

h3 {
    color: #243e66;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Add 5% margin bottom to main sidebar divs */
.sidebar-p2 {
    margin-bottom: 5%;
}

#sharepoint-status {
    margin-bottom: 10%;
}

#files-list {
    margin-top: 8%;
}

#sharepoint-files {
    margin-bottom: 5%;
}

#sharepoint-files-title {
    color: #243e66;
}

.sample-diagram {
    background: #f8f9fa;
    border: 1px solid #b3b3b3;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sample-diagram:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sample-diagram h4 {
    color: #262729;
    margin-bottom: 0.5rem;
}

.sample-diagram p {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

.canvas-container {
    flex: 1;
    position: relative;
    background: #fafafa;
}

#canvas {
    width: 100%;
    height: 100%;
    z-index: 1;
    position: relative;
}

.status-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#help-modal-hidden {
    position: absolute;
    bottom: 5%;
    z-index: 1000;
    width: 100%;
    height: 5%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    color: #6c757d;
    display: flex;
    justify-content: left;
    gap: 5%;
    align-items: center;
}

#help-modal-hidden button {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 10px;
}

#help-modal-hidden button:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

#help-modal-shown {
    display: flex;
    flex-grow: 1;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: transparent;
}

.help-modal-content button {
    color: #243e66;
    padding: 0.5rem 1rem;
}

#help-modal-container-shown {
    background: transparent;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 32px rgba(36, 62, 102, 0.2);
    flex-grow: 1;
    width: 45%;
    height: 35%;
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: modalSlideIn 0.4s ease-out;
    z-index: 10000;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#help-modal-container-shown ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: center;
}

#help-modal-container-shown li {
    color: #243e66;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(36, 62, 102, 0.1);
    border-left: 4px solid #FCA625;
    transition: all 0.3s ease;
    animation: listItemFadeIn 0.5s ease-out;
    animation-fill-mode: both;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#help-modal-container-shown li:nth-child(1) {
    animation-delay: 0.1s;
}

#help-modal-container-shown li:nth-child(2) {
    animation-delay: 0.15s;
}

#help-modal-container-shown li:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes listItemFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#help-modal-container-shown li:hover {
    background: rgba(255, 255, 255, 0.98);
    transform: translateX(5px) translateY(-2px);
    box-shadow: 0 8px 20px rgba(36, 62, 102, 0.2);
    border-left-color: #243e66;
}

#help-modal-container-hidden {
    display: none;
}

.status-text {
    flex: 1;
}

.fullscreen-btn {
    position: absolute;
    left: 93%;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.fullscreen-btn img {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.fullscreen-btn:hover img {
    opacity: 1;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #667eea;
    font-size: 1.2rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .sidebar {
        width: 250px;
    }

    .header {
        padding: 1rem;
    }

    .header h1 {
        font-size: 1.4rem;
    }

    .link-generation-container {
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 1rem;
    }
}