/* Modern Graph Builder App - Redesigned with Brand Colors */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 24px;
    height: 100vh;
    user-select: none;
    background: linear-gradient(135deg, #CBD3EB 0%, #D0DEBB 100%);
    color: #212322;
}
#header {
    display: flex;
    width: 100%;
    gap: 20px;
}

#header1 {
    flex: 1;
    align-items: flex-start;
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(96, 110, 178, 0.15);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    width: 70px;
    height: 70px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #606EB2;
}
#header2 {
    flex: 4;
    align-items: flex-start;
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(96, 110, 178, 0.15);
}

#toolbar {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #F1EB9C 0%, #F0E87B 100%);
    padding: 16px;
    border: none;
    border-radius: 12px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(108, 194, 74, 0.1);
}

.distribution {
    padding: 12px 20px;
    margin: 6px;
    cursor: pointer;
    background: linear-gradient(135deg, #ffffff 0%, #FBDB65 100%);
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #F1EB9C;
    text-align: center;
    flex: 1 1 auto;
    white-space: nowrap;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: #212322;
}

.distribution:hover {
    background: linear-gradient(135deg, #606EB2 0%, #8094DD 100%);
    border-color: #606EB2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(96, 110, 178, 0.3);
}

.distribution:active {
    transform: translateY(0);
}

#greek-toolbar {
    display: flex;
    margin-bottom: 0;
    background: linear-gradient(135deg, #F1EB9C 0%, #F0E87B 100%);
    padding: 12px;
    border: none;
    border-radius: 12px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(108, 194, 74, 0.1);
}

.greek {
    padding: 12px 18px;
    margin: 6px;
    cursor: pointer;
    background: linear-gradient(135deg, #ffffff 0%, #FBDB65 100%);
    font-size: 20px;
    font-weight: bold;
    border: 2px solid #F1EB9C;
    text-align: center;
    display: inline-block;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: #212322;
}

.greek:hover {
    background: linear-gradient(135deg, #6CC24A 0%, #A1D884 100%);
    border-color: #6CC24A;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 194, 74, 0.3);
}

#greek-toolbar button {
    margin-left: auto;
    padding: 10px 24px;
    background: linear-gradient(135deg, #606EB2 0%, #8094DD 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(96, 110, 178, 0.3);
}

#greek-toolbar button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(96, 110, 178, 0.4);
}

#main {
    display: flex;
    flex-grow: 1;
    height: 100%;
    gap: 20px;
}

#sidebar {
    width: 240px;
    padding-right: 24px;
    flex-shrink: 0;
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(96, 110, 178, 0.15);
    height: fit-content;
}

#sidebar h3 {
    font-size: 18px;
    font-weight: 700;
    color: #212322;
    margin-bottom: 16px;
    border-bottom: 3px solid #6CC24A;
    padding-bottom: 12px;
}

#sidebar p {
    font-size: 14px;
    color: #212322;
    margin-bottom: 12px;
    line-height: 1.6;
}

#action-buttons {
    margin-top: 20px;
}

.action-button {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #606EB2 0%, #8094DD 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(96, 110, 178, 0.3);
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(96, 110, 178, 0.4);
}

#canvas-container-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    height: 100%;
}

#canvas-container {
    position: relative;
    border: none;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(96, 110, 178, 0.15);
}

.draggable {
    position: absolute;
    cursor: move;
    text-align: center;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 12px;
    border-radius: 12px;
    border: 3px solid #F1EB9C;
    transition: all 0.15s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.draggable:hover {
    border-color: #606EB2;
    box-shadow: 0 8px 24px rgba(96, 110, 178, 0.25);
    transform: translateY(-2px);
}

.draggable.selected {
    border-color: #6CC24A;
    box-shadow: 0 8px 24px rgba(108, 194, 74, 0.35);
}

.draggable img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
}

.draggable.greek {
    font-size: 28px;
    font-weight: bold;
    color: #606EB2;
    min-width: 60px;
    min-height: 60px;
}

.delete-button {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #606EB2 0%, #8094DD 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    z-index: 15;
    font-size: 12px;
    font-weight: bold;
    display: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(96, 110, 178, 0.3);
}

.draggable:hover .delete-button {
    display: block;
}

.delete-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(96, 110, 178, 0.4);
}

#connections-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 15;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

.anchor-point {
    position: absolute;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #6CC24A 0%, #A1D884 100%);
    border-radius: 50%;
    z-index: 20;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.anchor-point:hover {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #606EB2 0%, #8094DD 100%);
    box-shadow: 0 3px 8px rgba(96, 110, 178, 0.4);
}

.arrow-label {
    position: absolute;
    z-index: 25;
    background: white;
    padding: 6px 12px;
    border: 2px solid #6CC24A;
    border-radius: 8px;
    cursor: text;
    font-size: 13px;
    font-weight: 600;
    color: #212322;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#arrow-menu {
    position: absolute;
    z-index: 30;
    background: white;
    border: none;
    padding: 16px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(96, 110, 178, 0.2);
}

#arrow-menu input[type="text"] {
    margin-bottom: 12px;
    width: 200px;
    padding: 10px 14px;
    border: 2px solid #F1EB9C;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    color: #212322;
}

#arrow-menu input[type="text"]:focus {
    outline: none;
    border-color: #606EB2;
    box-shadow: 0 0 0 3px rgba(96, 110, 178, 0.1);
}

#arrow-menu button {
    margin-right: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#arrow-menu button:first-child {
    background: linear-gradient(135deg, #606EB2 0%, #8094DD 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(96, 110, 178, 0.3);
}

#arrow-menu button:last-child {
    background: #F1EB9C;
    color: #212322;
    border: 2px solid #F0E87B;
}

.delete-link-button {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.delete-link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

#arrow-menu button:first-child:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(96, 110, 178, 0.4);
}

#arrow-menu button:last-child:hover {
    background: #F0E87B;
}

