@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=Montserrat:wght@700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.topbar {
    background-color: #2196F3;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    width: 48px;
    height: 48px;
}

.app-name {
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

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

.back-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #1565C0;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 500;
}

.back-button:hover {
    background-color: #0D47A1;
}

.workspace {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.shapes-panel {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.shapes-panel h3 {
    margin-bottom: 20px;
    color: #1565C0;
}

.shape-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.shape-item:hover {
    background: #e3f2fd;
}

.shape-item.selected {
    background: #e3f2fd;
    border-color: #1565C0;
}

.shape {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oval {
    width: 60px;
    height: 40px;
    background: #90caf9;
    border-radius: 20px;
}

.parallelogram {
    width: 60px;
    height: 40px;
    background: #ffcc80;
    transform: skew(-20deg);
}

.rectangle {
    width: 60px;
    height: 40px;
    background: #a5d6a7;
}

.diamond {
    width: 40px;
    height: 40px;
    background: #ef9a9a;
    transform: rotate(45deg);
}

.display {
    width: 60px;
    height: 40px;
    background: #ce93d8;
    border-radius: 10px 10px 0 0;
}

.arrow {
    font-size: 24px;
    color: #1565C0;
}

.tools {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tools button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: #1565C0;
    color: white;
    cursor: pointer;
    font-weight: 500;
}

.tools button:hover {
    background: #0D47A1;
}

.canvas-container {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

#canvas {
    width: 100%;
    height: 800px;
}

.example-panel {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.example-panel h3 {
    margin-bottom: 20px;
    color: #1565C0;
}

.example-content {
    text-align: center;
}

.example-content h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2rem;
}

.example-image {
    margin: 20px 0;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 100%;
    overflow: hidden;
}

.example-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.example-image img:hover {
    transform: scale(1.02);
}

.algorithm-steps {
    text-align: left;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.algorithm-steps p {
    margin: 12px 0;
    color: #333;
    font-size: 1rem;
    padding: 8px;
    border-radius: 4px;
    background: #f8f9fa;
}

#create-new {
    display: block;
    width: 100%;
    padding: 12px;
    background: #1565C0;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

#create-new:hover {
    background: #0D47A1;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    display: block;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

.close-modal {
    position: absolute;
    right: 35px;
    top: 15px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #bbb;
}
