/* General Styles */
body {
    font-family: 'Victor Mono', monospace;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    background-color: #ffffff;
    padding: 20px 2rem;
    width: 25rem;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    box-sizing: border-box;
    overflow-y: auto;
}

.sidebar h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-section h2 {
    color: #555;
    margin-bottom: 10px;
}

.drag-drop-area {
    border: 2px dashed #ccc;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 10px;
}

.drag-drop-area:hover {
    background-color: #f0f0f0;
}

.drag-drop-area.dragover {
    background-color: #e0e0e0;
    border-color: #4287f5;
}

#svgPaste {
    width: 100%;
    height: 100px;
    margin-bottom: 10px;
    padding: 10px;
    box-sizing: border-box;
}

.styled-button {
    padding: 10px;
    background-color: #4287f5;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.styled-button:hover {
    background-color: #306edc;
}

/* Main Content Styles */
.main-content {
    flex-grow: 1;
    padding: 20px 5rem;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Top Bar Styles */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.sheet-selector {
    display: flex;
    align-items: center;
    position: relative;
}

.dropdown-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    margin-right: 10px;
}

.editable-title {
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.editable-title:hover {
    color: #4287f5;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content button {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
}

.dropdown-content button:hover {
    background-color: #f1f1f1;
}

.dropdown-content .add-sheet-btn {
    background-color: #4287f5;
    color: white;
    padding: 10px;
    text-align: center;
    border: none;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
}

.dropdown-content .add-sheet-btn:hover {
    background-color: #3266c9;
}

.sprite-actions button {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 10px;
    color: #333;
    transition: color 0.3s;
}

.sprite-actions button:hover {
    color: #4287f5;
}

.sprite-actions button svg {
    vertical-align: middle;
}

.more-actions {
    position: relative;
}

/* SVG Grid */
.svg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 700px;
    border-radius: 8px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        box-shadow: none;
        border-bottom: 1px solid #ddd;
    }
    
    .main-content {
        padding: 10px 2rem;
    }
    
    .modal-content {
        margin: 20% auto;
    }
}